Example flows
These pages explain the protocol behavior demonstrated by the runnable Python and Agent Runtimes examples. Each flow shows where data travels, which Reactor capability owns sensitive work, and what may safely cross into model context.
| Flow | What it teaches | Start with |
|---|---|---|
| Company discovery | Resolve and validate public PAP capabilities | A company domain |
| Agent identity | Verify personal-agent metadata and signing policy | An agent.json URL |
| Session assertion | Bind a short-lived request to a pairwise user | Verified metadata |
| Direct Sign-In boundary | Keep OAuth state and PKCE outside the model | A signed-out Session |
| DPoP proof | Bind one proof to one HTTP request | A protected key |
| DPoP transport | Retry and redirect without replaying proofs or leaking tokens | A Session Token reference |
| Conversation messages | Create and retry idempotent messages safely | A conversation endpoint |
| Conversation events | Long poll, drain, recover, and de-duplicate ordered events | A conversation and cursor |
| Session lifecycle | Start, retry, and renew a signed-out Session | An authorization server |
| Direct Sign-In lifecycle | Upgrade the same Session after user consent | A browser callback |
| Browser Session | Join a controlled browser to the same Session | A signed browser assertion |
| Account Tokens | Refresh, rotate, narrow, expire, and revoke without exposing the token | A signed-in Session |
| Mediated Sign-In | Relay protected input to one endpoint, then a one-time code | Declared mediated fields |
| Conversation streaming | Stream over SSE, reconnect from Last-Event-ID, never act on deltas | An open conversation |
| Conversation control | Sign in mid-conversation, go direct, hand off, and close | An authorization event |
| Operations | Confirm the exact revision, recover lost answers, use standing permissions | A proposed operation |
| A user with a company | The whole journey with Manzanita, both sides from the SDK | A user's request |
| Two companies | Ledgerly acts for Ada at Northwind, by composition | Two PAP relationships |
Some features are shown by a runnable Pydantic AI example alone, with the guide that explains them:
| Example | What it teaches | Guide |
|---|---|---|
| Company APIs | Read and propose through a company's OpenAPI API (DPoP) and its MCP server (a Bearer for its URL alone) | APIs coverage |
| Company service | Build a company with personal_agent_protocol.company and use it end to end | Integrate a company |
| Sign-in display | What a page gets of a PapSignIn display, and what a model is told | Device Sign-In |
| Telemetry | One allowlisted event per protocol stage | Telemetry |
The examples use deterministic or local transports where needed, so they can
teach the boundary without real credentials. The newer flows run against the
reference company in personal_agent_protocol.demo: real keys and real HTTP
over ASGI in one process, with no network. The two journeys at the end of the
table combine several features; each other page showcases one. Production hosts replace those
fixtures through Reactor contributions for egress, state, browsers, signing,
DPoP, key custody, and token storage.
The PAP repository contains plain Pydantic AI examples. Agent Runtimes contains matching Loop applications and interactive Reactor views. The protocol and secret-handling rules are the same in both.