token for a
plain API key, oauth for a consent grant. Matrices holds the secret and
attaches it when the tool runs, so the model only sees a connection label and a
tool result. The API never returns the secret.
Every connection has one owner. A workspace-owned connection serves every
agent; an identity-owned one serves only agents with that
identity. Roles authorize and connections authenticate: a
role can allow tool:managed:gmail.* and the call still fails
without an eligible connection, and a connection never widens a role. When more
than one is eligible, the agent picks with connections.select.
Most providers connect at a tier, read_only or full. For Google and Slack
the role sets the ceiling, so tool:managed:gmail@read caps Gmail at
read_only. connections.connect requires accessPreset, refuses anything
above the ceiling, and only ever raises a tier. Slack defaults to full, so
one connect covers later posts and DMs.
Status is ready, needs_reauth when the grant stopped working, or revoked;
revoking deletes the secret, then tries once to revoke it at the provider.
Plain tokens work for Linear, GitHub, and PostHog. Everything else needs OAuth,
started in the console or by connections.connect; there is no
server-to-server connect API.
Belongs to a workspace or one identity · Has one provider or toolset,
and a
kind (token | oauth) · Used by eligible agents onlyRules
- Roles authorize, connections authenticate. See Rules.
- Never pass a third-party secret through a prompt, tool input, or memory.
- Token writes are one-way; rotate with
expectedVersion.
API
GET/POST /v1/connections,GET /v1/connections/{connectionId},PUT …/token,POST …/revoke.GET /v1/agents/{agentId}/accountsfor readiness per product:ready,needs_reauth,missing,blocked, orunavailable.- Tiers per provider: Permissions. Walkthrough: Connect a service.