Skip to main content
Better Auth manages human sessions, cookies, and social logins; AgentOnboard provides the API token layer so AI agents can call your protected routes.

Copy-paste agent prompt


1. Verifying existing Better Auth users

In your route handler, use requireAgentAccount and query your Better Auth user table with normalizeEmail(email):
app/api/notes/route.ts

2. Enabling agent signup with Better Auth

Add an explicit signup route using createAgentAccount:
app/api/signup/route.ts
emailVerified: trueAgentOnboard tokens are issued only to Users who have verified their email, so you can set emailVerified: true on creation.