For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.
Connect to an agent
Route to A2A servers and securely expose their skills through agentgateway.
With agentgateway, you can route to agent-to-agent (A2A) servers and expose their tools securely.
Before you begin
Install and set up an agentgateway proxy.Get the agentgateway address.
export INGRESS_GW_ADDRESS=$(kubectl get gateway agentgateway-proxy -n agentgateway-system -o=jsonpath="{.status.addresses[0].value}") echo $INGRESS_GW_ADDRESSGet the agent card through agentgateway. Agentgateway rewrites the
urlfield in the card so that clients send requests to the gateway instead of the agent.curl http://$INGRESS_GW_ADDRESS/myagent/.well-known/agent.json | jqExample output: The
urlfield points to the/myagentpath on the gateway, not to the agent’s own address. The host inurlmatches the address that you sent the request to, such as the load balancer address. Agentgateway also rewrites the agent card that the agent serves at/.well-known/agent-card.json, if your agent uses A2A v0.3.0 or later.{ "name": "Echo Agent", "description": "This agent echos the input given", "url": "http://localhost:8080/myagent", "version": "0.1.0", "capabilities": { "streaming": true, "pushNotifications": false, "stateTransitionHistory": false }, "defaultInputModes": [ "text" ], "defaultOutputModes": [ "text" ], "skills": [ { "id": "my-project-echo-skill", "name": "Echo Tool", "description": "Echos the input given", "tags": [ "echo", "repeater" ], "examples": [ "I will see this echoed back to me" ], "inputModes": [ "text" ], "outputModes": [ "text" ] } ] }As a user, send a request to the A2A server. As an assistant, the agent echoes back the message that you sent.
curl -X POST http://$INGRESS_GW_ADDRESS/myagent \ -H "Content-Type: application/json" \ -v \ -d '{ "jsonrpc": "2.0", "id": "1", "method": "tasks/send", "params": { "id": "1", "message": { "role": "user", "parts": [ { "type": "text", "text": "hello gateway!" } ] } } }' | jqExample output:
{ "jsonrpc": "2.0", "id": "1", "result": { "id": "1", "message": { "role": "assistant", "parts": [ { "type": "text", "text": "hello gateway!" } ] } } }
Cleanup
You can remove the resources that you created in this guide.kubectl delete Deployment a2a-agent --ignore-not-found
kubectl delete Service a2a-agent --ignore-not-found
kubectl delete HTTPRoute a2a --ignore-not-found
kubectl delete AgentgatewayBackend a2a-backend --ignore-not-found