Identity and delegation
Every call an agent makes says two things: which person it is for, and which agent is making it. Neither is claimed by the agent. Both are in a token the identity provider issued.
A solid line is a call. A dashed line is a check against published keys, with no call.
Why it exists
An agent that acts with one shared service account can do whatever that account can, for anyone, and afterwards nobody can say who it was acting for. Giving each agent its user's own token is worse: the token sits in the agent's process for as long as it runs.
The answer is a third token. The identity provider takes the person's identity and the agent's identity and issues one token that names both. It is an on-behalf-of token, an OBO token: for this person, by this agent. That is the only thing the agent's side ever holds.
The path, step by step
| Party | What it does | |
|---|---|---|
| 1 | Person | Signs in once. With your own identity provider if the org has federated it, under your rules for passwords and second factors |
| 2 | Console | Keeps the sign-in and sends the person's token with each request |
| 3 | Tenant API | The way in. Verifies the person's token, then exchanges it at the identity provider for an OBO token that also names the agent |
| 4 | Runtime | Runs the agent in its sandbox. It holds the OBO token and nothing else: not the person's token, not a credential |
| 5 | AI gateway | The way out. Verifies the OBO token, checks that this agent, for this person, may make this call, then adds the credential only it holds |
| 6 | Outside | A model, an internal service or an external API gets a call it can attribute |
The identity provider
It is beside the path, not on it. It does three things.
| When | How | |
|---|---|---|
| Signs people in | Once per person | A call. It federates to your own provider where an org has one |
| Issues the OBO token | When a thread starts for a person | A call: a token exchange, as RFC 8693 defines it |
| Lets the AI gateway verify | On every model and tool call | No call. The AI gateway checks the token's signature against the keys the provider publishes |
So the provider is not in the way of every call, and an agent's call does not wait on it.
It knows each org's people, their roles, and the org's agents. An agent is an identity there in its own right, which is what lets a token name it.
The OBO token
Its claims are the ones RFC 8693 names.
| Claim | Example | Meaning |
|---|---|---|
sub | j.rivera | The person it is for |
act.sub | agent:credit-analyst | The agent acting |
aud | the org's AI gateway | Who may accept it |
scope | what was asked for, and no more than the person has | What it may be used for |
exp | minutes from now | When it stops working |
When one agent opens work for another, the earlier agent is kept inside act, so the chain can be read back: this agent, for that agent, for this person.
What it controls
- An agent can do no more than its person. The token's scope is what was asked for and what the person has, whichever is less.
- An agent can do no more than it was given. The AI gateway checks the agent against the connectors and tools it was granted.
- A person's own account is used only for that person. A connector a person connected for themselves is opened only by a token whose
subis that person. - Disabling a person stops their agents. A person removed at the identity provider gets no new token, so work that acts for them stops at its next step.
What never reaches the agent
| Where it stays | |
|---|---|
| The person's token | At the Tenant API. The runtime and the agent never hold it |
| A credential for a system | At the AI gateway. The agent and the model never see it |
| A key that signs tokens | At the identity provider |
What it leaves behind
Every step of a thread's record says who it was for and which agent acted, taken from the token and not from what the agent reported. "Who authorised this call" has one answer.
What always holds
- Every call names a person and an agent.
- The agent holds one short-lived token and no key.
- The AI gateway decides on what the token says, not on what the agent says.
- Least privilege is the smaller of two things: what the person may do, and what the agent was given.