A2A: Understanding the Protocol
A2A: Understanding the Protocol
What is A2A? The Agent2Agent (A2A) Protocol is an open standard originally developed by Google and now maintained by the Linux Foundation. It defines how AI agents discover each other, authenticate, and exchange messages - regardless of what framework they were built with or who built them. Think of it as a common language that lets any agent talk to any other agent.Why does A2A exist? Without a standard protocol, connecting agents requires custom integrations for every pair of agents. A2A solves this by providing a single, universal interface. Your agent built with LangGraph can collaborate with an agent built with CrewAI, ADK, or any other framework - all using the same protocol.How does it work? A2A uses familiar web standards: HTTP for transport, JSON-RPC 2.0 for message format, and standard authentication methods. Agents publish an Agent Card (a JSON document describing their capabilities and skills) at a well-known URL. Clients fetch this card to discover what an agent can do, then send Messages to request work. The agent processes the request and returns either a direct response or a Task for longer-running operations.A2A vs MCP: These protocols are complementary, not competing. MCP (Model Context Protocol) standardizes how agents connect to tools - stateless functions like calculators or database queries. A2A standardizes how agents communicate with other agents - autonomous systems that can reason, plan, and have multi-turn conversations. Use MCP when you need tools; use A2A when you need to collaborate with other agents.
How StackOne A2A works
How StackOne A2A works
Each agent’s skills are generated from the actions enabled on the account’s connector. Behind the scenes, the agent routes through the same MCP server and actions as every other protocol StackOne offers.The server is built on Google’s Agent Development Kit (ADK): each request runs an agent on a Gemini model through an ADK Runner. The StackOne ADK plugin exposes your account’s actions through a search-and-execute tool model — the model gets one tool to search the action catalog and one to execute a chosen action, so the prompt stays a constant size as you link more connectors. When the model runs a tool, the StackOne SDK executes it against the StackOne Actions API.The protocol itself is implemented with Google’s A2A Python SDK, which handles
message/send, message/stream, and tasks. Conversation and task state is persisted, so multi-turn conversations and long-running tasks survive across requests.Building on ADK keeps StackOne agents interoperable with the wider Google agent ecosystem. It is the same plugin and SDK StackOne ships to customers — use them to build your own A2A agent with the Agent SDK.Calling actions
Before starting you need to have followed the previous setup steps described in the Getting Started. Then the full protocol round-trip with cURL:1
Build your authentication headers
Every request goes to To build the Basic token, append a colon to your API key, then base64 encode the result (see the API Keys guide if you need to generate a new key):Account IDs are on each linked account under Accounts, or via the List Accounts endpoint.
https://a2a.stackone.com with your API key and account ID as headers (the public agent card routes need no authentication):Multiple accounts in one request
Multiple accounts in one request
A single request can span multiple connected accounts. Pass more than one account ID in the
x-account-id header — comma-separated or as repeated headers. The agent fans out across the accounts in parallel and routes each action back to its originating account; if one account is unavailable, the remaining accounts are still served.2
Get the agent card
StackOne serves two agent cards. The public discovery card describes the agent in general, needs no authentication, and advertises
supportsAuthenticatedExtendedCard: true. The authenticated extended card is specific to your account and lists the skills for your connected accounts — A2A clients read the public card and fetch the extended card automatically.Example extended card response
Example extended card response
Connector-specific routes like
https://a2a.stackone.com/hibob/agent-card.json are public reference cards for inspecting one connector’s skills — for reference only, not for agent connections.3
Send a message
message/send initiates a new interaction or continues an existing one. Each message needs a unique messageId (a UUID — on macOS/Linux: uuidgen | tr '[:upper:]' '[:lower:]'):status.state and the agent’s answer in artifacts. For long-running operations, pass "configuration": { "blocking": false } and poll instead.4
Poll task status
Use
tasks/get with the task id from the previous response:Test it
The fastest way to try the agent, no setup:- Go to a2a-ui.stackone.com
- Click the gear “⚙️” icon and enter your StackOne API key and account ID (multiple accounts: comma-separated, no spaces)
- Click + Agent, enter
https://a2a.stackone.com/.well-known/agent-card.json, and click Add Agent - Start chatting — the agent’s skills reflect the connectors and actions enabled on your linked accounts
Troubleshooting
401/403 authentication errors
401/403 authentication errors
- Check the API key is valid and enabled under Configuration → API Keys — see the API Keys guide
- Verify the key is correctly base64 encoded (including the trailing colon) in the
Authorizationheader - Ensure all required headers are present —
Authorization,x-account-id, andContent-Type - Confirm the
x-account-idmatches your linked account and the account belongs to the same project as your API key - Remember: A2A only supports headers for authentication, never query parameters
- To validate credentials, fetch the authenticated extended card — the public discovery card needs no authentication, so it cannot confirm them
Agent has no skills
Agent has no skills
- Check that the account is active (not in an error state or disabled)
- Verify the connector is properly configured — skills are generated from the actions enabled for the account’s connector
Build with A2A
StackOne speaks the open A2A protocol, so anything that can act as an A2A client can talk to the StackOne agent:Agent frameworks
A2A SDK
Official A2A SDKs for Python, JavaScript, Go, and more.
Google ADK
Connect agents built in Google’s Agent Development Kit.
AG2
Connect AG2 agents with
A2aRemoteAgent.BeeAI
Connect BeeAI Framework agents with
A2AAgent.Strands
Connect Strands Agents (AWS) with the A2A client tools.
Agent platforms
Register the agent by its card URL — no code required:Gemini Enterprise
Register the agent in Google Agent Platform & Gemini Enterprise.
Microsoft Foundry
Register the agent in Microsoft Foundry.