1. Grant the provider tools
Managed providers get a namespace like any other toolset, so a role grants them by name:2. Choose the owner
The owner decides which agents can use the connection:workspace: every agent in the workspace shares one login. Good for a bot account your whole product acts through.identity: only agents carrying that identity. Dana’s Linear login works for every agent acting for Dana, and no other agent can see it.
identity whenever the login belongs to a person. You set that value when
you created the agent, and it can’t change afterward.
3. Store the token
If the service authenticates with a plain API token, storing it is one request:identity here has to match the agent’s exactly: svc:research for this
one, email:[email protected] for an agent acting for Dana. Matrices encrypts
the token on the way in and never gives it back.
An OAuth provider has no token to paste. Connect from the dashboard, or let the
agent start the flow itself with the built-in connections.connect tool, which
needs tool:builtin:connections.connect in its role.
A server-to-server OAuth connect API is planned but not available yet. Token
connections and every management endpoint here work today.
4. Use it, and handle a broken login
Ask the agent to do something in Linear. Matrices finds a connection the calling agent is allowed to use and attaches the login to the outgoing request:needs_reauth, meaning someone has to sign in again. A
static token never changes state: it stays ready while the calls fail. So when
you know one is dead, replace it, naming the version you expect to overwrite:
POST /v1/connections/{connectionId}/revoke with its
expectedVersion.
Check it worked
ready row whose identity matches the agent’s means the login half is done.
The role is the other half, and you need both:
GET /v1/agents/{agentId}/effective-permissions should list the linear.*
tools.
Where next
Approve a tool call
Ask a human before the agent sends anything.
Run on a schedule
Have it check Linear every morning without you.