Protocol tour
PAP connects three actors: a User, the Personal Agent acting for that user, and a Company. It does not prescribe company policy. It supplies the controls each party needs to make and enforce its own policy.
1. Discover the companyโ
The personal agent fetches https://{domain}/.well-known/poppy.json. The
document identifies the company and advertises any supported website, OpenAPI
or MCP APIs, company-agent protocols, Mediated Sign-In, the company's own
scopes (auth.scopes, with auth.scope_hints), where to ask, per Session, for
the tasks it doesn't offer, its skills and its feedback endpoint
(tasks.endpoint), and extensions.
Discovery is a trust bootstrap, not ordinary JSON fetching. A redirect may go
to another host, but the document is used only when the final URL's path is
exactly /.well-known/poppy.json, with no query. The agent verifies that
organization.domain is the host that served it. It finds the company's OAuth
issuer from the domain's protected resource metadata
(RFC 9728), then fetches the issuer's
metadata (RFC 8414) and checks both the
exact issuer and that its protected_resources lists
https://{organization.domain}. The same metadata says which sign-in modes
the company offers, through grant_types_supported: Direct Sign-In with the
authorization code grant, and Device Sign-In with the device code grant.
A company can serve several protocol versions (ยง3.4): poppy.json is the
preferred version's document and supported_versions maps each other version to
its own document on the same host. The agent chooses the newest version compatible
with the one it implements, fetches that document when it is not poppy.json's
own, and names the version in Poppy-Version on every request with the Session
header, the same for the Session's life; a company that doesn't serve it answers
version_unsupported, and the agent reads poppy.json again and chooses again.
2. Start a Sessionโ
A Session ties together one user's activity at one company through one personal agent. It starts signed out. The company can recognize a returning user through a stable, opaque User ID without learning who the user is: a pairwise subject identifier, as in OpenID Connect, except that the personal agent assigns it, one for each pair of user and company. An agent that acts for a user through several agents may also name which one a Session is for, with an Agent ID.
The personal agent starts a Session on its own: it picks a random sid and
sends nothing. Every request then carries the Session header, Poppy-Session,
a JWT the agent signs for that request. It names the Session (sid), the User ID
(sub), and any Agent ID, is addressed to the company's issuer, and is bound to
the request's method and URL, and to the access token when there is one (ath).
The company learns of a Session from its first request.
Each JWT is signed with a delegated key, a short-lived key the agent keeps for
one User ID. A delegation in the JWT's poppy_dlg header vouches for it: a JWT
of at most 24 hours, signed by a key in the agent's jwks_uri, that says nothing
about the user or the company. The company checks the delegation, then the Session
JWT. Any failure is invalid_session, which the agent fixes before sending again; a
Session the company ended is session_ended, and the agent starts a new Session.
Signed-out requests need nothing from the authorization server, so a company can use an existing one that supports the standards it needs. The Session header is checked where each request arrives.
3. Sign in only when neededโ
If a task needs account access, the company answers with the scopes it needs:
a challenge when signed out, insufficient_scope when a token lacks them. PAP
supports Direct, Device, and Mediated Sign-In. Sign-in is plain OAuth and names no
Session: the same Session is signed in on each request that carries the
access token.
- Direct Sign-In: the OAuth authorization code flow with PKCE. It is the
preferred type (ยง4): a company that offers sign-in should offer it, and an
agent uses it when the company offers it (
preferred_sign_in,preferredSignIn). - Device Sign-In: the device authorization grant. It follows the cross-device best practices of RFC 10027 (BCP 247), whose ยง6.2.1.5 advises against it for high-value resources, so such a company may offer Direct Sign-In only.
- Mediated Sign-In: the agent relays the user's credentials. It is transitional, like OAuth's password grant: a company offers it only until it can add Direct or Device Sign-In, and the protocol plans to remove it at a date set with version 1.0.
Successful sign-in produces a long-lived refresh token. It is used only at the token endpoint, with a client assertion, to obtain scoped, short-lived access tokens that any of the user's Sessions can use.
4. Choose an interfaceโ
The discovery document may offer several ways to work:
- OpenAPI for structured operations;
- MCP for tool-oriented access, with an access token issued for that server alone;
- web browsing, the agent's own browser joined to the same Session through the company's form: the agent authorizes its one-time code with the Session header, and the browser submits it; and
- conversations with a company agent or company representative, each
message naming its
author.
An implementation skips interface types it does not understand. A company can adopt PAP progressively without exposing every channel on day one. A task the company chose not to offer is listed in its excluded tasks, with an alternative when there is one, so the agent can tell the user at once.
5. Confirm consequential actionsโ
The optional Operations extension separates proposing an action from carrying it out. The company refuses the request with the operation. The personal agent presents the company's exact current revision to the user and, once they approve, makes the same request again with that approval. Retries carry the same approval, so the company does not perform the action twice.
PAP and OAuthโ
PAP builds on OAuth: RFC 6749, RFC 7523 (client authentication), RFC 7636 (PKCE), RFC 8628 (the device authorization grant), RFC 8707 (resource indicators), RFC 7009 (revocation), and the OAuth 2.0 Security Best Current Practice, RFC 9700. A company may also bind its access tokens with DPoP, which both SDKs support. Mediated Sign-In is an extension grant, as RFC 6749 ยง4.5 allows; the other requests to the authorization server are standard OAuth.
What PAP adds to OAuth (ยง4.8):
- choices stricter than OAuth: a
client_idthat is the URL of a client metadata document, authenticated withprivate_key_jwtand an assertion addressed to the issuer;issin every authorization response and exact matching ofredirect_uri; andscopeon every sign-in request, with at least one scope granted and none beyond those requested; - discovery and descriptions:
poppy.json, client extensions, described scopes (auth.scopesor an OpenAPI description the company lists), and scope hints; - Sessions: the Session header on every request, signed with a delegated key, without an authorization-server grant; and
- an extension grant for Mediated Sign-In.
Above OAuth, the protocol adds the browser join form, APIs, conversations, excluded tasks and feedback, and extensions.
Continue with the personal-agent guide, the company guide, or the upstream specification.