Teams wiring agents together keep asking whether they need the Agent2Agent (A2A) protocol or whether ordinary REST and gRPC APIs will do, and the answer decides where trust, delegation and audit end up living. A direct API call works on day one but says nothing about who asked for the work, which task it belongs to or when that authority ends. A2A adds discovery, a task lifecycle and declared security schemes, yet its specification states that authorisation is implementation specific, so adopting it does not remove the design work. This guide compares the two on trust establishment, delegation, task lifecycle, threats and audit, using A2A specification 1.0 as published on a2a-protocol.org when checked on 13 November 2026. It is for architects, IAM engineers and security reviewers deciding how agents in their estate, and their partners' estates, should talk to each other.
Key takeaways
- They solve different problems. A direct API exposes a function to a known caller; A2A lets one opaque agent delegate a long-running task to another and track it through states such as TASK_STATE_WORKING, TASK_STATE_INPUT_REQUIRED and TASK_STATE_AUTH_REQUIRED.
- Neither gives you authorisation. A2A requires every request to be authenticated and results to be scoped to the caller, but Section 7.5 leaves the authorisation model to you. A plain API leaves everything to you, including how the caller is identified.
- Delegation is the dividing line. When agent B acts for a user who asked agent A, a plain API with one shared client credential erases the user, the task and the chain. Use OAuth 2.0 Token Exchange (RFC 8693) with an act claim under either option.
- Partner count and autonomy decide. One or two internal, synchronous, deterministic integrations rarely justify A2A. Many partners, cross-organisation delegation, asynchronous tasks or agents that negotiate scope mid-task usually do.
- Audit must be designed in both cases. Neither A2A nor REST supplies a delegation-aware audit trail by default. Carry a W3C trace context, the task identifier and the delegation chain on every hop, and log them at both ends.
The short answer
Use a direct API when a fixed client calls a fixed service: known operations, a caller acting for itself or one well-identified user, a single request and response, one trust domain. The existing API security toolkit (client credentials, audience-restricted tokens, object-level authorisation) covers it.
Use A2A when the counterparty is itself an agent that plans its own work: tasks that run for minutes or hours, pause for input or authorisation, stream partial artifacts or form one hop in a cross-organisation chain. A2A gives both sides a shared vocabulary for discovery (the Agent Card), skills, authentication schemes and task state that a bespoke API would otherwise reinvent.
Most estates end up with both. The A2A specification's own appendix on the Model Context Protocol (MCP) draws the line this way: MCP standardises how an agent uses tools, APIs and data sources, while A2A standardises how independent, often opaque agents collaborate as peers, and an A2A server agent may use MCP or direct APIs to reach the tools it needs. See the Agent Protocols Compared for the wider protocol map; this page stays on the A2A versus direct API decision.
What each approach actually is
Direct API integration
One agent calls another agent's functions through a REST, gRPC or GraphQL interface described in an OpenAPI or protobuf definition, authenticating as an OAuth client, with an API key or with mutual TLS. Each call is a stateless request; long-running work needs a bespoke job resource, polling endpoint or webhook. Nothing tells the receiver that the caller is an agent, which user it acts for, or which larger task the call belongs to, unless the designer adds claims for it.
A2A
A2A 1.0 defines an Agent Card that describes the agent's identity, skills and authentication requirements, discoverable at /.well-known/agent-card.json, through registries or by direct configuration. It defines three bindings (JSON-RPC, gRPC and HTTP+JSON), operations such as SendMessage, GetTask, ListTasks, CancelTask and SubscribeToTask, and a mandatory A2A-Version header. Work is tracked as a task with server-generated, unique task IDs and an optional contextId that groups related tasks; the specification says agents must reject a mismatched taskId and contextId pair. The task moves through nine defined states, four of them terminal (COMPLETED, FAILED, CANCELED, REJECTED) and two interrupted (INPUT_REQUIRED, AUTH_REQUIRED). Updates arrive by polling, streaming or push notification webhooks.
Section 1.1 says agents collaborate without access to each other's internal state, memory or tools, so an organisation can expose a capability without exposing the systems behind it. For the protocol mechanics in depth (card signing, scheme choice, webhook hardening) see the A2A Protocol Security Guide.
Side-by-side comparison
| Dimension | Direct API integration | A2A 1.0 |
|---|---|---|
| Discovery | Out of band: documentation, OpenAPI file, configuration | Agent Card at a well-known URI, a registry or direct configuration; optional JWS signatures over an RFC 8785 canonicalised card |
| Caller authentication | Whatever the API owner chose; often one client credential per integration | Schemes declared in securitySchemes (API key, HTTP auth, OAuth 2.0, OpenID Connect, mutual TLS); server must authenticate every request |
| Server identity | TLS certificate of the endpoint | TLS certificate (clients should validate against trusted CAs), plus card signature if you require it |
| Authorisation | Designed per API: scopes, object-level checks, function-level checks | Implementation specific (Section 7.5); must scope ListTasks and GetTask results to the caller and check before any query that could reveal out-of-scope resources (Section 13.1) |
| Unit of work | Request and response; long jobs are bespoke | Task with lifecycle, artifacts, contextId grouping and referenceTaskIds |
| Mid-task authorisation | Not modelled; the call fails or the token must already be broad enough | TASK_STATE_AUTH_REQUIRED, with credentials preferably obtained out of band; the state alone grants nothing (Section 7.6.4) |
| Asynchronous updates | Custom polling or webhooks | Polling, streaming (ordered events) or push notifications with SSRF checks and authenticated webhooks (Section 13.2) |
| Audit | API gateway and application logs, if designed | Section 13.4 asks agents to log security-relevant events and keep audit trails for sensitive operations, without defining a schema |
Trust establishment under each option
Trust between agents has three parts: the endpoint, the caller and the permission.
- Endpoint trust: a direct API relies on the configured URL and its TLS certificate. A2A adds the Agent Card, which tells the client which credentials to send and where, so an unsigned card from a registry you do not control is a weaker anchor than a hard-coded URL. Require signed cards from external partners and pin the keys.
- Caller identity: a direct API often sees one client ID for the whole integration, and A2A with a shared API key learns no more. Give each agent deployment its own workload identity and sender-constrain tokens: RFC 9700 Section 2.2.1 recommends mTLS (RFC 8705) or DPoP (RFC 9449). See the Agent-to-Agent Authentication Guide.
- Permission: scopes and object checks for APIs; for A2A, whatever model you build behind the declared schemes, mapped to skills and task ownership. RFC 9700 Section 2.3 says tokens should be restricted to one resource server or a small set, with minimum privileges, for both.
Delegation and the task lifecycle
Agent-to-agent traffic is rarely an agent acting for itself. The receiving agent needs to know who the original principal is, which agent is acting, and what the task allows.
In a typical direct integration the target sees only the calling agent's client ID; the user, if passed at all, is a free-text field, the token carries every scope the integration might ever need, and nothing links several calls into one piece of work.
What A2A adds, and what it does not
A2A gives the work a durable identity (the task), a place to pause for more authority (TASK_STATE_AUTH_REQUIRED) and a way to reference related tasks. Section 7.6.3 says that if credentials are passed in band they should be bound to the requesting agent so only that agent can use them, and Section 7.6.4 says the protocol does not define the scope or validity of any authorisation obtained. In other words, A2A gives you the right hooks but not the delegation token itself.
Carry delegation the same way under both
The delegation token should come from OAuth 2.0 Token Exchange, RFC 8693, a Standards Track RFC. It distinguishes delegation (the actor keeps its own identity and acts for the subject) from impersonation (the actor becomes indistinguishable from the subject). The calling agent presents the user's token as the subject_token and its own credential as the actor_token; the authorisation server can check a may_act claim before issuing a token whose act claim names the current actor, with nested act claims recording earlier actors. The RFC says only the top-level claims and the current actor should be used for access control; prior actors are informational. Request a narrow audience or resource for each hop, because RFC 8693 notes that multiple targets combine the requested scopes. For fine-grained limits such as an amount or a single record, OAuth Rich Authorization Requests (RFC 9396) add an authorization_details array with type, locations, actions, datatypes and identifier. See the OAuth Token Exchange and Delegation Guide and the Delegation Chains and Attenuated Authority for AI Agents.
Threat model for each option
| Threat | Exposure with direct APIs | Exposure with A2A | Primary control (both) |
|---|---|---|---|
| Agent impersonation | Shared integration credential means any process holding it is "the agent" | Fake peer registered in a registry, or a spoofed or unsigned Agent Card redirecting credentials | Per-agent workload identity, mTLS or DPoP, signed cards with pinned keys, allowlisted peers |
| Task injection | Instructions smuggled into free-text fields that the receiving agent treats as commands | Malicious message parts or artifacts in a task, or a forged reference to another caller's task | Treat every inbound message as untrusted data; enforce task ownership; reject mismatched taskId and contextId |
| Over-broad tokens | One long-lived token with every scope the integration needs | Broad token obtained in AUTH_REQUIRED and reused beyond the task | Per-hop token exchange, audience restriction, short lifetime, RFC 9396 details |
| Broken object level authorisation | OWASP API1:2023: caller reads or changes objects it does not own by changing an ID | GetTask or ListTasks returning another caller's tasks if scoping is missed | Owner check on every object and task, before the query |
| Server-side request forgery | Caller-supplied callback URLs in custom webhooks (OWASP API7:2023) | Push notification URLs; Section 13.2 requires SSRF validation such as rejecting private IP ranges | Egress allowlists, URL validation, authenticated webhooks |
The threats are largely shared. Direct APIs hide agent behaviour inside ordinary API traffic; A2A concentrates risk in discovery and the Agent Card, which is easier to review but a single point of failure if cards are unsigned.
Failure modes when plain APIs carry agent delegation
These are the patterns that appear when a team uses an existing service API as the channel for one agent to delegate work to another.
- The confused deputy: the receiving agent acts with its own broad privileges on behalf of a caller who should have had less. Without an act claim or a subject token, the receiver cannot check the original principal.
- Token pass-through: to "preserve the user", the calling agent forwards the user's token to the next agent, which forwards it again. Every hop now holds a token that is valid for the first audience, and an audience check, if any, is the only barrier. Exchange the token at each hop instead.
- Standing scopes for occasional actions: because a plain API has no AUTH_REQUIRED step, the integration is granted write or delete scopes up front for the one task a month that needs them.
- Orphaned long-running work: a job started by an agent keeps running after the user's session or the task is cancelled, because cancellation was never wired through. A2A's CancelTask is idempotent by specification; a bespoke job API often has no cancel at all.
- Audit that stops at the gateway: the gateway logs show the integration client ID called an endpoint. They do not show which agent instance, which user, which task or which upstream request caused it, so an investigator cannot rebuild the chain.
Where audit lives
Under a direct API, audit lives in gateway and service logs, which must carry client ID, subject, act chain and trace ID. Under A2A, both agents should log task ID, state transitions, scheme used, subject and act chain. Revocation differs too: a direct API revokes a credential, while A2A also needs tasks cancelled, push configurations deleted and the peer removed from the allowlist. W3C Trace Context is a W3C Recommendation; its traceparent header carries version, trace-id, parent-id and trace-flags, and the specification says vendors must not place personal or sensitive information in the headers. That makes it suitable for correlation across organisations, provided nothing sensitive goes into tracestate. For field-level audit design see the AI Agent Audit Log Schema Template.
Decision criteria: partner count and autonomy
| Situation | Recommended pattern | Why |
|---|---|---|
| One internal agent calls one internal service, synchronous, fixed operations | Direct API | A2A adds discovery and task machinery you will not use; secure it as a normal NHI integration |
| Agent calls a partner's existing public API | Direct API | The partner exposes a service, not an agent; apply audience-restricted, sender-constrained tokens |
| Two to five internal agents, long-running tasks, human approvals mid-task | A2A, internal only | Task states and AUTH_REQUIRED replace bespoke job and approval APIs |
| Many agents across business units, frequent onboarding of new agents | A2A with a curated registry and signed cards | Discovery and declared schemes scale; per-integration bespoke APIs do not |
| Cross-organisation delegation (supplier, customer or platform agents) | A2A, signed cards, token exchange per hop | The receiving organisation needs a standard way to see the principal, the actor and the task |
| High autonomy: agents negotiate scope or sub-delegate | A2A plus an external policy decision point | Mid-task authorisation must be explicit and logged; plain APIs force standing privilege |
Small organisations: start with direct APIs and good token hygiene; registries, card signing keys and webhook infrastructure have a real running cost. Large organisations: standardise early, because each bespoke delegation API becomes its own audit and revocation problem.
Worked scenario: supplier quote with approval
A buyer in a manufacturing firm asks an internal procurement agent to source 500 bearings under a budget. The procurement agent needs quotes from two suppliers' agents and a purchase approval from finance.
Built on direct APIs: each supplier issues an API key for its quote endpoint and the buyer's name travels in a request field. If a supplier agent places a provisional order, nobody can later show which buyer asked, whether finance approved or which agent instance acted, and the keys never expire.
Built on A2A:
- The procurement agent reads each supplier's signed Agent Card from an allowlisted URL and verifies the signature with a pinned key.
- It exchanges the buyer's token for a per-supplier token (RFC 8693), audience-restricted to that supplier's agent, with the procurement agent named in the act claim and authorisation details limited to a quote for the part number and quantity.
- It sends SendMessage, creating a task. The supplier agent returns a quote as an artifact and completes the task.
- When the buyer accepts, the procurement agent starts a new order task. The supplier agent moves it to TASK_STATE_AUTH_REQUIRED because orders need a purchase approval. Finance approves out of band, and the procurement agent obtains a token bound to itself for that order only.
- Both sides log task ID, contextId, state transitions, subject, actor and trace ID. If the buyer cancels, CancelTask ends the work and the order token expires.
Implementing and migrating
- Inventory agent-to-agent paths: list every place an agent calls another agent, the credential used, the principal it acts for and whether calls span more than one request. Treat each as a non-human identity with an owner.
- Classify each path: apply the decision table. Leave fixed, synchronous service calls on direct APIs; mark delegation, long-running and cross-organisation paths for A2A.
- Fix identity first, under either option: one credential per agent deployment, sender-constrained tokens, audience restriction, and token exchange for delegated calls. This is worth doing before any protocol change.
- Pilot A2A on one internal path: run it beside the existing API, pin the A2A-Version you accept, and compare logs from both channels.
- Add signing and a registry before external partners: sign Agent Cards, publish keys over HTTPS, keep a trusted key store per provider and refuse expired keys.
- Cut over by caller, with rollback: move one calling agent at a time and keep the old credential disabled, not deleted, for a short rollback window.
- Retire the old credentials: revoke the bespoke integration's keys and secrets and remove them from secret stores.
Detection and measurement
Log caller identity, scheme, token audience, act chain, task ID, state transitions, webhook targets and trace ID at both ends of every hop. Alert on peers calling skills they never used, AUTH_REQUIRED loops, tokens at an unexpected audience and new push notification hosts. Useful measures:
- Delegation coverage: percentage of agent-to-agent calls carrying an exchanged token with an act claim, rather than a shared integration credential.
- Credential sharing: number of agent deployments that share a client ID or API key (target zero).
- Token lifetime: median and maximum lifetime of tokens used on agent-to-agent paths.
- Card assurance: percentage of external Agent Cards that are signed and verified against a pinned key.
- Traceability: percentage of sampled downstream actions traceable to the original principal.
- Orphaned work: tasks or jobs still running more than a set time after their parent task ended.
Framework mapping
| Framework | Reference | Relevance |
|---|---|---|
| NIST CSF 2.0 | PR.AA-01, PR.AA-05 | Identities for services are managed; access permissions follow least privilege and are reviewed |
| NIST CSF 2.0 | DE.CM-03 | Technology usage monitored for adverse events, including agent-to-agent traffic |
| NIST SP 800-53 Rev. 5 | IA-9 Service Identification and Authentication | Each agent authenticates as a service, not as a shared integration |
| NIST SP 800-53 Rev. 5 | AC-3, AC-6 | Access enforcement and least privilege per hop and per task |
| NIST SP 800-53 Rev. 5 | AU-2, AU-10 | Event logging and non-repudiation across the delegation chain |
| OWASP API Security Top 10 2023 | API1, API5, API7 | Object-level and function-level authorisation; SSRF through callbacks |
| MITRE ATT&CK v20 | T1528, T1550.001 | Theft and reuse of application access tokens on agent paths |
| MITRE ATLAS | AML.T0118.001 Direct Agent Communication | Adversary use of agent-to-agent channels |
Common failure patterns
- Treating "A2A compliant" as secure: the specification mandates authentication but leaves authorisation, card signing policy and token scope to the deployer. Review those three explicitly.
- Long-lived integration tokens between agents: the Salesloft Drift Breach 2025 showed how OAuth tokens held by one chatbot integration let an attacker export Salesforce records from hundreds of customer organisations through a trusted app. Agent-to-agent tokens need the same inventory and rapid revocation.
- Using AUTH_REQUIRED as a permission: the state grants nothing; the credential obtained must be scoped, short-lived and bound to the requesting agent.
Practitioner checklist
- Inventory every agent-to-agent path with its credential, principal, owner and whether it delegates.
- Keep fixed synchronous service calls on direct APIs; move delegation, long-running and cross-organisation paths to A2A.
- Give every agent deployment its own credential and sender-constrain tokens with mTLS or DPoP.
- Use RFC 8693 token exchange per hop with an act claim; never pass a user's token through.
- Restrict each token to one audience and the minimum scope, adding RFC 9396 authorisation details for high-impact actions.
- Require signed Agent Cards from external providers, pin their keys and pin the A2A version you accept.
- Enforce task ownership on GetTask, ListTasks and CancelTask, and reject mismatched taskId and contextId pairs.
- Validate push notification URLs against SSRF and authenticate every webhook.
- Propagate W3C trace context and task IDs, and log subject, actor chain and state transitions at both ends.
- Test revocation: disable a peer and confirm its tokens, tasks and push configurations stop working.
Standards and references
- A2A Project: Agent2Agent (A2A) Protocol Specification
- IETF: RFC 8693 OAuth 2.0 Token Exchange
- IETF: RFC 9700 Best Current Practice for OAuth 2.0 Security
- IETF: RFC 9396 OAuth 2.0 Rich Authorization Requests
- W3C: Trace Context
- OWASP: API Security Top 10 2023
- NIST: SP 800-53 Rev. 5
- MITRE ATLAS: Direct Agent Communication
Related NHI Mgmt Group resources: Multi-Agent and A2A Security Guide · AI Agent Authorisation Guide · Agent Protocols Compared · AI Agent Identity Security Buyer's Guide