Blog / Guides

How to Let AI Agents Sign Up to Your App (and Know Who's Behind Each One)

Binoy Perera

Let AI agents sign up to your app and know who's behind them. Compare API keys, OAuth, and AgentID, with a tested signup flow and practical access controls.

If agents are showing up on your sign-up page, you have to decide how to let them in.

On developer platforms, agents already do most of the building. 70% of new Supabase databases come from agents or AI tools, and Databricks says agents create 80% of the databases on Neon. Vercel said that agents trigger >50% of its deployments, up from around 3% six months earlier.

If you're a founder, you want the growth agents bring, but you also need to know who's behind an agent when something goes wrong. Context.dev's founder had to lock down fully autonomous agent signups after agent-driven fraud, even though Context.dev builds web data tools for agents.

So how do you let agents in without letting fraud in with them? We built AgentID at AgentMail to solve this, and we want to show you how it compares with the other options.

This guide walks through the two ways an agent can get into your app, through a human's account or with its own, and what each one tells you about the person behind it.

TL;DR

  • If agents work for customers you already have, give each agent its own restricted API key or OAuth access from that customer's account. You can cut off one agent without locking out its owner.
  • If you want agents to sign up on their own, AgentID gives each agent a sign-in identity you can use to create its account. Registered apps can request the owner's name and email, subject to sharing permission or approval.
  • Keep bot protection and usage limits alongside either method. Apply them to signup attempts and to activity after sign-in.
  • Sharing an owner's login makes agent activity harder to distinguish from the owner's.

Two ways an agent gets into your app

The person or company running an agent is its owner.

Illustration of one owner connected to three agents

An agent can work inside an existing customer's account or create a separate account in your app. In either case, you need to identify the agent and understand how its access relates to its owner.

ApproachNew signupOwner informationStop one agentSetup
Borrowed loginNo dedicated agent signup flowThe owner's account; agent activity may be indistinguishableDepends on identifying its sessionShared credentials or session
Per-agent API keyRequires an existing accountThe customer who issued the keyRevoke the agent's keyKey issuance and permissions
OAuth or auth.mdauth.md can register users through a trusted providerThe user represented by the grant or registrationRevoke its grant or credentialOAuth endpoints; registration endpoints for auth.md
AgentIDYes, with the required permissionsOwner account ID; name and email with authorized sharingSuspend its app account and end its sessionsAdd the provider and map identity claims

Inside a human's account: borrowed logins, API keys, and OAuth delegation

The account belongs to the customer. A separate key or authorization grant lets you manage each agent's access within that account.

Borrowed logins

An agent can use its owner's email and password or an existing browser session to access your app. If the login requires a verification code, it also needs access to that code.

WorkOS describes workarounds such as syncing browser cookies and retrieving passwords from password managers in logging AI agents into web apps.

When the agent and owner share credentials and your app can't distinguish their sessions. Their actions appear under the same account and you may have to interrupt the owner's access to stop the agent.

Per-agent API keys

If your app has an API, an existing customer can create a separate restricted key for each agent and grant only the permissions it needs.

Stripe supports agent-tagged restricted keys. These keys are subject to approval rules for sensitive actions, including refunds and payouts.

Stripe's API keys documentation, section API keys for autonomous agents, explaining how to tag a key as belonging to an AI agent

To stop that agent's API calls, revoke its key. In a dashboard-based setup, the customer first has to open an account, create the key, and pass it to the agent.

OAuth delegation and auth.md

With OAuth, the owner approves the agent's access and your app issues a token the agent can use. There's no API key to create and copy manually. You can revoke the agent's access later.

WorkOS's auth.md also describes how agents can register users. You publish the file at yourapp.com/auth.md and implement the registration and token endpoints it describes. Agents can then register on behalf of their owners through two flows:

  • User-claimed: The agent shows its owner a code. The owner signs in to your app and confirms the code. A person still takes part in the signup.
  • Agent-verified: A trusted agent provider sends a signed assertion of the owner's identity. Your app checks it and can create an account for the owner without a human completing a signup form. Linking an existing account can require the owner to confirm the connection.
WorkOS blog post Agent Registration with Auth.md, introducing auth.md as an open protocol that lets agents register for your service

The account belongs to the owner, and the agent receives access tied to that account. In the agent-verified flow, your app also knows which provider supplied the owner's identity.

For more on agent identity and delegated access, see Is OAuth enough to verify an AI agent?

An agent may also discover your app before its owner has an account. It needs to register and continue its task without waiting for someone to complete your signup form. Your app still needs to identify it and decide what access to grant.

Its own account: how AgentID lets an agent sign up

AgentID lets an agent sign in with its AgentMail inbox. Your app receives a separate identity for the agent and can use it to create an account. The identity also links the agent to the AgentMail account that owns its inbox.

Manicule's sign-in page with Continue with Google, Sign in with a passkey, and Continue with AgentID buttons

AgentID uses OpenID Connect, the same standard used for sign-in with providers such as Google. Your app uses scopes to ask for specific identity details, such as an email address. Depending on the scopes it requests, it receives:

  • an ID for the agent that stays the same across every app
  • a verified email address you can write to, like any other user's
  • a field that flags the user as an agent
  • an owner ID that groups agents by their AgentMail organization or a separately owned pod (a group of inboxes within an organization)
  • the owner's name and email, when your registered app requests them and sharing is authorized

To receive the owner's name and email, register your app and request the owner profile and email scopes. The agent also needs permission to share those details. Without that permission, the owner must approve the request from their AgentMail account.

You can set a signup cap for each AgentMail organization. This limits how many of that organization's agents can create accounts in your app. It counts organizations, so a person with multiple organizations can have a separate allowance for each.

When the owner has shared their email, you can contact them if one of their agents causes trouble.

Context.dev's founder said he reopened autonomous signup with AgentID after previously locking it down. Yahia Bakour described agents signing up "end-to-end without a human stepping in".

AgentID is free for apps and works with Clerk, Supabase, Auth0, Descope, Okta, Better Auth, and Auth.js v4. WorkOS isn't supported yet.

We tested it: an agent signing up with AgentID

We built a small test app called Fieldnotes and had an agent sign up to it with AgentID.

Fieldnotes lets you search a sample dataset of six fictional companies. A new agent can read the sample data and run three searches, and it can't change records or see any customer data.

The app uses Bun, Better Auth, and SQLite with the official AgentID integration for Better Auth, and the code is on GitHub.

Before the test, we registered Fieldnotes with AgentID and asked for the owner's profile and email.

The test agent's AgentMail key had two permissions: app_connect to sign in to apps, and app_share_owner to share its owner's details. Then we gave the agent one task:

Open Fieldnotes, sign in with AgentID, and search for "Europe data." Report the matching sample companies.

Animated walkthrough of the real Fieldnotes test: successful searches, exhausted allowance, reset allowance, and a final captured HTTP 401 after suspension.

Search and quota checks, followed by a screenshot showing access blocked after suspension.

The agent signed up without anyone stepping in

The agent started the AgentID sign-in, approved it through the AgentMail API, and came back to Fieldnotes with its own account. Once the app and the agent's key were set up, nobody had to do anything.

Fieldnotes knew who was behind the agent

When the agent signed up, Fieldnotes received:

  • the agent's ID and its inbox address
  • an owner ID, which is the same for every agent from that AgentMail organization
  • the owner's name and email

So if this agent caused trouble, we'd know whose agent it was and how to reach them.

AgentID identity returned to Fieldnotes, showing agent and owner claim names with personal values redacted and both email verification flags true.

Fieldnotes kept the agent within its limits

The search for "Europe data" returned Northstar Data and Cedar Pipeline. And we also tested if our policy of only allowing 3 free searches was working or not.

Fieldnotes returns Northstar Data and Cedar Pipeline for Europe data, with two of three searches remaining and HTTP 200 in the request history.
What we didWhat happened
Ran three searchesAll three returned results (HTTP 200)
Ran a fourth searchBlocked because the allowance ran out (HTTP 429)
Suspended the account, then searched from the same sessionBlocked and asked to sign in again (HTTP 401)
Fieldnotes shows quota_exhausted and HTTP 429 after the fourth search.

Suspending the account also deleted its sessions in Fieldnotes, so the agent's open session stopped working right away.

Fieldnotes returns sign_in_required and HTTP 401 from the same browser session after the allowance was reset and the account suspended.

AgentID handled the sign-in and told Fieldnotes who owned the agent.

Whichever way an agent gets in, your app decides what it can do once it's there. The 3 key decisions are:

  • What can it access? Give it only the data and actions it needs, and require a customer's permission before it can access their private data.
  • How much can it use? Enforce usage limits on your server for each agent and owner account, so creating more agents doesn't multiply the allowance.
  • How to stop it? Let your team suspend its account and end its active sessions in your app.

Bot protection: blocking, bot scores, rate limits, and Web Bot Auth

Bot protection can filter sign-up attempts and limit abusive requests after sign-in. Use it alongside the permissions and account limits your app enforces.

  • Blocking: Cloudflare lets you block or allow each kind of bot across your site, from search crawlers to agents acting for a person in real time.
  • Bot scores: Cloudflare scores every request from 1 to 99 on how likely it is to come from a human. You can write rules that challenge or block low scores on specific pages, like sign-up and login. The full 1 to 99 score needs Cloudflare's Enterprise Bot Management plan.
  • Rate limits: These cap requests in a set window. Apply limits to signup attempts and to authenticated requests, using the identifiers your system supports, such as an IP address, session, or account.
  • Web Bot Auth: A bot operator signs its requests, and Cloudflare verifies the signature. You can use that verified operator identity in your access rules. It doesn't identify the customer on whose behalf an agent is acting.

A request can pass bot checks and still exceed an account's permissions or usage allowance. Your app needs to enforce those limits after authentication too.

FAQ

Can an AI agent sign up to my app without a person?

Yes. AgentID can let an agent sign up as itself when it has the required permissions. The agent-verified flow in auth.md can register an account on behalf of its owner through a trusted provider. Either flow may require human approval when its conditions aren't met.

Do I always get the owner's name and email with AgentID?

Your app must be registered and request the owner profile and email scopes. The agent needs permission to share those details, or its owner must approve the request. An app that uses AgentID without registering is called an open client, and it can't request the owner's name or email.

How do I limit signups from one owner?

Set "Maximum signups per owner" in your registered application's AgentID settings. It defaults to unlimited; setting it to 0 stops new signups while existing agents can still sign in. The cap counts AgentMail organizations. A limit per unique person needs your own policy and a person identifier when available.

Can I tell whether the owner is a real person?

If the owner has verified with World ID and your registered app receives the owner profile scope, AgentID includes a verified-human flag and a person identifier. Missing verification means the person's status is unknown.

Does a verified agent mean it's safe?

AgentID verifies a sign-in identity and its relationship to an owner account. Your app decides which actions to allow and what limits to apply. A verified identity doesn't guarantee safe behavior.

How long does an agent stay signed in?

Your app decides how long an agent stays signed in. Revoking its AgentID sign-in key prevents new sign-ins, but doesn't end an existing session in your app. Your app must end that session separately.

Which way in to choose

We'd use a separate restricted key or OAuth grant for an agent working inside an existing customer's account. AgentID fits agents registering as users of your app.

Whichever method you choose, give new agents the permissions and usage allowance they need, record their actions, and make sure your team can suspend their access.

To add AgentID, run npx @agentmail/agentid-cli init from your app's root folder, or set it up in the AgentID console.

Blog

Suggested reading

View all posts

Guides · October 1, 2026

AgentID with Clerk: What Breaks and Why

What goes wrong after turning on Clerk’s AgentID connection, and why: owner claims that are not on the Clerk user and must be fetched from userinfo, what to store on your user record, disabled connections, redirect URI mismatches, and the strategy name for custom buttons.

Prompt

Give yourself access to AgentMail
by following the guide at:

https://docs.agentmail.to/agent-onboarding

and refer to:

https://docs.agentmail.to/llms.txt

for the documentation index.

Give your agent an identity of its own.

Create an AgentMail inbox and let your agent start signing in as a real user.