Skip to main content

A2A agents

The Agent-to-Agent (A2A) protocol lets applications and other agents call an agent by sending it messages and reading its agent card, a small JSON description of what the agent does. The gateway acts as an A2A server in front of agents you register, so every agent call is authenticated with a virtual key, logged, costed and governed like a model call, and the teams that call agents never need the agents' own credentials. Registered agents can be external A2A servers, agents built with frameworks such as Pydantic AI, LangFlow, Bedrock AgentCore or watsonx Orchestrate, or an LLM with tools that the gateway runs itself as a custom agent.

A real-world scenario​

A company runs a research assistant agent on an internal server. Three product teams want to call it from their own tools, finance wants to know what it costs per team, and security wants one place to switch it off. The platform team registers the agent once on the gateway, grants it to the three teams' keys, and from then on every call shows up on the Logs page with its team and spend, and the kill switch stops it in one click.

Before you start​

  • An agent that speaks A2A, or one of the agent kinds listed in step 1, reachable from the gateway over HTTP or HTTPS.
  • A gateway with a database, because registered agents are stored there, and a proxy admin login for the Admin UI.
  • For each application that will call the agent, a virtual key made as in the next section.

Make a key for the calling application​

Give each calling application its own key, so its agent calls, spend and limits stay separate and one caller can be cut off without touching the others.

  1. In the Admin UI open Virtual Keys (/ui/api-keys) and click + Create New Key.
  2. Under Key Details, set Key Name to the calling app, for example ops-portal-research. Leave Key Type on AI APIs, so the key can call agents and models but cannot change the gateway.
  3. In Models, pick the models the application also calls directly with this key, for example claude-haiku-5-5 for its own short summaries. An empty Models list lets the key call every model, so pick at least one.
  4. Open Optional Settings, then Agent Settings, and under Allowed Agents pick the agent. Register the agent first, as in step 1 below, if it is not listed yet.
  5. In Optional Settings, set Max Budget (USD) with Reset Budget, for example 200 USD monthly, and Requests per minute Limit (RPM), for example 30, so a caller stuck in a loop cannot run up the agent's cost.
  6. Click Create Key and copy the key. It is shown once.

The same key from the API, with the master key or a proxy admin's key. Use the agent_id that Agents shows for the agent:

curl -X POST https://gateway.example.com/key/generate \
-H "Authorization: Bearer $SPANWAY_MASTER_KEY" -H "Content-Type: application/json" \
-d '{"key_alias": "ops-portal-research", "key_type": "llm_api", "models": ["claude-haiku-5-5"], "object_permission": {"agents": ["<agent_id>"]}, "max_budget": 200, "budget_duration": "30d", "rpm_limit": 30}'

The answer carries the new key in key. Make a key for a tool explains the other fields.

Steps​

  1. Register the agent. In the Admin UI open Agents under Agentic, click Add New Agent, fill the Configure step with the agent name, description and URL, pick who may call it on the Entitlements step, set limits on the Governance step and click Create Agent. Or register it from the API or from config.yaml as shown below.

    curl -X POST http://localhost:4000/v1/agents -H "Authorization: Bearer $SPANWAY_API_KEY" -H "Content-Type: application/json" \
    -d '{
    "agent_name": "research-assistant",
    "agent_card_params": {"name": "Research assistant", "description": "Finds and summarises internal documents", "url": "https://agents.internal.example.com/research", "version": "1.0.0"},
    "spanway_params": {"custom_llm_provider": "a2a", "api_key": "os.environ/RESEARCH_AGENT_KEY"}
    }'

    The custom_llm_provider value tells the gateway how to talk to the agent. Use a2a for any server that speaks A2A itself, pydantic_ai_agents for a Pydantic AI agent, langflow for a LangFlow flow, watsonx_orchestrate for a watsonx Orchestrate agent, and bedrock with a model that contains agentcore for a Bedrock AgentCore runtime.

  2. Grant the agent to a key or team with object_permission.agents on the Virtual Keys or Teams page, or pick the teams on the Entitlements step of the dialog.

  3. From the calling application, read the agent card and send a message.

    curl http://localhost:4000/a2a/research-assistant/.well-known/agent-card.json -H "Authorization: Bearer $SPANWAY_API_KEY"

    curl -X POST http://localhost:4000/a2a/research-assistant/message/send \
    -H "Authorization: Bearer $SPANWAY_API_KEY" -H "Content-Type: application/json" \
    -d '{"jsonrpc": "2.0", "id": "1", "method": "message/send", "params": {"message": {"role": "user", "parts": [{"kind": "text", "text": "Summarise the open incidents"}], "messageId": "msg-1"}}}'
  4. Open Logs in the Admin UI to see the call with its key, team, tokens and spend, and open Usage with the Agent Usage (A2A) view for the per agent totals.

Expected result​

The create call answers 200 with the agent record and its agent_id. The card request returns the agent card JSON, and the message call returns the agent's JSON-RPC response, or a stream of events for message/stream. The Agents page lists the agent with an Active badge once a key is bound to it, and its Spend (USD) column grows with every call.

Registering an agent​

agents:
- agent_name: research-assistant
agent_card_params:
name: Research assistant
description: Finds and summarises internal documents
url: https://agents.internal.example.com/research
version: "1.0.0"
spanway_params:
custom_llm_provider: a2a
api_key: os.environ/RESEARCH_AGENT_KEY

agent_card_params holds the A2A agent card the gateway publishes, and spanway_params says how to reach the agent. Agents can also be created from the Agents page of the Admin UI or with POST /v1/agents, in which case they are stored in the database.

MethodPathSummary
GET/v1/agentsList the agents the caller can reach
POST/v1/agentsRegister an agent
GET/v1/agents/{agent_id}Read one agent
PUT/v1/agents/{agent_id}Replace an agent
PATCH/v1/agents/{agent_id}Change some fields of an agent
DELETE/v1/agents/{agent_id}Delete an agent

Framework agents​

An agent built with a framework does not always speak A2A itself, so the gateway has an adapter per framework. Pick the framework in the Agent Type dropdown of Add New Agent, which shows the fields below, or set the same values in spanway_params. The gateway then translates A2A messages into the framework's own API and back, so callers use the same /a2a/<agent name> routes for every agent.

Agent Type in the Admin UIcustom_llm_providerFields to fillmodel the gateway builds
A2A Standarda2aThe agent URL in the card, and api_key when the agent needs one.None.
Pydantic AIpydantic_ai_agentsAgent URL (api_base), the address of the agent's A2A server.None.
LangGraphlanggraphAssistant ID, LangGraph API Base (api_base) and an optional LangGraph API Key (api_key).langgraph/<assistant id>
LangFlowlangflowFlow ID, LangFlow API Base (api_base) and an optional LangFlow API Key (api_key), sent as x-api-key.langflow/<flow id>
Bedrock AgentCorebedrockAgent Runtime ARN, in the form arn:aws:bedrock-agentcore:<region>:<account>:runtime/<id>. AWS credentials come from the gateway's Bedrock credentials.bedrock/agentcore/<runtime arn>
Azure AI Foundryazure_aiAgent ID, Azure AI API Base (api_base), and either an Azure AD Token (api_key) or Azure Tenant ID, client id and client secret for a service principal.azure_ai/agents/<agent id>
Vertex AI Agent Enginevertex_aiReasoning Engine Resource ID, in the form projects/<n>/locations/<region>/reasoningEngines/<id>. Google credentials come from the gateway's Vertex AI credentials.vertex_ai/agent_engine/<id>
watsonx Orchestratewatsonx_orchestrateCP4D Host URL (cp4d_host), WXO Instance ID (instance_id), WXO Agent ID (wxo_agent_id), Authentication Mode (auth_mode, cp4d or ibm_cloud), username for cp4d, and api_key.None.

Every type also takes Cost Per Query ($), Input Cost Per Token ($) and Output Cost Per Token ($) under Cost Configuration, stored as cost_per_query, input_cost_per_token and output_cost_per_token. Set one of them when the agent calls its own models outside the gateway, or its calls show on Logs with no cost. An agent whose own model calls go through the gateway with a virtual key is costed on those calls already.

A Pydantic AI agent becomes an A2A server with the fasta2a bridge, which needs Pydantic AI 2 and replaces the removed Agent.to_a2a().

from pydantic_ai import Agent
from pydantic_ai.models.openai import OpenAIChatModel
from pydantic_ai.providers.openai import OpenAIProvider
from fasta2a.pydantic_ai import agent_to_a2a

provider = OpenAIProvider(base_url="https://gateway.example.com/v1", api_key="sk-agent-own-key")
agent = Agent(OpenAIChatModel("claude-sonnet-5-5", provider=provider), instructions="You summarise internal documents.")
app = agent_to_a2a(agent)

Run it with pip install "fasta2a[pydantic-ai]" uvicorn and uvicorn main:app --port 9999, then register it.

agents:
- agent_name: doc-summariser
agent_card_params:
name: Document summariser
description: Summarises internal documents
url: http://doc-summariser.internal:9999
version: "1.0.0"
spanway_params:
custom_llm_provider: pydantic_ai_agents
api_base: http://doc-summariser.internal:9999

A LangGraph deployment is registered the same way through the API.

curl -X POST https://gateway.example.com/v1/agents -H "Authorization: Bearer $SPANWAY_MASTER_KEY" -H "Content-Type: application/json" \
-d '{
"agent_name": "orders-graph",
"agent_card_params": {"name": "Orders graph", "description": "Answers order questions", "url": "https://langgraph.internal.example.com", "version": "1.0.0"},
"spanway_params": {"custom_llm_provider": "langgraph", "model": "langgraph/agent", "api_base": "https://langgraph.internal.example.com", "api_key": "os.environ/LANGGRAPH_API_KEY"}
}'

Calling an agent​

curl http://localhost:4000/a2a/research-assistant/.well-known/agent-card.json \
-H "Authorization: Bearer $SPANWAY_API_KEY"

curl -X POST http://localhost:4000/a2a/research-assistant/message/send \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": "1",
"method": "message/send",
"params": {"message": {"role": "user", "parts": [{"kind": "text", "text": "Summarise the open incidents"}], "messageId": "msg-1"}}
}'
MethodPathSummary
POST/a2a/{agent_id}Send a message to an agent (JSON-RPC)
GET/a2a/{agent_id}/.well-known/agent-card.jsonRead an agent's card
GET/a2a/{agent_id}/.well-known/agent.jsonRead an agent's card (older path)
POST/a2a/{agent_id}/message/sendSend a message to an agent (JSON-RPC)
POST/v1/a2a/{agent_id}/message/sendSend a message to an agent (JSON-RPC)
POST/v1/a2a/discoverFetch an upstream agent's card

The gateway returns the agent's JSON-RPC response, or streams events for message/stream.

The gateway serves the same agent at three addresses, /a2a/<agent name>, /a2a/<agent name>/message/send and /v1/a2a/<agent name>/message/send, and its card at both /.well-known/agent-card.json and the older /.well-known/agent.json. The card's url is rewritten to the gateway's own address, so an A2A client that reads the card and follows its url keeps going through the gateway. message/send and message/stream are the main methods.

Supported methods and protocol versions​

The gateway speaks two versions of the A2A protocol and translates between them, so an older client can call a newer agent and the other way round.

Method (A2A 0.3 name)A2A 1.0 nameWhat it does
message/sendSendMessageSends a message and answers the agent's reply.
message/streamSendStreamingMessageSends a message and streams the agent's events as server-sent events.
tasks/getGetTaskReads a task the agent is working on.
tasks/listListTasksLists the agent's tasks.
tasks/cancelCancelTaskAsks the agent to stop a task.
tasks/resubscribeSubscribeToTaskStreams the events of a running task again, for example after a dropped connection.
tasks/pushNotificationConfig/set, get, list, deleteCreateTaskPushNotificationConfig and the othersManages the address the agent calls when a task changes. The address must be a public HTTPS URL, or the call answers 400 Push notification URL must use HTTPS.
agent/getAuthenticatedExtendedCardGetExtendedAgentCardReads the agent's extended card.

The agent card's protocolVersion decides first, so an agent pinned to 0.3 or 1.0 is always served in that version. For an agent that pins none, the gateway answers in 1.0 when the request uses a 1.0 method name or the caller sends the a2a-version: 1.x header, and in 0.3 otherwise. It converts the request and the answer between the two shapes on the way. To read a task with curl:

curl -X POST http://localhost:4000/a2a/research-assistant \
-H "Authorization: Bearer $SPANWAY_API_KEY" -H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "id": "2", "method": "tasks/get", "params": {"id": "<task id>"}}'

Expected result: the agent's task with its status and history, as a JSON-RPC result. An unknown method answers 400 with the JSON-RPC code -32601 and Method '<name>' not found.

Calling from code​

Any HTTP client works, because an A2A call is one JSON-RPC POST with the key in Authorization.

import os, uuid, httpx

body = {
"jsonrpc": "2.0", "id": "1", "method": "message/send",
"params": {"message": {"role": "user", "parts": [{"kind": "text", "text": "Summarise the open incidents"}], "messageId": str(uuid.uuid4())}},
}
answer = httpx.post(
"https://gateway.example.com/a2a/research-assistant",
headers={"Authorization": f"Bearer {os.environ['SPANWAY_API_KEY']}"},
json=body, timeout=120,
)
print(answer.status_code, answer.json())

The A2A Python SDK reads the card and sends messages for you. Give it an httpx.AsyncClient that carries the key, created with httpx.AsyncClient(headers={"Authorization": f"Bearer {key}"}, timeout=120), pass that client to A2ACardResolver with base_url="https://gateway.example.com/a2a/research-assistant", and build the client from the card it returns.

An agent framework that only speaks the OpenAI format can call a registered agent as a model named a2a/<agent name> on /v1/chat/completions, with the same key and the same grants.

curl https://gateway.example.com/v1/chat/completions -H "Authorization: Bearer $SPANWAY_API_KEY" -H "Content-Type: application/json" \
-d '{"model": "a2a/research-assistant", "messages": [{"role": "user", "content": "Summarise the open incidents"}]}'

In LangChain, for example, that is ChatOpenAI(model="a2a/research-assistant", base_url="https://gateway.example.com/v1", api_key=...), see agent frameworks.

While registering an agent, a proxy admin can call POST /v1/a2a/discover with {"url": "https://agent.example.com"} to fetch that upstream agent's well-known card and see its skills and capabilities. The fetch goes through the SSRF guard on user supplied URLs, so private, loopback and metadata addresses are refused unless user_url_validation is turned off. Any other role gets a 403.

A LangGraph Platform deployment serves one card for all its assistants and tells them apart by a query parameter. Discover it with discovery_mode set to langgraph_platform and the assistant id in params:

curl -X POST http://localhost:4000/v1/a2a/discover \
-H "Authorization: Bearer $SPANWAY_MASTER_KEY" -H "Content-Type: application/json" \
-d '{"url": "https://langgraph.example.com", "discovery_mode": "langgraph_platform", "params": {"assistant_id": "support-agent"}}'

The gateway then fetches /.well-known/agent-card.json?assistant_id=support-agent. Without params.assistant_id it answers 400 langgraph_platform discovery requires params.assistant_id. The default well_known_fallback tries the standard well-known card paths in turn.

Access control and limits​

Agents are granted to keys and teams through object_permission.agents. Each agent can carry tpm_limit, rpm_limit and per-session limits, and a kill switch that an admin can trigger to stop an agent immediately. Agents can be published to the AI hub with /v1/agents/make_public, or one at a time with POST /v1/agents/{agent_id}/make_public or the AI hub card on the agent's page in the Admin UI. Publishing is proxy admin only and makes the agent card, with its name, description, skills and A2A address, readable at /public/agent_hub by anyone who can reach the gateway without a key, so the Admin UI asks for confirmation first. Calling the agent still needs a key granted it.

Default deny​

A key reaches an agent only when a rule grants it, through object_permission.agents or an agent access group on the key or its team, or because the agent is a custom agent owned by the caller's user, team or organization. When no rule matches, or the grant lookup fails, the call is refused with a 403. Proxy admins are not affected.

Default deny is on by default because it keeps a newly added agent away from every key until someone grants it. To go back to the older behavior, where a key and team with no agent grants at all could call every agent, turn the default off in spanway_settings. Keys or teams that do have grants stay limited to them either way. The setting can also be changed without a restart through /config/update, and the settings reference lists it.

spanway_settings:
agent_access_default_deny: false

Who can use it​

The agent registry and A2A are free. That covers registering agents, their agent cards, calling them over A2A, enabling and disabling them, their overall rpm_limit and tpm_limit and their spend. Per-session limits, required trace ids, identity provider binding and the kill switch need a license with the agent_governance feature, described in agent governance. Agents the gateway runs itself are custom agents and need the custom_agents feature. A2A, the agent card and a2a/<agent name> routing follow a custom agent's visibility, so an organization agent answers as not found to anyone outside its organization, and one that belongs to no organization answers that way to everyone except proxy admins and admin viewers.

Only proxy admins can register, edit or delete agents, discover a card or fire the kill switch. In the Admin UI admin viewers, org admins and internal users see the Agents page without the Add New Agent button, the actions column or the danger zone. On a gateway without agent_governance the governance fields and the kill switch show a note that they need an enterprise license instead of failing on save. For example, a proxy admin on a free gateway can still set an agent's RPM Limit, while Session RPM Limit stays locked.

Tracing​

Agent calls produce traces with spans for each model call and tool use, available from the /v1/traces endpoints and in the Admin UI, and in Lens when it is deployed. Spend is attributed to the agent as well as the key.

Providers​

The gateway's endpoint support matrix marks 108 provider integrations as supporting this endpoint:

AI21, AI21 Chat, AI/ML API, Amazon Nova, Anthropic, Anthropic Text, AssemblyAI (assemblyai), Auto Router (auto_router), Azure, Azure AI, Azure AI Foundry Agents, Azure Text, Baseten, AWS - Bedrock, Bytez, Cerebras, Clarifai, Cloudflare AI Workers, Codestral, Cohere, Cohere Chat, CometAPI, CompactifAI, Crusoe (crusoe), Cursor BYOK, Custom, Custom OpenAI (custom_openai), Dashscope, Databricks, DataRobot, Deepgram, DeepInfra, Deepseek, Docker Model Runner, ElevenLabs, Empower, Fal AI, Featherless AI, Fireworks AI, FriendliAI, Galadriel, Google AI Studio - Gemini, GitHub Models, GitHub Copilot, GMI Cloud, GradientAI, Groq AI, Heroku, Hosted VLLM, Huggingface, Hyperbolic, Inception (inception), Lambda AI, LangFlow (langflow), LangGraph, Lemonade, Llamafile, LM Studio, Manus, Maritalk, Meta - Llama API, Mistral AI API, Moonshot, Morph, Nebius AI Studio, NLP Cloud, Novita AI (novita), Nscale, Nvidia NIM, OCI, Ollama, Ollama Chat, Oobabooga (oobabooga), OpenAI, OpenRouter, OVHCloud AI Endpoints, Perplexity AI, Petals, Predibase, PublicAI, Pydantic AI Agents, Qianwen AI Platform, QwenCloud, RAGFlow, Replicate, AWS - Sagemaker, Sagemaker Chat, Sambanova, SAP Generative AI Hub, Scaleway, Snowflake, Spanway Proxy, Text Completion Codestral, Text Completion OpenAI, Together AI, Triton, V0, Venice.ai, Vercel AI Gateway, Google - Vertex AI, Vertex AI Agent Engine, VLLM, Volcengine, WandB Inference, IBM - Watsonx.ai, Watsonx Text, xAI, Z.AI (Zhipu AI).

Errors​

Errors from the key check, the grant check and the management routes come back with an HTTP status and a detail text. Most errors on a message call come back as a JSON-RPC error with a matching HTTP status, {"jsonrpc": "2.0", "id": "1", "error": {"code": -32000, "message": "..."}}. The codes are -32600 for a body that is not JSON-RPC 2.0, -32601 for an unknown method, -32602 for bad params, -32000 for an agent that is missing or not set up and -32603 for a failed agent call.

StatusTextWhat it meansFix
401Authentication Error, No api key passed in. or Authentication Error, Invalid proxy server token passedThe call carried no key, or a wrong, blocked or deleted one.Send Authorization: Bearer <virtual key>.
403 on a call to the agentAgent '<agent>' is not allowed for your key/team. Contact proxy admin for access.The key and its team are granted no agent, or not this one, and default deny applies.Grant the agent through object_permission.agents or an access group.
403 on POST /v1/agents or /v1/a2a/discoverAn admin only messageOnly proxy admins register agents or discover cards.Use a proxy admin key.
404Agent '<agent>' not found, as detail on the card route and as a JSON-RPC error on a messageNo agent with that name or id is visible to the caller. A custom agent outside your organization answers this way too.Check the name on the Agents page.
404 on the cardAgent '<agent>' has no agent card configuredThe agent was registered without agent_card_params.Edit the agent and fill in the card.
404 on a wrong pathNot FoundThe address has a typo, or a client added /v1 to a path that has none, such as /v1/a2a/<agent> without /message/send.Use one of the three addresses above.
400 with model a2a/<agent>Invalid model name passed in model=a2a/<agent>The agent behind the name is not registered or not visible to the key.Check the name on the Agents page.
429Rate limit exceeded for <scope>: <value>.The agent's rpm_limit, tpm_limit or a per-session limit was reached.Raise the limit on the agent or wait for the window to pass.
400 -32600Invalid Request: jsonrpc must be '2.0'The body is not a JSON-RPC 2.0 request.Send "jsonrpc": "2.0", an id and a method.
400 -32601Method '<name>' not foundThe method is not one the gateway passes on.Use a method from supported methods.
400 -32602Invalid params: ...The params do not fit the method, for example a message without parts.Fix the params the message names.
400Push notification URL must use HTTPSA push notification address is not a public HTTPS URL.Use an https:// address the gateway may reach.
400 on POST /v1/agentsAgent with name <name> already existsAnother agent has that name.Pick another name, or edit the existing agent.
403 on POST /v1/agents or PATCHThe 'agent_governance' feature needs a Spanway enterprise license that includes it. It covers <fields>.The agent turns on a governance control the license lacks.Add the feature, or leave the controls off.
403Invoked agent is disabledThe agent was disabled, by an admin or the kill switch.Re-enable it on the Agents page.
503Managed agent policy requires a database or Agent policy could not be loadedThe agent is bound to an identity and the gateway could not read its policy.Check the database connection.
400Agent '<agent_id>' requires x-spanway-trace-id header on all inbound requests.The agent has require_trace_id_on_calls_to_agent on, so every call must carry a trace or session id.Send x-spanway-trace-id. x-spanway-session-id or a vendor session header such as x-claude-code-session-id is accepted too, although the message names only the trace header.
500Agent '<agent>' has no URL configuredAn A2A Standard agent has no url in its card.Edit the agent and set the URL.
500 -32603Internal error: the agent call failed. The gateway log has the cause.The upstream agent failed, timed out or could not be reached. A failed stream ends with the same error as its last event, Streaming error: the agent stream failed. The gateway log has the cause.Read the Error invoking agent line in the gateway log, then check the agent URL and credentials in spanway_params and the agent's own logs.
400 or 500 on /v1/a2a/discoverCould not fetch agent card from <url> ... Last error: ... (400) or Discovery failed. The gateway log has the cause. (500)The card could not be fetched from any well-known path, or the address was refused by the SSRF guard, or discovery failed unexpectedly.Check the address from the gateway's network and read the Unexpected error during A2A discovery log line for a 500.
No answerConnection refused, CERTIFICATE_VERIFY_FAILED or a timeout in the callerThe caller cannot reach the gateway.Work through connection problems.

Logs​

LevelLineMeaningAction
INFOProxying A2A request to agent '<agent>' at <url>The gateway is calling the agent at this address.None, it helps compare with the agent's own logs.
DEBUGA2A request for agent '<agent>': method=<method> id=<id>A message call arrived. The message text is never logged.None.
ERRORError invoking agent: ...The call to the agent failed, and the caller got the -32603 internal error.Read the cause after the colon.
ERRORError streaming A2A response: ...A stream from the agent failed part way.Same as above.
ERRORUnexpected error during A2A discovery: ...Card discovery failed unexpectedly.Read the cause after the colon.
WARNINGFailed to register agent '<name>' (ID: <id>) in memoryThe agent was saved but this replica did not load it, so it may answer not found until the next reload.Wait for the periodic reload, or restart the replica.
ERRORAgent '<name>' in config.yaml sets <controls> ... Those controls are not enforced.A config.yaml agent turns on governance controls the license lacks.Add agent_governance, or remove the controls.
WARNINGAgent health check gather timed out after <n> secondsThe Health Check switch ran out of time, see SPANWAY_AGENT_HEALTH_CHECK_GATHER_TIMEOUT.Raise the timeout or check the slow agents.

Audit​

Every change to an agent is in the audit log.

Actiontable_nameobject_idWhen
created, updated, deletedSpanway_AgentsTableThe agent idAn agent is registered, edited or removed, with the agent before and after and secrets redacted.
kill_switch_firedSpanway_AgentsTableThe agent idThe kill switch fired, with the whole result.
blocked or deletedSpanway_VerificationTokenThe key hashOne row per key the kill switch blocked or deleted.
updatedSpanway_Configpublic_agent_groupsAn agent was published to the AI hub or taken off it.
curl "http://localhost:4000/audit?table_name=Spanway_AgentsTable" -H "Authorization: Bearer $SPANWAY_ADMIN_KEY"

Agent credentials, header values and the kill switch secret are stored encrypted with the gateway's salt key and never appear in the audit log.

Troubleshooting​

  1. Open Logs, filter by the caller's Key Alias or set Span Type to Agent, and open the row. The drawer shows the agent, the status and the agent's answer or error. No row means the call never reached the gateway, so check the address, network and TLS on the caller's side.
  2. Fetch the card with the same key, curl https://gateway.example.com/a2a/<agent>/.well-known/agent-card.json -H "Authorization: Bearer $SPANWAY_API_KEY". A 403 or 404 here explains a failing client without touching the agent.
  3. When the gateway reached the agent but the agent failed, the gateway log shows Proxying A2A request to agent '<agent>' at <url> with the address it used, and the timeout is DEFAULT_A2A_AGENT_TIMEOUT seconds. Compare it with the agent's own logs.
  4. While registering, POST /v1/a2a/discover with the agent's address shows the card the gateway sees, including its skills.

Rotate or remove access​

Callers reach agents with their own virtual keys, so rotating a caller's key is the usual key rotation, see make a key for a tool. The agent's own credential is the api_key in spanway_params. Keep it as os.environ/<NAME>, change the secret and restart the gateway, or edit the agent on the Agents page and save a new value. To stop one caller, remove the agent from that key's or team's grants. To stop the agent for everyone, disable it on the Agents page, or fire the kill switch where agent_governance is licensed.