Copy-paste agent prompt
1. Verifying existing Better Auth users
In your route handler, userequireAgentAccount 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 usingcreateAgentAccount:
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.