Skip to main content

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.

FlowWhat it teachesStart with
Company discoveryResolve and validate public PAP capabilitiesA company domain
Agent identityVerify personal-agent metadata and signing policyAn agent.json URL
Session assertionBind a short-lived request to a pairwise userVerified metadata
Direct Sign-In boundaryKeep OAuth state and PKCE outside the modelA signed-out Session
DPoP proofBind one proof to one HTTP requestA protected key
DPoP transportRetry and redirect without replaying proofs or leaking tokensA Session Token reference
Conversation messagesCreate and retry idempotent messages safelyA conversation endpoint
Conversation eventsLong poll, drain, recover, and de-duplicate ordered eventsA conversation and cursor
Session lifecycleStart, retry, and renew a signed-out SessionAn authorization server
Direct Sign-In lifecycleUpgrade the same Session after user consentA browser callback
Browser SessionJoin a controlled browser to the same SessionA signed browser assertion
Account TokensRefresh, rotate, narrow, expire, and revoke without exposing the tokenA signed-in Session
Mediated Sign-InRelay protected input to one endpoint, then a one-time codeDeclared mediated fields
Conversation streamingStream over SSE, reconnect from Last-Event-ID, never act on deltasAn open conversation
Conversation controlSign in mid-conversation, go direct, hand off, and closeAn authorization event
OperationsConfirm the exact revision, recover lost answers, use standing permissionsA proposed operation
A user with a companyThe whole journey with Manzanita, both sides from the SDKA user's request
Two companiesLedgerly acts for Ada at Northwind, by compositionTwo PAP relationships

Some features are shown by a runnable Pydantic AI example alone, with the guide that explains them:

ExampleWhat it teachesGuide
Company APIsRead and propose through a company's OpenAPI API (DPoP) and its MCP server (a Bearer for its URL alone)APIs coverage
Company serviceBuild a company with personal_agent_protocol.company and use it end to endIntegrate a company
Sign-in displayWhat a page gets of a PapSignIn display, and what a model is toldDevice Sign-In
TelemetryOne allowlisted event per protocol stageTelemetry

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.

Two implementations, one boundary

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.