Skip to main content
Clerk handles your human users in the browser; AgentOnboard handles AI agents calling your API. When an agent presents a 5-minute Agent Identity Token, read the verified email and look up the matching Clerk user.

Copy-paste agent prompt


1. Verifying existing Clerk users

Use the Clerk Backend SDK inside resolveAccount to find the user by normalized email:
app/api/notes/route.ts
If the email is not in Clerk, the SDK returns 403 ACCOUNT_REQUIRED, prompting the agent to follow your auth.md instructions.

2. Enabling agent signup with Clerk

To let agents provision accounts for new users, add an explicit signup handler using createAgentAccount:
app/api/signup/route.ts
Why skipPasswordRequirement worksAgentOnboard verifies the User’s email before issuing any token. Passing skipPasswordRequirement: true lets the agent create the Clerk user immediately without getting blocked on a password field.