Scouty runs on Mermail

Explore
Back to blog
Email6 min read

OIDC for AI Agents: Who Is the Agent, and Who Answers for It?

Most agents still borrow their human's login. Here is what OpenID Connect for AI agents means, how it differs from OAuth, and what you can do today.

By Toan Nhu

Mermail field guide cover reading Who is the agent, really?, with a principal delegating to an agent that has its own inbox, OAuth access and wallet

Picture an agent signing in to a vendor portal with your account. It works. Then the vendor's logs show you approving a dozen changes at 2 a.m., in a session you never saw. Nothing was hacked. The system just had no way to say "this was an agent acting for you" instead of "this was you."

That gap is what people mean when they talk about OpenID Connect for AI agents. Here is a plain explanation of what it is, where it fits next to OAuth, and how to give your own agents an identity today without waiting for every app to catch up.

OIDC in one minute

OpenID Connect is an identity layer built on top of OAuth 2.0. When you click "Sign in with" on a website, OIDC is usually what runs underneath.

  • An identity provider signs you in and issues an ID token, a signed JSON Web Token.
  • The token carries claims, such as who you are (sub), who issued it (iss), which app it is for (aud) and when it expires (exp).
  • The app checks the signature against the provider's published keys, checks the claims, and trusts the result.

The design assumes a person is at the keyboard: someone types a password, approves a consent screen and is the subject of the token.

Why agents strain the default model

An agent is not the human, but today it usually borrows the human's login. That causes three problems.

  • Everything looks like you. Logs, audit trails and rate limits treat the agent's actions as yours. When something goes wrong, nobody can tell which actions were delegated.
  • No clean way to revoke. If the agent uses your session, cutting it off often means logging yourself out too.
  • Scope is all or nothing. Your login can do everything you can do. The agent needed to read invoices, not change bank details.

Authorization vs identity: OAuth and OIDC

These two get mixed up constantly, so it helps to separate the questions.

  • OAuth answers "what may this client do?" It hands a client an access token with specific scopes, on behalf of a user. That is delegation.
  • OIDC answers "who is this?" It hands an app a signed statement about identity.

For agents, the useful idea is to keep both answers honest: the agent gets its own identity, and the human appears as the accountable party who delegated to it, rather than as the one who acted.

Principal and delegate

Think of two roles.

  • The principal is the person or organization responsible. They approve what the agent may do and answer for it.
  • The delegate is the agent. It acts, within limits, on the principal's behalf.

A well-designed agent identity makes the delegate the subject and records the principal as a separate, verifiable fact. Proposals in this space, such as OAuth token exchange with an actor claim (RFC 8693), express exactly that: one party acting for another.

What a good agent identity token should say

Whatever provider issues it, an ID token for an agent should let a receiving app answer these questions without guessing:

  1. Which agent is this? A stable identifier for the agent, not the human.
  2. Who issued the identity? A known issuer whose signing keys the app can fetch.
  3. Who is accountable? The principal, as a distinct claim.
  4. Is it meant for me? An audience that matches the receiving app.
  5. Is it still valid? A short expiry, so a leaked token loses value quickly.

How an app verifies one

The checks are the same ones apps already run for human sign-in:

  • Fetch the issuer's discovery document at /.well-known/openid-configuration.
  • Use the published JWKS to verify the token's signature.
  • Confirm iss matches the expected issuer and aud includes your app.
  • Reject the token if exp has passed.
  • Apply your own policy to the principal and agent claims before granting access.

Nothing here is new cryptography. The work is in agreeing what the claims mean.

Identity you can give an agent today

Most of the apps your agent touches do not accept agent ID tokens yet. You can still stop it from borrowing your login. With Mermail, an agent gets identity and access through three practical layers:

  • Its own address. Each agent gets its own mailbox, hosted or on your verified custom domain. Email is still how most services verify an account, so a dedicated address lets the agent sign up and receive verification mail as itself, not as you. See One Service, One Mailbox.
  • Delegated access with OAuth. Mermail MCP supports OAuth 2.1. Your MCP client discovers the server through Protected Resource Metadata, you sign in and pick a workspace, and the client receives a bearer token. That is OAuth delegation working as intended: the agent acts with your approval, and you can revoke it.
  • A wallet-bound identity. On the Agent Marketplace API, payment is the credential. A zero-amount x402 challenge works as an identity handshake: nothing is charged, but the signed payment binds the agent's wallet address to the hosted inboxes it owns. Spending runs through Agent Wallet, controlled by PayBox.

And for anything that commits you, keep a human in the loop. Mermail can save replies as drafts for review instead of sending them.

To be clear about scope: Mermail is not an OpenID Connect provider. It gives your agent an address, OAuth-based access and a wallet, which covers the "act as itself, accountable to you" problem for email and payments today. Why those pieces belong together is the argument in The Agentic Internet Needs More Than Wallets and An Inbox Isn't Enough.

A starter checklist

  • Give each agent its own mailbox instead of your personal inbox.
  • Connect agents through OAuth where the app supports it, and keep API keys for automation you control.
  • Use a separate wallet with limits for anything that spends money.
  • Default outbound mail to drafts until you trust the agent on that task.
  • Write down, per agent, who the principal is and how to revoke access.

For the controls that keep this safe as you scale, read How to make AI agents enterprise ready. To try it, create an agent mailbox in the Mermail console.

FAQ

What is OIDC for AI agents?

It is the idea of using OpenID Connect so an agent can prove its own identity to an app, with the human or organization recorded as the accountable principal instead of being the one who signed in.

What is the difference between OAuth and OIDC for agents?

OAuth grants a client limited permission to act for a user. OIDC tells an app who someone is. Agents need both: delegated permission and an identity of their own.

Is Mermail an OIDC provider?

No. Mermail gives each agent its own mailbox, OAuth 2.1 access through MCP, and a wallet-bound identity on its Agent Marketplace API. It does not issue OpenID Connect ID tokens.

Why not let the agent use my login?

Because every action then looks like yours, access is hard to revoke without logging yourself out, and the agent can do everything you can do.

How should an app verify an agent's identity token?

The same way it verifies a human one: fetch the issuer's discovery document, verify the signature with its JWKS, and check issuer, audience and expiry before applying its own policy.

References

Recent articles