> ## Documentation Index
> Fetch the complete documentation index at: https://auth0.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tokens and Claims

> Learn what your apps and APIs receive during a Poppy Session, including the Poppy-Session header, the agent's access token, and the web application tokens Auth0 issues after a browser join.

> [!WARNING]
>
> **The Support for Personal Agent Protocol (Poppy) feature is in [Beta](https://auth0.com/docs/troubleshoot/product-lifecycle/product-release-stages.md).**
>
> By using this feature, you agree to the applicable Free Trial terms in Okta's [Master Subscription Agreement](https://www.okta.com/legal).

When a personal agent works with your company, your API and web application receive different artifacts. This article describes each one and how to tell who is acting.

| Where | Signed out | Signed in |
| - | - | - |
| Your API | A `Poppy-Session` header | A `Poppy-Session` header and an access token issued to the agent |
| Your web app, after a browser join | A guest ID token and access token, with the agent in `act` | The user's ID token and access token, with agent information in `act` |

The Auth0 SDKs verify these for you. To learn more, read [Add Personal Agent Protocol to Your API](https://auth0.com/docs/ai-agents-mcp/personal-agents/add-to-your-api.md) and [Add Personal Agent Protocol to Your Web App](https://auth0.com/docs/ai-agents-mcp/personal-agents/add-to-your-web-app.md).

## The `Poppy-Session` header

The agent signs a new `Poppy-Session` JWT for every request to your API. Each JWT is signed with a short-lived delegation key. To show that the agent authorized this key, the JWT's `poppy_dlg` header carries a delegation: a statement, signed with one of the agent's long-term keys, that vouches for the delegated key. The agent publishes its long-term keys at the `jwks_uri` in its metadata document.

The following example shows the JWT payload:

```json theme={null}
{
  "iss": "https://agent.example/agent.json",
  "aud": "https://auth.example.com/",
  "sid": "Yx2b7Qd_Kp8mR3vT1nWc4A",
  "sub": "usr_Q7c1vK",
  "agent_id": "shopping",
  "htm": "POST",
  "htu": "https://api.example.com/orders/ord_7Hk2/exchanges",
  "iat": 1790900000,
  "jti": "e1j3V_bKic8-LAEBq7Rw2g",
  "ath": "fUHyO2r2Z3DZ53EsNrWBb0xWXoaNy59IiKCAqksmQEo"
}
```

| Claim | Description |
| - | - |
| `iss` | The agent's CIMD URL, which is its `client_id` |
| `aud` | Your Auth0 issuer, exactly as Auth0 publishes it |
| `sid` | The Poppy Session ID the agent chose. It is not an Auth0 session ID |
| `sub` | The User ID the agent gave its user for your company. It isn't an Auth0 user ID |
| `agent_id` | Optional. The Poppy Agent ID: the individual agent instance that is interacting, such as `shopping`. It is not an Auth0 agent ID |
| `htm`, `htu` | The method and URL the JWT was signed for |
| `iat`, `jti` | When it was signed, and a unique ID |
| `ath` | Present only when the request carries an access token: the token's SHA-256 hash, which binds the two |

On its own, the header grants only anonymous, signed-out access. To act on the user's account, the request also needs a valid access token. Treat the header as a credential and don't log it.

## The agent's access token

After Direct Sign-In, the agent receives an access token for your API. The examples on this page show an agent application linked to an [agent](https://auth0.com/docs/ai-agents-mcp/agent-as-principal.md), with [agent subject claims](https://auth0.com/docs/ai-agents-mcp/agent-as-principal/agent-identity-in-tokens.md) enabled, which is what the Auth0 CLI sets up. The user is the subject and the agent is the actor. The following example uses the RFC 9068 token profile:

```json theme={null}
{
  "iss": "https://auth.example.com/",
  "sub": "auth0|64f1c0a2b3",
  "aud": "https://api.example.com",
  "iat": 1793624075,
  "exp": 1793631275,
  "scope": "orders:read orders:write poppy:browser-sign-in",
  "act": {
    "sub": "agt_gZameUasxQq5wLiFTW7rxF",
    "sub_profile": "ai_agent",
    "client_id": "tpc_4fR8kLm2QwZx7NbV1sYt3P",
    "iss": "https://auth.example.com/"
  },
  "client_profile": "web_app ai_agent",
  "sub_profile": "user",
  "jti": "bSJatebZc4RCFm6nCnevbA",
  "client_id": "https://agent.example/agent.json"
}
```

The top-level `client_id` is the agent's CIMD URL. With the Auth0 token profile, it's in `azp` instead. `act.client_id` is the Auth0 client ID of the agent's application.

The agent sends it with the `Poppy-Session` header. If the token is DPoP-bound, the request also carries a DPoP proof. To learn more, read [Demonstrating Proof-of-Possession](https://auth0.com/docs/secure/sender-constraining/demonstrating-proof-of-possession-dpop.md).

## Web app tokens after a browser join

At the end of a browser join, your web application runs a normal login and receives an ID token and access token. For guest and signed-in joins, the ID and access tokens carry an `act` claim that names the agent and its Session. The `poppy_*` values come from the agent, not from Auth0:

| `act` member | Set by | Description |
| - | - | - |
| `sub` | Auth0 | The Auth0 agent ID of the agent's application |
| `sub_profile` | Auth0 | `ai_agent` |
| `client_id` | Auth0 | The Auth0 client ID of the agent's application |
| `iss` | Auth0 | Your issuer |
| `poppy_sid` | The agent | The Poppy Session ID. It is not an Auth0 session ID, and it stays the same when a guest signs in |
| `poppy_user_id` | The agent | The Poppy User ID the agent gave its user for your company. It is not an Auth0 user ID |
| `poppy_agent_id` | The agent | The Poppy Agent ID. It appears in the ID and access tokens, signed in or out, only when the agent sends one. It is not an Auth0 agent ID |

If the agent's application isn't linked to an agent, `act.sub` is the agent's CIMD URL, and `act` has no `sub_profile`, `client_id`, or `iss`. Link your agents to get the full actor information. The Auth0 CLI links the agents it registers.

### Signed-in join

The subject is the user. The **ID token** is a regular Auth0 ID token for the user, with the user's profile claims, that also includes the `act` claim:

```json theme={null}
{
  "nickname": "jane.doe",
  "name": "jane.doe@example.com",
  "picture": "https://example.com/avatars/jane.png",
  "updated_at": "2026-11-16T13:10:13.930Z",
  "email": "jane.doe@example.com",
  "email_verified": true,
  "iss": "https://auth.example.com/",
  "aud": "WEB_APP_CLIENT_ID",
  "sub": "auth0|64f1c0a2b3",
  "iat": 1793624075,
  "exp": 1793631275,
  "sid": "AUTH0_SESSION_ID",
  "nonce": "NONCE",
  "act": {
    "sub": "agt_gZameUasxQq5wLiFTW7rxF",
    "sub_profile": "ai_agent",
    "client_id": "tpc_4fR8kLm2QwZx7NbV1sYt3P",
    "iss": "https://auth.example.com/",
    "poppy_sid": "g4B43922Ut9eOkjgDb7xFA",
    "poppy_user_id": "n9YYwSTyEXoeF1tr3Yr_-A",
    "poppy_agent_id": "shopping"
  }
}
```

The **access token** is limited to the API and scopes of the agent's own access token, and never includes `poppy:browser-sign-in`:

```json theme={null}
{
  "iss": "https://auth.example.com/",
  "sub": "auth0|64f1c0a2b3",
  "sub_profile": "user",
  "aud": ["https://api.example.com", "https://auth.example.com/userinfo"],
  "azp": "WEB_APP_CLIENT_ID",
  "scope": "openid orders:read orders:write",
  "iat": 1793624075,
  "exp": 1793631275,
  "client_profile": "web_app",
  "act": {
    "sub": "agt_gZameUasxQq5wLiFTW7rxF",
    "sub_profile": "ai_agent",
    "client_id": "tpc_4fR8kLm2QwZx7NbV1sYt3P",
    "poppy_sid": "g4B43922Ut9eOkjgDb7xFA",
    "poppy_user_id": "n9YYwSTyEXoeF1tr3Yr_-A",
    "poppy_agent_id": "shopping",
    "iss": "https://auth.example.com/"
  }
}
```

### Signed-out join (guest)

The subject is an anonymous user ID that stays the same for the same agent, Poppy User ID, and Poppy Agent ID, so a returning guest gets the same subject across Sessions. There's no associated user record. `sub_profile` contains `urn:auth0:anonymous_user`, and `act` names the agent as in a signed-in join.

The following example shows a guest **ID token**:

```json theme={null}
{
  "iss": "https://auth.example.com/",
  "aud": "WEB_APP_CLIENT_ID",
  "sub": "anon_poppy@z4eHq6gTjlgaMSjrplb3j5j3kb3hEDz9hZx8mgdxQLg",
  "sub_profile": "user urn:auth0:anonymous_user",
  "iat": 1793624075,
  "exp": 1793631275,
  "sid": "AUTH0_SESSION_ID",
  "act": {
    "sub": "agt_gZameUasxQq5wLiFTW7rxF",
    "sub_profile": "ai_agent",
    "client_id": "tpc_4fR8kLm2QwZx7NbV1sYt3P",
    "poppy_sid": "g4B43922Ut9eOkjgDb7xFA",
    "poppy_user_id": "n9YYwSTyEXoeF1tr3Yr_-A",
    "poppy_agent_id": "shopping",
    "iss": "https://auth.example.com/"
  }
}
```

A guest ID token has no profile claims.

A guest **access token** has the same `sub`, `sub_profile`, and `act`. It's issued for your API only if your API grants scopes to anonymous users through a client grant for the web application. Otherwise, the web application receives only an opaque access token for the `/userinfo` endpoint, if it's configured to allow OIDC. To learn more, read [Set Up Manually](https://auth0.com/docs/ai-agents-mcp/personal-agents/set-up-manually.md#allow-guest-access-tokens-optional). Auth0 never issues a refresh token after a join.

### Lifetime

The Auth0 session and the tokens a join creates last at most 2 hours. Limit your web application's session to the same length, or shorter if your tenant settings end sessions sooner.

## Tell who is acting

| You want to know | Check |
| - | - |
| Is an agent driving the browser? | `act` with `poppy_sid` is present |
| Is it a guest? | `sub_profile` contains `urn:auth0:anonymous_user`. Don't detect guests by parsing `sub` |
| Which agent? | `act.sub`, or `act.client_id` |
| Which user, at your API? | The access token's `sub`, only when a valid access token is present |
| Which Session? | `act.poppy_sid` in web tokens, or `sid` in the `Poppy-Session` header |

## Correlate activity with Sessions

Each Session has an ID that appears in requests to both your API and your web application. Use it to correlate activity that belongs to the same task:

* **Across sign-in:** The Session ID stays the same when a guest signs in, so a cart filled as a guest is still there at checkout.
* **Across surfaces:** The same Session can reach your API and your website, so you can follow one task across surfaces.

Agents choose their own Session IDs, so never key state by the Session ID alone. Key Session state and events by the Poppy Session ID and the Poppy User ID together. Read them from:

| Where | Poppy Session ID | Poppy User ID |
| - | - | - |
| Your API, called by the agent: the `Poppy-Session` header | `sid` | `sub` |
| Your API, called by your web application: the access token's `act` claim | `act.poppy_sid` | `act.poppy_user_id` |
| Your web application: the ID token's `act` claim | `act.poppy_sid` | `act.poppy_user_id` |

The values are the same across fields; for example, `sid` in the `Poppy-Session` header equals `act.poppy_sid` in both tokens, and `sub` equals `act.poppy_user_id`. As a result, the same key finds the same Session state at your API and your website, where together, they identify one Session. The protocol requires agents to choose Session IDs at random, so they can't be guessed. Auth0 copies the IDs into tokens from the `Poppy-Session` header it verifies at the browser join.

The `poppy_user_id` and `sub` of the `Poppy-Session` header are pseudonymous IDs chosen by the agent. Never use them as an account identifier. The account is the `sub` of a verified access token.

## Learn more

* [Agent Identity in Tokens](https://auth0.com/docs/ai-agents-mcp/agent-as-principal/agent-identity-in-tokens.md)
* [Session header in the Poppy specification](https://personalagentprotocol.org/docs/spec#session-header)
