@afauthhq/agent for an agent, @afauthhq/server for a service (plus @afauthhq/worker on Cloudflare). @afauthhq/core is the shared foundation both sides pull in.
See Installation for setup, or jump to a quickstart: build an agent or accept AFAuth on your service.
The four packages
How they compose
- Building an agent? Install
@afauthhq/agent— or skip code entirely and use theafauthCLI. - Operating a service? Install
@afauthhq/server. On Cloudflare Workers, add@afauthhq/workerforcreateWorkerand the durable stores. @afauthhq/corecomes along transitively — you rarely import it directly, except for shared types likeAFAuthErrorandRecipient.
These overview pages map the surface; per-symbol typedoc reference is planned but not yet published. The quickstarts and guides carry runnable, copyable code for the common paths.
Where to next
Quickstart: build an agent
@afauthhq/agent end to end in five minutes.Quickstart: accept AFAuth
@afauthhq/server with spam-resistant defaults.Installation
npm / pnpm / yarn, Node 20+.
Use the CLI instead
The same agent flow with no code.