Skip to main content
To act in an outside service, an agent needs two things: a role that grants the service’s tools, and a connection that holds the login. You’ll set up both for Linear. The model never sees the token.

1. Grant the provider tools

Managed providers get a namespace like any other toolset, so a role grants them by name:
Add it to the agent’s profile the way Narrow an agent’s permissions does. The agent can call the tools now, but every call fails until there’s a login behind them.

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.
Pick 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:
The 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:
Logins break in two different ways. When the provider rejects an OAuth grant, the connection flips to 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:
To kill a login for good, POST /v1/connections/{connectionId}/revoke with its expectedVersion.

Check it worked

A 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.