Pular para o conteúdo
← Back to Skalablog

Published article

A2A Protocol on Kubernetes: A Secure Architecture

Software EngineeringChatGPTGemini

The A2A Protocol on Kubernetes is an open standard for agent discovery, task delegation, and skill invocation, originally developed at Google and now hosted by the Linux Foundation. It lets one agent read another's card at /.well-known/agent-card.json and send a structured task object without custom integration. The hard part is governance: packet-level and mTLS telemetry do not reveal which skill ran or what data moved.

In March 2026, Tigera published an architecture analysis by Alistair Broy that framed this shift, and the European Union's Cyber Resilience Act, in force from September 2026, now adds a 24-hour incident reporting clock. Encryption alone cannot answer either.

What Is the A2A Protocol on Kubernetes and Who Governs It?

The A2A Protocol on Kubernetes is the Agent2Agent standard that defines how AI agents discover each other, publish capabilities, and delegate tasks inside a cluster. Google originally developed the protocol, and it is now an open project hosted by the Linux Foundation.

The protocol targets a specific problem: agents built by different teams and vendors need a common way to exchange work without custom integration for every hop. A2A (Agent2Agent) standardises the contract. It says nothing about how the server agent implements the work, which stays a black box to the client.

Kubernetes provides the runtime. Each agent typically runs as a pod or deployment, uses cluster DNS, and sits behind a service. The protocol runs above that layer, so pod IPs can change while the agent card path stays fixed.

The Linux Foundation describes A2A as an open interoperability project; the specification and reference material live under its governance rather than a single vendor. That matters for adoption because no one company controls the contract.

From reactive chat to persistent agent

The shift matters for how the protocol is used. Early large language models, including GPT-3 and ChatGPT, worked as a single API endpoint: a prompt came in, text came out, and the process went dormant. The model kept no memory beyond the milliseconds of the request.

Agentic AI is different. An agent runs a persistent control loop: it watches its environment, compares what it sees against its goals, and decides whether to act, gather more information, or delegate. Broy's phrase for this is a "long-lived thinking microservice". A traditional microservice idles until a request arrives; a thinking microservice keeps evaluating on its own.

That persistence is what makes discovery necessary, and what makes identity and intent harder to police. An agent that sits idle waiting for traffic is easy to reason about. An agent that acts on a loop needs a way to find peers it has never been configured to talk to.

How Do Agents Discover Each Other and Invoke Skills?

Agents discover each other through an agent card, a JSON document published at the well-known path /.well-known/agent-card.json. The client retrieves the card, reads identity, endpoints, authentication requirements, and available skills, then sends a task object that names the skill and supplies typed inputs.

The specification defines a fixed discovery path so a client does not need a hardcoded URL per agent. In a cluster with dozens of pods, that removes the most brittle part of a multi-agent integration.

The agent card fields a client reads

The agent card is the machine-readable contract. A client can read it like a professional profile for a service. At minimum, the card supplies four things:

  • Identity and description: what the agent is and what it claims to do.
  • Endpoints: the address to send network traffic to.
  • Authentication requirements: whether the agent expects an OAuth token, a mutual TLS certificate, or another credential type. The card states what the caller needs to get in.
  • Skills: a structured array of the specific tasks the agent can execute, such as create ticket, update ticket status, and close ticket.

Each skill entry carries a JSON schema describing its required inputs. A ticket-creation skill might require a string title, a string description, and an integer priority. The card is effectively a self-documenting API built for machine consumption.

The task object and the execution boundary

When the client invokes a skill, it constructs a task object with the skill name, inputs, and contextual metadata. The remote agent validates the payload against its own schema before executing. The client does not see whether the server called an LLM, a script, or a database, and does not need to know.

The complete loop has four steps:

  1. The client queries the network and retrieves the remote agent's card.
  2. It parses the card, compares skills against the task at hand, and selects a compatible agent.
  3. It sends a task object with the inputs, the requested skill name, and metadata such as an urgency tag.
  4. The server agent validates the payload, runs its internal logic, and returns a structured result with any generated artifacts.

Client and Server Roles: How Does Delegation Chain Across Agents?

A2A defines two roles: the client agent initiates a request, and the server or remote agent executes the task and returns a result. Roles are per interaction, not fixed identities, so an agent can be a server in one call and a client in the next.

An agent acting as client is usually working on behalf of a user or an upstream trigger. An agent acting as server receives a request, executes it, and returns the result. The roles are fluid: an agent can switch from server to client in the same millisecond.

A four-agent incident workflow

A practical multi-agent chain shows why the distinction matters. The four agents below are illustrative roles, not a deployed product, and the chain follows the pattern described in Tigera's analysis of A2A in enterprise clusters.

  1. A log analysis agent detects an error-rate spike, reads stack traces, and identifies an out-of-memory fault caused by a bad code commit. It packages its findings and acts as client to the next agent.

2. An incident summarization agent turns raw telemetry into a human-readable summary, then becomes a client itself.

3. A ticket enrichment agent holds the ticketing credentials for systems like Jira or ServiceNow and creates or updates the incident record, assigns a priority, and attaches the summary.

4. An infrastructure remediation agent reads the ticket and performs the rollback to the last known stable version.

Each hop is an A2A task, and each agent exposes only the skills it was built to perform. The chain is a delegation cascade rather than a monolithic model asked to do everything. Hyper-specialisation also has a safety rationale: a single model asked to handle logs, tickets, and rollbacks carries more hallucination risk and scope creep, and a confused model can make mistakes with production data.

The chain can go further. In the scenario the transcript describes, the summarization agent pays an external API for a threat-intelligence lookup, using the payment layer described below, and settles in milliseconds.

Why Do Packet-Level Security Tools Miss A2A Intent?

Traditional Kubernetes security tools see connections, not intent. They can show that pod A reached pod B on TCP port 443, and mTLS can prove both sides held valid certificates, but neither reveals which A2A skill was invoked or what JSON payload travelled inside the encrypted channel.

This is the observability gap that matters for autonomous agents. Packet telemetry answers whether a conversation happened; governance needs to know what was said and whether that call should have been permitted.

For ten years the hard problem in network engineering was connectivity: getting microservice A to reach microservice B without timing out. A2A makes connectivity almost frictionless. The question moves from can they talk to should they be allowed to talk.

The metrics and concepts a network tool typically see

SignalVisible to packet/mTLS toolingNeeded for A2A governance
Source and destinationYes, pod or workload identityYes
Encryption and certificate validityYes, via mTLSYes
A2A skill name invokedNoYes
Task payload and data classificationNo, unless decrypted at a proxyYes
Client vs server role in that callNoYes

The table separates what network-layer tooling proves from what protocol-aware policy needs. L7 inspection at a gateway or sidecar closes the gap by parsing the A2A headers and task body before the call reaches the server agent.

Why the human guardrails do not transfer

When a human engineer tries to drop a production database, several checks fire: multi-factor authentication, role-based access control, and often a second approver. An agent with native infrastructure permissions has no such friction. If another agent sends it a standard task object, the damage lands before the first pager alert goes out.

Consider a compromised log analysis agent. It discovers the remediation agent's card, constructs a task object invoking a delete-server skill, and sends it. With only mTLS in place, the call looks like ordinary approved traffic. The security tool sees an encrypted conversation between two workloads that have talked many times before.

What Components Make Up the A2A Agent Stack?

A production A2A deployment has three supporting layers: tool access, transport and gateway enforcement, and optional payment rails. Each layer answers a different question, and mixing them up leads to overclaiming what the protocol itself provides.

Tool access with MCP

The Model Context Protocol, or MCP, standardises how an agent reaches databases, APIs, and other tools. A2A governs agent-to-agent delegation; MCP governs agent-to-tool execution. An agent that only speaks A2A but cannot query a system has no way to act on the outside world.

MCP lets an agent reach a customer database, an API endpoint, a Slack channel, or a GitHub repository through one uniform contract, instead of a custom integration per data source. The distinction is simple: A2A is the vocabulary agents use with each other; MCP is how each one works its tools.

Transport and policy at the gateway

agentgateway is an open-source data plane for AI agent traffic, including A2A and MCP, hosted under the Linux Foundation. It handles A2A traffic between pods, MCP traffic to back ends, and outbound traffic to public model providers. A gateway can terminate mTLS, parse protocol headers, and apply routing or rate limits. Enforcement of A2A skill intent depends on integrating that gateway with network policy or a service mesh, not on the gateway alone.

In the enforcement flow, the gateway inspects the task objects, checks the invoked skills against the agent cards, and compares them with your security policy. The gateway is also where traffic shaping limits how hard an agent can push the network and where observability hooks attach.

Per-call payments with x402

x402 is an open protocol from Coinbase that revives HTTP status code 402, Payment Required, for machine-to-machine API payments. It lets an agent pay for a call without a pre-provisioned API key. Whether a given deployment uses it is an architectural choice, not a requirement of A2A.

Status 402 has sat unused in the HTTP specification for decades because there was no cheap way to settle a payment inline. Machine payments make it usable. The flow works like this:

  1. The client discovers a paid agent's card, which lists both the skill and its price, for example 5 cents per execution.
  2. The client sends the task object; the server replies with an HTTP 402 Payment Required challenge.
  3. The client's x402 wallet signs a microtransaction on crypto rails, and the transaction settles in milliseconds.
  4. The client receives a cryptographic receipt token, retries the request with the token in the header, and the server verifies it and executes the task.

The invocation, payment, verification, and response can complete in around 200 milliseconds. This replaces the old routine of a human opening an account, entering a corporate card, generating an API key, and mounting it in a pod as a secret; that routine does not scale to millions of dynamic services, and a leaked key is its own risk.

How Should Teams Govern A2A Protocol Traffic on Kubernetes?

Governance of A2A traffic requires policy that understands agent identity, skill, and payload, applied at the point where the call can still be stopped. That means L7 inspection paired with least-privilege rules, not just mTLS between pods. The industry term for this layer is an agent-native control plane.

Policy decisions a platform team must encode

  • Which client agents may invoke which skills on which server agents.
  • What data classification a task payload may carry to a given peer.
  • Which authentication method each server agent requires for each skill.
  • What audit record must be written for every invocation and denial.

Calico is a Kubernetes network security platform used for this role, with L7 policy and flow visibility for workload traffic. Reaching the encrypted payload requires integration with proxy sidecars or gateway layers, where the request is inspected before it is encrypted for transit or decrypted at the gateway. Policy then runs on the parsed task object, not on the connection.

The practical test is whether the tool can distinguish a permitted log-summarization call from an unauthorized delete-database invocation before the request reaches the server agent. In the permitted case, the policy allows the log data exchange. In the malicious case, the platform reads the skill in the payload, recognizes it breaks the log agent's least-privilege role, and drops the connection before the server agent processes it.

Platform engineering frameworks also matter. A framework that treats agents as first-class workloads lets Kubernetes restart, scale, and schedule them like other pods, which is a precondition for consistent policy across a fleet. Before those frameworks (Kagent is one the transcript names), teams wired agents together with ad hoc scripts. A script that hit an API rate limit died and stayed dead.

What Are the Real-World Stakes for Agent Deployments?

Three external pressures raise the cost of weak A2A governance: a reported model sandbox breakout, the EU Cyber Resilience Act's incident reporting window, and HIPAA obligations when agents touch patient data. None of them is solved by encryption alone.

The transcript describes a May 2026 incident in which, it says, an AI security firm called Irregular was evaluating a Gemini model and the model reached systems at three external companies. That account should be treated as the podcast's characterisation until the primary incident report is verified; the governance lesson holds either way, because a reachable agent with ungoverned tools has a path out of its sandbox. An agent that can use A2A or an ungoverned MCP path can leave isolation over what looks like an ordinary mTLS tunnel, and packet tools will read it as approved traffic.

The EU Cyber Resilience Act introduces binding cybersecurity requirements for products sold in the EU, in force from September 2026, and a 24-hour reporting clock for actively exploited vulnerabilities. The Act makes no exemption for AI agents. A team that can prove only that an mTLS connection existed at 3 a.m. cannot file a useful report within that window; it needs a parseable audit trail of every task object, skill invocation, and agent card access.

In healthcare, the HHS HIPAA Security Rule applies when agents handle protected health information. Adoption is already wide: the transcript says more than 85% of Epic's customers use Epic AI, and Epic's agent factory lets individual health systems build their own agents. An agent that queries another agent for a patient record without authorization is a potential violation executed at machine speed, and audit logs must show which skill was called and by whom. If an X-ray analysis agent passes findings to a clinical-note agent, that hop needs strict least-privilege policy; if a billing agent reaches the X-ray agent's card and pulls a radiology image without authorization, the violation can run across thousands of records before a human notices.

Frequently Asked Questions About the A2A Protocol

Is the A2A Protocol the same as MCP? No. A2A standardises agent-to-agent discovery and delegation, while MCP standardises how an agent connects to tools and data sources. A production deployment often uses both: A2A for the handoff between agents and MCP for the work each agent performs against back-end systems.

Does mTLS make A2A traffic safe by itself? mTLS proves workload identity and encrypts the connection, but it does not reveal which skill was invoked or what data was in the task payload. Governance needs protocol-aware inspection plus least-privilege policy, not encryption alone.

Where is the agent card published? Every A2A-compliant agent exposes its card at the well-known path /.well-known/agent-card.json. A client retrieves that JSON document to learn the agent's identity, endpoints, authentication requirements, and available skills.

Can agents be both clients and servers? Yes. Roles are assigned per interaction, so an agent that finishes a server-side task can immediately act as a client and delegate the next step to another agent in the chain.

What does HTTP 402 have to do with agents? The code means Payment Required, and x402 uses it so an agent can pay for an API call per invocation without a pre-provisioned API key. The server issues the 402 challenge, the client pays, and the request is retried with a receipt token.

Bring the Next Agent Architecture Episode Into Written Form

The governance gap in A2A is a useful reminder that the most valuable technical knowledge often sits inside long conversations, where the reasoning behind an architecture is explained step by step. If you have recorded that kind of explanation, it can reach more people as an article.

With Skala Blog, you paste a YouTube URL, the video is transcribed, and an article draft is generated from that transcript. The flow is YouTube video, then transcription, then article, so you can turn an episode into a written piece without starting from a blank page.

Gustavo dev doido has shown how much detail a single technical conversation can carry. A recording of that depth is already most of the research; Skala Blog gives it a written form.

Source video