Technology & AI

WorkOS Releases auth.md: An Open Agent Registration Protocol Built on OAuth Standards

Many yearsAuthenticating on the web follows a single design assumption: one sits behind the browser. Click the button. Fill out the form. Confirm the email. Copy the API key and paste it elsewhere.

That model doesn’t work when the user sends a job to the agent. Agents are already coding, opening pull requests, purchasing tickets, querying systems, and updating records. But many products still have a real way for an agent to sign up. The way it works – giving the agent a raw API key or session token – generates untested credentials, which are difficult to audit per session, and impossible to selectively revoke. WorkOS proposes a structured alternative: auth.md, an open protocol for agent registration.

What is auth.md?

auth.md is a small Markdown file that an application publishes to a well-known environment – usually https://service.com/auth.md. The file tells agents how to subscribe to that service: what flows are supported, what scopes are available, and how credentials are issued, audited, and revoked.

Because it is plain-text Markdown, the same file serves as documentation for human developers and as runtime artifact agents that can read systematically. The agent downloads the file, reads the edited sections, selects the correct flow, and registers — without filling out a form.

Discovery operates in two hops. The machine-readable source of truth resides in it /.well-known/oauth-protected-resource (Protected Resource Metadata, or PRM). It promotes the resource and points to the Authorization Server. Authorization Server Metadata at /.well-known/oauth-authorization-server carries the agent_auth block – a structured object that tells agents which flows are supported, and for what register_uri, claim_uri, revocation_uriagain identity_types_supported prices are there. I auth.md file is a prose companion that points to agents in this discovery process.

For any 401 from the API, the service must return a WWW-Authenticate: Bearer resource_metadata="..." header so that agents can perform bootstrap detection without reading the documentation first.

Two Streams of Enrollment

auth.md defines two main flows. The application can support either or both.

Agent guaranteed flow: An agent identity provider — OpenAI, Anthropic, Cursor, or any trusted platform — proves the user’s identity during registration. The agent requests an audience-specific ID-JAG from its provider, and SENDS IT to the application. /agent/auth endpoint. The application determines the ID-JAG header to receive kid again algchecks the issuer from the list of trusted providers, downloads the provider’s JWKS, verifies the signature, verifies the claims (aud, exp, iat, jti, client_id), and returns information asynchronously. No OTP, no email back and forth, no human interaction required.

The result is a record of each post (iss, sub, aud) that the provider can withdraw at any time BY SENDING an opt-out token revocation_uri. Applications that already use JIT-provision from OIDC or SAML will see this pattern — it’s the same shape with a different issuer. One important caveat: access tokens issued for ID-JAG authentication must not include a refresh token. The agent must introduce a new ID-JAG to extend access.

User claim flow: This is an OTP based method that does not require the participation of the provider. The agent registers through the app, and the user commits to the registration by reading a one-time code from an email sent back to the agent. Both ends of the claims are /agent/auth/claim (to activate the OTP email) and /agent/auth/claim/complete (moving the code).

This flow has two initial states. Of unknown start otherwise, the agent registers without an identity and receives information immediately, accessed by the pre-request permissions defined by the application. At any time before the registration expires, the agent processes the OTP event to bind the identity to the original user and update the scopes. The API key is not rotated through the claim — scope development is in place.

Of email is required otherwise, the agent provides the user’s email at registration. Verification is completely withheld until the OTP event ends. Use this if any use of the previous claim is unacceptable.

User matching and testing

When information is released, the service needs to match the registration with an existing user or provide a new one. The recommended solution is: match the previous record of the same posting (iss, sub) pair first; then match in the verified email; then JIT-provision for the new user according to application policy — or reject if the product needs manual onboarding.

For incident detection and response, the documentation recommends recording a common set of audit events: registration.created, claim.requested, otp.generated, claim.confirmed, registration.expiredagain registration.revoked. For the ID-JAG flow, enter iss, subagain agent_platform so operators can relate to provider-side logs.

Marktechpost Visual Explainer

01 / 07 Overview

What is auth.md?

auth.md is a small Markdown file that your application publishes to its domain. It tells AI agents how to register on behalf of a user: what flows are supported, what scopes are available, and how credentials are issued, audited, and revoked.

Because it is plain-text Markdown, the same file serves as documentation for human developers and as runtime artifact agents that can read systematically.

Open Protocol

No WorkOS account is required

It is based on OAuth

02 / 07 Discovery

How Agents Get Your Results

Discovery operates in two hops. Your API returns a header for all 401s that point to Secure Resource Metadata. The PRM identifies the Authorization Server, which manages the agent_authority block with all endpoint URLs.

1

Agent hits your API, gets it 401 Unauthorized with WWW-Confirm header pointing to PRM

2

The agent is downloading /.well-known/oauth-protected-resource to get the Authorization Server URL

3

The agent is downloading /.well-known/oauth-authorization-server and you read i agent_authority block: register_uri, claim_uri, revocation_uri, identity_types_supported

WWW-Authenticate: Bearer resource_metadata=”

03 / 07 Flow 1

Agent’s Guaranteed Flow

The agent’s identity provider (OpenAI, Anthropic, Cursor, etc.) proves the user’s identity using ID-JAG. No human interaction is required. The details are returned accordingly.

1

The agent requests the user permission to verify your identity on your service

2

An agent is asking for a specific audience ID-JAG from its provider

3

Agent SENDS ID-JAG to your /agent/authority endpoint

4

Your service verifies the signature against the provider’s JWKSvalidates claims (aud, exp, iat, jti), matches user, and returns credentials

5

Withdrawal: OPPORTUNITIES for suppliers a exit token in your withdrawal_uri. The shipping record is the same (iss, sub, aud) a tuple.

Exchange: only works if the agent provider supports ID-JAG execution. MCP servers and empty LLM API calls generally cannot.

04 / 07 Flow 2

User Desired Flow

OTP based registration. No provider participation is required. The agent triggers the code, the user reads it again, and the account is claimed. Two starting conditions:

Anonymous user

  • An agent registers without an identity
  • Evidence is released immediately on the scope of the previous claim
  • The agent can start work immediately
  • The OTP event is conducted later to bind the real user
  • The development of scopes is in place, the key is not rotated

Email is required

  • The agent provides the user’s email upon registration
  • The app sends the OTP email immediately
  • No proof is issued until the OTP is verified
  • Use when any prior claim access is unacceptable
  • A new confirmation has been issued for /claim/complete

POST /agent/authorization/claim — initiate OTP email POST /agent/authorization/claim/complete — submit 6-digit code

05 / 07 Confirmation

Types of authentication and usage

Your service determines whether to issue access_token or i api_key. Both are presented in the same way in API requests.

Authority: Carrier

01

access_token (ID-JAG flow): No refresh token has been issued. The agent must introduce a new ID-JAG to extend access.

02

api_key (anonymous or email flow): Which doesn’t expire by default. Scope development in the area after completion of OTP claim.

03

In any case 401 from previously active credentialsthe agent drops it and restarts the discovery from step 1.

04

Authentication is checked, tied to the original user, and independently revoked by the provider or user.

06 / 07 Implementation

User matching, JIT provisioning and auditing

When the information is extracted, your service resolves which user the subscription belongs to. Recommended decision:

1

Same for shipping record: before (iss, sub) pair. The strongest identifier, what the provider considers stable.

2

Confirmed email matches: a link to an existing user with the same verified email.

3

JIT supply: create a new user according to your policy, or decline if manual onboarding is required.

Recommended research events to record:

registration.created

want. requested

seek.confirmed

registration.expired

registration.cancelled

07 / 07 Start

Mini Performance Checklist

01

Publish auth.md to your service origin with supported flows, scopes, and endpoint URLs

02

Publish /.well-known/oauth-protected-resource with the agent_auth block

03

Come back WWW-Confirm Subject to all 401 responses

04

Use it /agent/authority endpoint submission with type: anonymous or identity_assertion

05

For the user charged: use /agent/auth/claim again /agent/auth/claim/complete with OTP logic

06

For an authenticated agent: save a provider trust listverify ID-JAG signatures against JWKS, use jti replay protection

Specify + full auth.md template: github.com/workos/auth.md — Early access: [email protected]

Key Takeaways

  • auth.md is an open protocol: applications host a Markdown file in service.com/auth.md explaining how agents register and receive comprehensive information.
  • Two flows are supported: agent authentication (based on ID-JAG, synchronous, no human interaction) and user request (OTP based, no provider integration required).
  • Discovery is two-hop: PRM in /.well-known/oauth-protected-resource points to an Authorization Server, whose metadata contains the agent_auth block with supported endpoint and flow URLs.
  • The protocol incorporates existing OAuth standards (RFC 9728, ID-JAG) and is not tied to the WorkOS infrastructure.

Check it out Repo again Technical details. Also, feel free to follow us Twitter and don’t forget to join our 150k+ ML SubReddit and Subscribe to Our newspaper. Wait! are you on telegram? now you can join us on telegram too.

Need to work with us on developing your GitHub Repo OR Hug Face Page OR Product Release OR Webinar etc.? contact us


Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button