For developers
How an assistant connects to Agen Keys: one REST address, one access key.
How an assistant gets connected
The owner adds the assistant
In Agen Keys: Assistants → Add an assistant, then Copy message on the assistant’s Setup page. The message looks like this:
Setup message (example)Set up Agen Keys for me: https://keys.example/u/your-name/openapi.json Start with the x-agen-setup section in that file.
The assistant reads the owner’s address
The message points to the owner’s personal address,
/u/<slug>/openapi.json. Start with itsx-agen-setupsection: it has the full, current setup steps. Every assistant the owner adds uses this same address, each with its own key.The owner reveals the key when asked
The owner chooses Reveal access key and pastes the key into the chat or the assistant’s settings. Agen Keys shows it only once; if it gets lost, the owner removes the assistant and adds it again.
The assistant sends the key on every request
Every request to that address carries this header:
Authorization: Bearer <access key>There is no token exchange and the key does not expire. Removing the assistant in Agen Keys deletes its key, and the address stops accepting it.
Calling tools
GET /v1/tools- Lists what the assistant may use. It is also the connection check: an empty list means it is connected, but nothing is usable yet.
POST /v1/tools/call-tool- Every connector tool goes through here, with this body:
{"toolName": "…", "input": {…}} POST /v1/tools/<name>- Built-in tools, each at its own path. Sending one through
call-toolfails withtool_not_found.search-toolslist-connected-integrationslist-available-integrationsget-integration-auth-urlget-large-response get-integration-auth-url- Returns a link. The assistant gives it to the owner, who opens it to connect a service.
When a request fails
- 401
authentication_requiredassistant_removedgateway_errorAgen Keys no longer accepts this access key, most likely because the owner removed the assistant. Don’t retry and don’t guess why. Tell the owner what is quoted below. gateway_error can also come back as 403, 429 or 502, and the call may already have reached the gateway, so never retry a POST on your own; on 429, wait before any retry.
The assistant tells the owner, word for word: “Agen Keys isn't accepting my connection anymore; maybe I was removed there. Please add me again: open Agen Keys, go to Assistants, choose Add an assistant, and send me the new access key.”
- 503
verification_unavailableauth_verification_unavailableroute_store_unavailableAgen Keys couldn’t check the key right now; the key itself is fine and the call did not run. Wait a few seconds and retry, at most twice, then tell the owner Agen Keys isn’t answering.
- 504
delivery_unknownThe tool may have run, but its answer was lost. Never retry a POST automatically: check the result first, or tell the owner.
The openapi.json at the owner’s address is the source of truth; this page is a summary.