Skip to main content

[beta] Agents API

This page documents the 1 gateway endpoint tagged [beta] Agents in the gateway's OpenAPI document. Every example targets a gateway on http://localhost:4000 and authenticates with the SPANWAY_API_KEY environment variable, which holds the master key or a virtual key that has access to the route. Request and response fields are taken from the schema the running gateway publishes at /openapi.json, and the same document is bundled with this site as openapi.json.

MethodPathSummary
GET/public/agent_hubList the agents published on the AI hub

Endpoints​

GET /public/agent_hub​

List the agents published on the AI hub

List the agent cards an admin published with POST /v1/agents/make_public, in the A2A agent card format, so a developer can discover the agents and how to call them. Anyone may call it without a key while the AI hub is open, otherwise any valid key is needed. Nothing is changed.

Docs

Example request:

curl -X GET "http://localhost:4000/public/agent_hub" \
-H "Authorization: Bearer $SPANWAY_API_KEY"

Responses:

StatusDescriptionBody
200The published agent cards, an empty list when none are published.application/json array of AgentCard
401Authentication Error, No api key passed in.application/json ProxyError
429One address sent more requests to the public pages this minute than the gateway allows. Wait the number of seconds in Retry-After and try againapplication/json ErrorDetail