FEAT: A2ATarget for Agent-to-Agent (A2A) protocol endpoints
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by reviewing the implementation referenced in #2771 and the existing prompt-target patterns in PyRIT. Confirm how the target should handle A2A 0.3 and 0.2 requests, context and task lifecycles, rate-limit retries, and JSON-RPC errors; done means these behaviors are covered by tests against the stated requirements.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
More and more agents are deployed behind the Agent-to-Agent (A2A) protocol, for example Microsoft Foundry Agent Service incoming A2A endpoints and Google ADK agents. For a caller, A2A is often the only way in to such an agent, and it sits in front of the agent's server-side instructions, platform guardrails and tools. PyRIT has no target for A2A today, so red-teaming these agents needs a custom HTTPTarget setup that can't follow A2A's task lifecycle or keep an agent's context across turns.
Describe the solution you'd like
An A2ATarget prompt target that:
- speaks A2A 0.3 (
message/send) over JSON-RPC, with a fallback to 0.2 (tasks/send) - maps each PyRIT conversation to one A2A context, so multi-turn attacks keep the agent's own server-side state
- handles the task lifecycle: blocking sends, polling pending tasks, continuing tasks that are waiting for input
- retries rate limits with
pyrit_target_retry, including rate limits the agent relays from its model - returns JSON-RPC errors as PyRIT error responses rather than agent text
Describe alternatives you've considered, if relevant
HTTPTarget with a JSON template works for single requests, but it can't manage A2A context IDs, poll pending tasks, or tell a JSON-RPC error apart from an agent reply.
Additional context
I have an implementation in #2771, tested against a Microsoft Foundry prompt agent with incoming A2A enabled.
- Dominant language
- Python
- Stars
- 4.5k
- Forks
- 896
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 191
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/PyRIT
-
BUG HarmBench loader drops ContextString, so contextual behaviors are sent without their context Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
stephrobert/dsoxlab#238 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
sublimehq/package_control#1780 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
nwg-piotr/nwg-displays#145 ·