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

# How Personal Agent Protocol Works

> Learn how a personal agent discovers your company, works signed out as a guest, signs the user in, and browses your website with Auth0.

> [!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).

A personal agent can work with your company in two ways: it calls your APIs directly, or it drives a browser on your website. In both flows, it starts signed out and asks the user to sign in only when a task needs their account. This article follows one typical journey, where it browses as a guest then signs the user in, and shows what your API and web application see at each step.

## Identifiers

| Identifier | Who chooses it | What it is |
| - | - | - |
| Issuer | You | Your tenant's issuer, such as `https://auth.example.com/`. It is your company's identity in the protocol: agents scope User IDs and sign-ins by it. Use a custom domain and don't change it, because a new issuer signs every user out |
| Company domain | You | The host of your website, such as `example.com`. It serves your discovery files |
| Agent URL | The agent | The URL of the agent's client metadata document, such as `https://agent.example/agent.json`. It's the agent's `client_id`. Only clients manually registered by a tenant administrator are supported. |
| Poppy User ID | The agent | A pairwise, opaque ID the agent gives its user for your company. It is not an Auth0 user ID and holds no personal data |
| Poppy Session ID | The agent | A random ID for one task, such as a shopping trip. It is not an Auth0 session ID. One sign-in can serve many Sessions, and each browser join belongs to one Session |
| Poppy Agent ID | The agent | Optional. The individual agent instance that is interacting, such as `travel`. It is not an Auth0 agent ID |

Your API and web application should record the Session ID they receive with the agent and the User ID. The Session ID lets you correlate what an agent did as a guest with what it does after the user signs in, for example, a cart filled as a guest and a checkout after sign-in. To learn more, read [Correlate activity with Sessions](https://auth0.com/docs/ai-agents-mcp/personal-agents/tokens-and-claims.md#correlate-activity-with-sessions).

## Discovery

Before it does anything else, the agent reads three documents and checks that they point to each other:

1. `https://{company-domain}/.well-known/poppy.json`: describes your company to the agent: its name and domain, the scopes it offers with descriptions and hints, its APIs, and its browser join endpoint.
2. `https://{company-domain}/.well-known/oauth-protected-resource`: describes your protected resources and names your Auth0 issuer as the authorization server that protects them.
3. Auth0's `/.well-known/oauth-authorization-server`: describes the Auth0 authorization server, so the agent knows how to get access to your APIs. It confirms the issuer and lists your company domain, and the identifiers of your Personal Agent Protocol APIs, in `protected_resources`.

Agents compare these values character for character, including the issuer's trailing slash. If the agent detects a single character mismatch, it skips your company without an error message. To avoid mismatches and mistakes, [the Auth0 CLI](https://auth0.com/docs/ai-agents-mcp/personal-agents/set-up-with-auth0-cli.md) creates the `poppy.json` file from your tenant's settings, so you can serve it as is.

## A typical journey

The following example shows an agent that browses as a guest, then asks the user to sign in to see their orders:

![Sequence of a personal agent that browses as a guest, signs in, calls your API and web app as the user, and signs out](https://mintlify.s3.us-west-1.amazonaws.com/auth0/docs/images/personal-agents/personal-agents-how-it-works.png)

| Step | At Auth0 | At your API | At your web app |
| - | - | - | - |
| Signed out | Nothing for API calls. A browser join creates a guest login | The request carries only the `Poppy-Session` header. Your API decides what's public | A guest login: the ID token's `sub` is an anonymous subject, and `act` holds Poppy information, such as the Poppy User ID, Poppy Session ID, and Poppy Agent ID |
| The user signs in | The user logs in and consents to the agent on your Auth0 login page. Auth0 issues the agent an access token and a refresh token | Nothing changes | Nothing changes |
| Signed in | A browser join logs the user in to your web app, with tokens limited to the agent's API and scopes | The request carries an access token for the user, issued to the agent, with the `Poppy-Session` header bound to it | A normal login for the user, with `act` naming the agent. The web app's tokens can't exceed the permissions the user approved for the agent |
| The agent signs out | Auth0 revokes the agent's refresh token | Requests carry only the `Poppy-Session` header again | The website session ends when the agent logs out of your web app, or when it expires within 2 hours |

### Signed out

A signed-out agent needs nothing from Auth0 to call your APIs. It signs a `Poppy-Session` header for each request, and your API verifies it with the agent's public keys. Your API decides which operations are public, the same way it does for anonymous visitors today.

### Direct Sign-In

When a task needs the user's account, the agent signs the user in with the authorization code flow. The user logs in to the system browser as they normally do and sees a consent page that names the agent. The agent receives an access token for your API and a refresh token.

The agent's sign-in serves its ongoing interactions with your API, across its Sessions. When the agent needs more scopes, it asks the user to sign in again and consent to the full set. A browser join, in contrast, belongs to the Session that joined, and `act.poppy_sid` names it. To get a token for a specific API or MCP server, the agent sends the `resource` parameter with the API's identifier. To learn more about the `resource` parameter, read [Enable resource parameter compatibility profile](https://auth0.com/ai/docs/mcp/guides/resource-param-compatibility-profile.md).

### Browser join

When your `poppy.json` lists a browser join endpoint, the agent joins its browser to a Session before browsing your website. The join works both signed out and signed in:

* **Signed out (guest):** your web application receives a guest login, with the agent as actor in `act`. Scope what a guest can do as you do for any visitor who isn't logged in.
* **Signed in:** your web application receives the user's login with the agent as actor. When your web application calls your APIs with its Auth0 tokens, it can't exceed the permissions the user approved for the agent.

The endpoint is hosted by Auth0, so your web application needs no Poppy-specific endpoint:

1. The agent's browser opens the join page. Auth0 returns a one-time code and sets a short-lived cookie that ties the code to that browser.
2. The agent authorizes the code from its backend with its `Poppy-Session` header and, for a signed-in join, its access token. A signed-in join needs the `poppy:browser-sign-in` scope.
3. The browser submits the code. Auth0 redirects it to your web application's Application Login URI.
4. Your web application starts a normal login. Auth0 completes it without prompts and returns tokens that name the agent in `act`.

The access token never passes through the browser, and only the browser that loaded the page can submit its code.

When the tokens include an acting agent, your web application can also restrict sensitive operations for the user, or ask the user to confirm them, for example with [Client-Initiated Backchannel Authentication (CIBA)](https://auth0.com/ai/docs/intro/asynchronous-authorization.md).

### Sign-out

The agent signs out by revoking its refresh token. Under the protocol, its Sessions continue signed out. The user can also disconnect the agent, which revokes its access to the account. The agent's browser can log out of your web app as usual, which ends the website session and the Auth0 session.

During the beta, signing out or disconnecting the agent doesn't end a website session that a join created: it ends at logout, or when it expires within 2 hours.

## Website access

`poppy:browser-sign-in` is the one scope the protocol defines. A signed-in browser join requires it, and your website decides what it means. The mode is a statement your website makes to agents in `poppy.json`, not an Auth0 setting:

| Mode | What the website allows a signed-in agent | What you do |
| - | - | - |
| **Scoped** (default) | Only what the user approved the agent to do during sign-in | Describe `poppy:browser-sign-in` as "Use the website on your behalf, with the permissions you approve". Make sure actions in your website that don't call your API also check the agent's scopes |
| **Unscoped** | Everything the user's account can do on the website, as your website enforces it | Set `web.unscoped` to `true` in `poppy.json`. Describe the scope as "Use the website on your behalf with full access to your account". Users approve it on the consent page |

Auth0 doesn't enforce `web.unscoped`: your website does. In both modes, Auth0 limits the tokens your web application gets after a browser join to the API and scopes the user approved for the agent. Use unscoped mode only when your website doesn't call your APIs with Auth0 access tokens, for example when it uses Auth0 only to log users in.

## Learn more

* [What Your Apps and APIs Receive](https://auth0.com/docs/ai-agents-mcp/personal-agents/tokens-and-claims.md)
* [Beta Limitations](https://auth0.com/docs/ai-agents-mcp/personal-agents/beta-limitations.md)
