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

> ## Agent Instructions
> ### Authlete versions
> Authlete 3.0 is the current version. Unless the user says they use another version, answer for Authlete 3.0 using the 3.x documentation.
> Documentation for Authlete 2.x (pages under `/v2/` and `/ja/v2/`) is for the legacy version. Refer to it only when the user is on Authlete 2.x.
>
> ### Authlete architecture
> Authlete is a backend engine for OAuth 2.0 and OpenID Connect processing. End users and client applications do not call it directly; the service provider's authorization server and API server call Authlete's APIs. Authlete handles protocol processing and token, client, and service management, while the service provider owns the OAuth/OIDC endpoints and user authentication.
> See [Architecture](https://developers.authlete.com/get-started/introduction-to-authlete/architecture.md).
>
> ### Concepts
> If the user is new to Authlete, read these pages first:
> - [Request and Response](https://developers.authlete.com/get-started/concepts/request-and-response.md): Core API requests pass the client's request parameters as-is, and responses return `resultCode`, `action`, and `responseContent`.
> - [Action Handling](https://developers.authlete.com/get-started/concepts/action-handling.md): Branch on `action`, never on `resultCode`, and map each action to the HTTP response your server returns.
> - [Two-Step API Calls](https://developers.authlete.com/get-started/concepts/two-step-api-calls.md): Actions such as `INTERACTION` are completed with a second call (`/auth/authorization/issue` or `/auth/authorization/fail`) linked by a `ticket`.
> - [Management API Overview](https://developers.authlete.com/get-started/concepts/overview.md): The Management API configures services, manages clients, and operates issued tokens, separately from the protocol flows handled by the Core API.
> - [API Authentication](https://developers.authlete.com/get-started/concepts/authentication.md): Authlete APIs use bearer tokens: a Service Access Token (one service) or an Organization Token (the whole organization).

# Personal Agent Protocol (Poppy)

> What the Personal Agent Protocol (Poppy) is, what Authlete handles for a Company that implements it, and how to see it work against Stays, a Company protected by Authlete.

## Introduction

The [Personal Agent Protocol][POPPY_SITE] ("Poppy" for short) is an open protocol for how personal agents and companies work together. A customer can ask their own AI agent to book a room, start a return, or check an order, and the agent does it at the company on the customer's behalf. Companies decide what agents can do, and customers decide what their agent can do for them.

Sierra and Meta announced Poppy in October 2026, and [version 1.0][POPPY_CHANGELOG] was released in November 2026. According to [Sierra's release post][SIERRA_RELEASE], every Shopify store now publishes a Poppy file, and Meta's Muse agent looks for Poppy first on every site it visits.

Most of Poppy is OAuth, which Authlete already supports. On top of OAuth, Poppy adds a discovery file that describes the Company and a signed `Poppy-Session` header on every request. Your API checks the header and the authorization server never sees it, so your Authlete setup stays OAuth with CIMD. This page explains how the pieces fit together, then shows the whole flow running against **Stays**, Authlete's reference Poppy Company.

### Terms

Poppy capitalizes the terms it defines. These definitions come from section 2 of the [Poppy 1.0 specification][POPPY_SPEC].

| Term | Meaning |
| - | - |
| User | The person a Personal Agent acts for. |
| Personal Agent | Software acting for the User. |
| Company | An entity that implements the protocol so Personal Agents can work with it. |
| Company Agent | A Company's own agent, reached through a supported conversation protocol. |
| User ID | The ID a Personal Agent gives one User at one Company. It is stable and pseudonymous. |
| Session | One User's activity at one Company through one Personal Agent, across web browsing, APIs, and conversations. |
| Session header | The `Poppy-Session` header on every request a Personal Agent sends. |

## How Poppy works

A Personal Agent that has never seen a Company before goes through the steps below. The examples use Stays, the demo Company in [See Poppy in action](#see-poppy-in-action). The diagram shows the whole flow between a User, their Personal Agent, and a Company whose authorization server runs on Authlete. The numbers match the sections that follow. The Company's authorization server and API call Authlete; the User only ever sees the Company's pages.

```mermaid theme={null}
sequenceDiagram
    participant U as User
    participant P as Personal Agent
    participant C as Company
    participant AS as Company's authorization server
    participant A as Authlete

    Note over P,A: 1–2. Discovery
    P->>C: GET /.well-known/poppy.json
    P->>C: GET /.well-known/oauth-protected-resource
    P->>AS: GET /.well-known/oauth-authorization-server
    AS->>A: service/configuration
    AS-->>P: Metadata (CIMD supported, protected_resources)

    Note over P,C: 4. Signed-out Session
    P->>C: API request + Poppy-Session
    C-->>P: 200, no account needed
    P->>C: API request that needs an account + Poppy-Session
    C-->>P: 401, names the scope it needs

    Note over U,A: 3, 5. Agent identity and sign-in
    P->>U: Open the Company's sign-in page
    P->>AS: Push the authorization request (PAR, if the server lists it)
    AS->>A: pushed_auth_req
    AS-->>P: request_uri
    U->>AS: Authorization request (client_id is the agent's URL, prompt=consent)
    AS->>A: auth/authorization
    A->>P: GET the agent's metadata (CIMD)
    A-->>AS: INTERACTION, agent registered
    AS->>U: Sign-in and consent page
    U->>AS: Sign in and approve the scopes
    AS->>A: auth/authorization/issue
    AS-->>P: Redirect with authorization code
    P->>AS: Token request (code, client assertion, optional DPoP proof)
    AS->>A: auth/token
    A-->>AS: Access token (bound to the agent's key if a DPoP proof was sent)
    AS-->>P: Access token and refresh token

    Note over P,A: 6. Signed-in request
    P->>C: API request + Poppy-Session + token (+ DPoP proof)
    C->>C: Check the Poppy-Session header
    C->>A: auth/introspection
    A-->>C: OK, User and scopes
    C-->>P: Response
```

### 1. Discovery

The agent reads `https://stays.poppysandbox.dev/.well-known/poppy.json`. The file names the Company and its authorization server, describes each scope in words the User will see, and lists the APIs.

```json poppy.json (abridged) theme={null}
{
  "protocol_version": "1.0",
  "organization": { "name": "Stays", "domain": "stays.poppysandbox.dev" },
  "auth": {
    "issuer": "https://auth.stays.poppysandbox.dev",
    "scopes": {
      "stays:read": "See your Stays bookings.",
      "stays:write": "Book a room on your account. Each booking needs your approval."
    },
    "scope_hints": {
      "stays:read": { "changes": "none", "personal_data": true },
      "stays:write": { "changes": "irreversible", "personal_data": true }
    }
  },
  "apis": [
    { "type": "openapi", "url": "https://stays.poppysandbox.dev/openapi.json", "description": "Stays API" }
  ]
}
```

The `scope_hints` tell the agent whether a scope changes data, whether the change can be undone, and whether it touches personal data. Here, `stays:write` is `irreversible`, so a careful agent asks the User before it books.

A Company chooses which channels to offer. Besides `apis` (OpenAPI or MCP), `poppy.json` can list a Company Agent for conversations (`agent`), signed-in use of the website (`web`), and task guidance (`tasks`). Stays offers an OpenAPI API only.

### 2. Finding the authorization server

The agent checks the issuer two ways. It reads Stays' protected resource metadata ([RFC 9728][RFC_9728]) at `https://stays.poppysandbox.dev/.well-known/oauth-protected-resource`:

```json theme={null}
{
  "resource": "https://stays.poppysandbox.dev",
  "authorization_servers": ["https://auth.stays.poppysandbox.dev"]
}
```

It then reads the authorization server metadata ([RFC 8414][RFC_8414]) at `https://auth.stays.poppysandbox.dev/.well-known/oauth-authorization-server`. The two documents must point at each other: the Company names its authorization server, and the authorization server lists the Company in `protected_resources`.

| File | Where it lives | Who writes it |
| - | - | - |
| `/.well-known/poppy.json` | The Company's own domain (`stays.poppysandbox.dev`) | You |
| `/.well-known/oauth-protected-resource` | The Company's own domain, at the root | You |
| `/.well-known/oauth-authorization-server` | The authorization server (`auth.stays.poppysandbox.dev`) | Authlete, from your service settings |

In Poppy, the protected resource is the whole domain, so its metadata sits at the root with no path after it. This differs from MCP servers, whose resource is a single URL.

### 3. Agent identity

The agent's `client_id` is an HTTPS URL that returns its metadata, as in [CIMD](https://developers.authlete.com/protocols-and-flows/protocol-extensions/oauth-client-id-metadata-document-cimd.md). The metadata includes the agent's public keys (`jwks_uri`). The agent proves its identity at the token endpoint with a signed client assertion (`private_key_jwt`). The agent must set `exp` no more than 5 minutes after `iat`. Your service must accept assertions signed with `ES256` and `PS384`, and reject any whose `aud` is not your issuer. Authlete does this when `clientAssertionAudRestrictedToIssuer` is on, which it isn't by default; see [Implementing Poppy with Authlete](https://developers.authlete.com/protocols-and-flows/protocol-extensions/poppy-implementation.md#configure-the-service).

Poppy doesn't require agents to name their signing algorithm in their metadata. If an agent's metadata has no `token_endpoint_auth_signing_alg`, Authlete still accepts its assertion when it verifies with one of the agent's published keys. An agent that names an algorithm must sign with that algorithm.

### 4. Signed-out Session

The agent can call Stays' API before anyone signs in, for tasks that need no account, such as listing rooms. Every request carries a `Poppy-Session` header: a JWT that the agent signs with a short-lived key, vouched for by one of the keys in its `jwks_uri`. The header names the agent (`iss`), the Company (`aud`, its issuer), the User ID (`sub`), the Session (`sid`), and the exact request (`htm` and `htu`). Each of these requests also carries a `Poppy-Version` header, such as `Poppy-Version: 1.0`.

When a request needs an account, Stays answers `401` with no error code, and names the scope it needs in the `WWW-Authenticate` challenge.

### 5. Sign-in

The User signs in on the Company's own page and approves the scopes. Poppy defines two ways to sign in:

* **Direct Sign-In**: the User signs in on the Company's page in their browser. This is the authorization code flow with [PKCE](https://developers.authlete.com/protocols-and-flows/protocol-extensions/proof-key-for-code-exchange-pkce.md). The request includes `prompt=consent`, so the User approves the agent every time, and the consent page must list every scope the Company will grant. If the authorization server lists a Pushed Authorization Request (PAR) endpoint, as Stays does, the agent should push its request there first and open the browser with only the returned `request_uri`.
* **Device Sign-In**: the User signs in on any device, using a link and code the agent shows them. This is the [device flow](https://developers.authlete.com/protocols-and-flows/advanced-flows/oauth-2-0-device-authorization-grant-device-flow.md).

### 6. Signed-in requests

The agent sends the access token together with the `Poppy-Session` header. The Company checks both before it acts. Access tokens can be Bearer tokens or [DPoP](https://developers.authlete.com/configuration-reference/tokens-and-claims/using-dpop.md)-bound tokens; the Company chooses, and Personal Agents should support DPoP.

To sign out, the agent revokes every refresh token it holds for the Company at the revocation endpoint.

## What Authlete handles

| Poppy requirement | Standard | Who handles it |
| - | - | - |
| Agents identify themselves with a URL | [CIMD](https://developers.authlete.com/protocols-and-flows/protocol-extensions/oauth-client-id-metadata-document-cimd.md) | Authlete fetches, validates, and registers the agent's metadata |
| Agents authenticate with a signed assertion | [`private_key_jwt`](https://developers.authlete.com/configuration-reference/endpoints/client-authentication-using-private-key-jwt-method) | Authlete verifies the assertion with the agent's published keys, whether or not the agent names its signing algorithm |
| Direct Sign-In | Authorization code flow with PKCE, and Pushed Authorization Requests (PAR) | Authlete processes the requests; you build the sign-in and consent page |
| Device Sign-In | [Device flow (RFC 8628)](https://developers.authlete.com/protocols-and-flows/advanced-flows/oauth-2-0-device-authorization-grant-device-flow.md) | Authlete processes the request; you build the verification page |
| Refresh tokens and revocation | RFC 6749, RFC 7009 | Authlete |
| Sender-constrained access tokens (optional) | [DPoP](https://developers.authlete.com/configuration-reference/tokens-and-claims/using-dpop.md) | Authlete binds and checks the tokens |
| Authorization server metadata | RFC 8414 | Authlete builds it from your service settings |
| `poppy.json` and protected resource metadata | Poppy, RFC 9728 | You publish them on your Company's domain |
| Checking the `Poppy-Session` header | Poppy | You check it in your API |

> [!NOTE]
>
> Poppy requires the authorization server metadata to list your Company in `protected_resources`. From version 3.0.40, Authlete includes it when you set **Protected Resources** (`protectedResources`) in your service settings. On earlier versions, add your Company's URL in your discovery endpoint before you return the response.

## See Poppy in action

To see the flow in a real-life scenario, this section uses **Stays**, a demo company that rents seaside rooms. Stays is a complete Poppy Company protected by Authlete: its authorization server calls Authlete for every OAuth step, and its API asks Authlete about every access token. You play a customer whose Personal Agent finds Stays, signs you in, and books a room, while you watch each step of the [flow above](#how-poppy-works) happen.

> [!TIP]
>
> For a quick tour without an account, try the \[Poppy demo]\[DEMO]. It plays the whole flow step by step in your browser, then shows the code for each endpoint you build.

Stays keeps its own brand and domains, and Authlete works behind them. Customers only ever see Stays' pages.

| Host | What it serves |
| - | - |
| `stays.poppysandbox.dev` | The website, `poppy.json`, the protected resource metadata, and the Stays API |
| `auth.stays.poppysandbox.dev` | The authorization server, a thin layer that calls Authlete |
| `account.stays.poppysandbox.dev` | Stays' own sign-in and consent pages |

![The Stays home page](https://mintcdn.com/authlete/iIxpPE74KF_xTx8r/img/developers/poppy/stays-home.png?fit=max\&auto=format\&n=iIxpPE74KF_xTx8r\&q=85\&s=4e5de929a7c6d9f1c38ab9b554915b20)

You can watch the flow with two agents:

| Agent | Made by | What it shows |
| - | - | - |
| [Poppy Agent Playground][PLAYGROUND] | Authlete | Every step of the flow, with each request decoded |
| [Poppy Simulator][SIMULATOR] | Stacktree, independent | That an agent written by someone else works with an Authlete-protected Company |

### Before you start

* Create a test account with **Sign Up** on the [Stays sign-in page](https://account.stays.poppysandbox.dev/auth/sign-in). Stays is a demo, so don't use real personal information.
* The Playground and the Simulator run in your browser, so there is nothing to install.

### Walk through the flow with the Poppy Agent Playground

The [Poppy Agent Playground][PLAYGROUND] is a Personal Agent that you drive one task at a time. Each task is a real request to Stays: the agent answers in plain language on the left, and **Wire** on the right lists every request, decoded. The goal is to book a room. The step numbers below match the diagram in [How Poppy works](#how-poppy-works).

**1. Discover Stays (steps 1 and 2)**

In the box at the top, enter `stays.poppysandbox.dev` and click **Discover**. The Playground reads Stays' `poppy.json` and protected resource metadata, the authorization server metadata that Authlete generates for `auth.stays.poppysandbox.dev`, and the OpenAPI document. **Your agent** shows *Connected to Stays*, and **Call an API** lists Stays' operations with the scope each one needs.

![The Playground connected to Stays](https://mintcdn.com/authlete/iIxpPE74KF_xTx8r/img/developers/poppy/playground-discover.png?fit=max\&auto=format\&n=iIxpPE74KF_xTx8r\&q=85\&s=5b23c3d1351a2b43d38d4cbabbd7c2b9)

**2. Search available rooms (step 4)**

Pick **GET /rooms** (*Search available rooms*) and click **Send**. Searching needs no account, so the signed-out Session is enough, and the agent shows Stays' two rooms.

![The agent lists Stays' rooms while signed out](https://mintcdn.com/authlete/iIxpPE74KF_xTx8r/img/developers/poppy/playground-rooms.png?fit=max\&auto=format\&n=iIxpPE74KF_xTx8r\&q=85\&s=37d8730ff5331c7347272c26174a3a15)

**3. Try to list your bookings (step 4)**

Pick **GET /stays** (*List your bookings*) and click **Send**. Stays answers `401`, and the agent replies that Stays needs `stays:read`, so you have to sign in first. Click the request under **Wire** to see the `Poppy-Session` header, its delegation (`poppy_dlg`), and Stays' response.

![A signed-out request for bookings, decoded](https://mintcdn.com/authlete/iIxpPE74KF_xTx8r/img/developers/poppy/playground-wire.png?fit=max\&auto=format\&n=iIxpPE74KF_xTx8r\&q=85\&s=c0a6779794831997a6c8f17bfb731c8a)

**4. Sign in to Stays (steps 3 and 5)**

Click **Sign in to Stays**. Stays' own sign-in page opens in a new tab. The Playground shows what Stays is asking for, and notes that the page is Stays' own authorization server, powered by Authlete.

![The Playground hands you to Stays' sign-in page](https://mintcdn.com/authlete/iIxpPE74KF_xTx8r/img/developers/poppy/playground-sign-in.png?fit=max\&auto=format\&n=iIxpPE74KF_xTx8r\&q=85\&s=23bbe21897c108e1d0c53faa7c296b76)

Sign in with your test account and approve the scopes on Stays' page.

![The Stays sign-in page](https://mintcdn.com/authlete/iIxpPE74KF_xTx8r/img/developers/poppy/stays-sign-in.png?fit=max\&auto=format\&n=iIxpPE74KF_xTx8r\&q=85\&s=be8f6c96fab4ad97f69f115347c0f34f)

Behind the page, the Playground pushes its request to Stays' authorization server first (`POST /oauth/par`). Authlete fetches the Playground's metadata (CIMD), registers it, and issues the code. When the Playground exchanges the code (`POST /oauth/token`), Authlete verifies its signed client assertion and issues the tokens.

**5. List your bookings, signed in (step 6)**

The agent replies *Signed in. Stays granted me the access you approved.* and lists your bookings again. This time the request carries the access token with the `Poppy-Session` header, and Stays answers `200`. You have no bookings yet.

![The agent signed in, with the access token on the wire](https://mintcdn.com/authlete/iIxpPE74KF_xTx8r/img/developers/poppy/playground-signed-in.png?fit=max\&auto=format\&n=iIxpPE74KF_xTx8r\&q=85\&s=f863094dd95510b6eb321c369869f72f)

**6. Book a room (step 6)**

Pick **POST /stays** (*Book a room*). Edit the body if you like, for example `{ "room": "sea-view", "checkIn": "2026-12-01", "nights": 2 }`, and click **Send**. Stays checks the `Poppy-Session` header, Authlete checks the access token and its `stays:write` scope, and Stays answers `201` with the booking: its ID, the total, and the cancellation policy.

![Stays confirms the booking](https://mintcdn.com/authlete/iIxpPE74KF_xTx8r/img/developers/poppy/playground-booked.png?fit=max\&auto=format\&n=iIxpPE74KF_xTx8r\&q=85\&s=63ddf154c3b854750b87bb79a21839c6)

**7. See your booking**

Pick **GET /stays** again. The agent now lists the room you booked.

![The agent lists the new booking](https://mintcdn.com/authlete/iIxpPE74KF_xTx8r/img/developers/poppy/playground-my-bookings.png?fit=max\&auto=format\&n=iIxpPE74KF_xTx8r\&q=85\&s=05e9e41e1504f2cdff28f32250aa2527)

**Sign in with a code** signs you in with Device Sign-In instead. The **Agent settings** line at the bottom shows the agent's identity and token type; by default, a self-hosted CIMD identity and DPoP-bound tokens. Turn off **Sender-constrained tokens (DPoP)** there to get Bearer tokens instead; Stays accepts both.

### Watch an independent agent with the Poppy Simulator

The [Poppy Simulator][SIMULATOR] is a hosted test agent that Stacktree wrote from the spec text, without Authlete's or Stays' code. It speaks Poppy 1.0 and drafts 0.2 to 0.4, and uses the newest version a Company offers. It is not affiliated with Authlete or with the authors of Poppy.

**1. Run the checks**

Choose **Test a company**, enter `stays.poppysandbox.dev`, and click **Run the checks**. The Simulator reads Stays' discovery files, starts a signed-out Session, and sends requests that a Company must refuse.

**2. Read the results**

Each check names the spec section it tests, and passes (✓), warns (!), fails (×), or is informational (i). **The wire** lists every request with its checks.

![The Simulator's checks against Stays](https://mintcdn.com/authlete/iIxpPE74KF_xTx8r/img/developers/poppy/simulator-checks.png?fit=max\&auto=format\&n=iIxpPE74KF_xTx8r\&q=85\&s=071f9145c536b6275126e1a37c7c8239)

**3. Sign in**

Choose **Sign in on this device** for Direct Sign-In. The Simulator first pushes its request to Stays' authorization server (Pushed Authorization Request), then opens Stays' sign-in page. Sign in with your test account and approve the scopes on Stays' consent page.

**4. Watch the token exchange**

Back in the Simulator, the wire shows the rest of the flow. Each step goes through Stays' authorization server, which hands the work to Authlete:

* The `state` and `iss` returned with the code match what the Simulator expects.
* The code is exchanged for an access token and a refresh token. Authlete accepts the Simulator's signed client assertion and grants no scope beyond those requested.
* Exchanging the same code again is refused.
* The refresh token gets a new access token narrowed to `stays:read`.

  ![The Simulator's sign-in and token exchange with Stays](https://mintcdn.com/authlete/iIxpPE74KF_xTx8r/img/developers/poppy/simulator-sign-in.png?fit=max\&auto=format\&n=iIxpPE74KF_xTx8r\&q=85\&s=4eafc963cb5286fbbbc820c94c9c4c73)

> [!NOTE]
>
> According to Stacktree, the Simulator publishes nothing and sends feedback only to Stacktree.

### Run the same demo against your own Company

Once you have built your Company, as in [Implementing Poppy with Authlete](https://developers.authlete.com/protocols-and-flows/protocol-extensions/poppy-implementation.md), point the same agents at your own domain:

* Your Company's domain must be reachable from the internet over HTTPS. The Playground and the Simulator run as hosted services, so they can't reach `localhost`.
* If your service uses a CIMD allowlist, add the agents' client IDs:

| Agent | Client ID |
| - | - |
| Poppy Agent Playground | `https://poppy-playground.authlete.app/agent.json` |
| Poppy Simulator | `https://poppy-simulator.stacktr.ee/agent.json` |

* Prepare a test User account on your sign-in page.

The checklist below lists what each step should show.

## Checklist

Use this list with any of the tools. Section numbers refer to the [Poppy 1.0 specification][POPPY_SPEC].

| Check | Expected result | Section |
| - | - | - |
| `poppy.json` is served at `/.well-known/poppy.json` over HTTPS | `200` with JSON | 3 |
| `organization.domain` matches the host that serves `poppy.json` | Exact match | 3.1 |
| `supported_versions` lists only the other versions you serve | Your own `protocol_version` is not listed | 3.4 |
| Protected resource metadata `resource` | Exactly `https://{organization.domain}` | 3.2 |
| Authorization server metadata `issuer` | Exactly matches the issuer in `poppy.json` | 3.2 |
| Authorization server metadata `protected_resources` | Includes `https://{organization.domain}` | 3.2 |
| `grant_types_supported` | Includes `refresh_token`, and every grant listed works | 3.2 |
| Authorization server metadata `revocation_endpoint` | Listed | 3.2 |
| Agent signs its assertion with `ES256` or `PS384` | Accepted, even if the agent's metadata names no algorithm | 4.1 |
| Sign-in request with an unknown scope | Rejected with `invalid_scope` | 4.7 |
| Each scope hint has `changes` and `personal_data` | Both fields present | 4.7 |
| Consent page | Lists every scope the Company will grant | 10.8 |
| Request without a valid `Poppy-Session` header | `400` with `invalid_session` | 5.3 |
| Signed-out request that needs an account | `401` with no error code; the `WWW-Authenticate` challenge names the scope it needs | 7 |
| Signed-in request with too few scopes | `403` with `insufficient_scope` | 7 |
| DPoP-bound access token sent without a DPoP proof | `401` | 4.5, RFC 9449 |

## Troubleshooting

| Symptom | Cause | Fix |
| - | - | - |
| Sign-in fails with `A505301` | Authlete could not fetch the agent's metadata | The agent's `client_id` URL must be publicly reachable over HTTPS |
| Sign-in fails with `A505306` | The service doesn't support the agent's `token_endpoint_auth_method` | Add `PRIVATE_KEY_JWT` to `supportedTokenAuthMethods` |
| Sign-in fails with `A505307` | The service doesn't support a value in the agent's metadata, usually a grant type. The Poppy Simulator lists the device and JWT bearer grants. | Drop the grant type with a metadata policy. Add it to `supportedGrantTypes` only if you also offer it; for `DEVICE_CODE`, that means building Device Sign-In |
| Sign-in fails with `A011317` | The `redirect_uri` is not in the agent's metadata | The agent must use a redirect URI it lists |
| Token request fails with `A157306` | The agent signed its assertion with an algorithm your service doesn't support, or with a different algorithm from the one its metadata names | Make sure your service supports `ES256` and `PS384`. An agent that names an algorithm must sign with that algorithm |
| Device Sign-In fails with `A222101` | `deviceVerificationUri` is not set | Set it, or remove `DEVICE_CODE` from `supportedGrantTypes` |
| Your API answers `invalid_session` to valid agents | The `Poppy-Session` header check is too strict | Check that `aud` is compared with your issuer, and `htu` with the public URL of the request |

## What's next

To make your own Company work with Personal Agents, see [Implementing Poppy with Authlete](https://developers.authlete.com/protocols-and-flows/protocol-extensions/poppy-implementation.md). It walks through configuring your Authlete service, publishing `poppy.json`, and handling sign-in, tokens, and the `Poppy-Session` header, step by step.

## References

* [Personal Agent Protocol][POPPY_SITE]
* [Personal Agent Protocol specification, version 1.0][POPPY_SPEC]
* [Personal Agent Protocol changelog][POPPY_CHANGELOG]
* [Company implementation kit][KIT]
* [Releasing Personal Agent Protocol 1.0 (Sierra)][SIERRA_RELEASE]
* [RFC 8414: OAuth 2.0 Authorization Server Metadata][RFC_8414]
* [RFC 9728: OAuth 2.0 Protected Resource Metadata][RFC_9728]
* [OAuth Client ID Metadata Document (CIMD)](https://developers.authlete.com/protocols-and-flows/protocol-extensions/oauth-client-id-metadata-document-cimd.md)
* [Poppy Agent Playground][PLAYGROUND]
* [Poppy Simulator by Stacktree][SIMULATOR]

[POPPY_SITE]: https://personalagentprotocol.org/

[POPPY_SPEC]: https://personalagentprotocol.org/docs/1.0/spec

[POPPY_CHANGELOG]: https://personalagentprotocol.org/docs/changelog

[KIT]: https://personalagentprotocol.org/kit/company

[SIERRA_RELEASE]: https://sierra.ai/blog/releasing-poppy

[RFC_8414]: https://www.rfc-editor.org/rfc/rfc8414.html

[RFC_9728]: https://www.rfc-editor.org/rfc/rfc9728.html

[PLAYGROUND]: https://poppy-playground.authlete.app

[SIMULATOR]: https://poppy-simulator.stacktr.ee

[DEMO]: https://demo.poppysandbox.dev/


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.