Open Source · MIT Licensed · TypeScript + Python

Make your website
agent-ready

Drop-in middleware that lets AI agents register, authenticate, and pay for your API. No browser, no forms, no CAPTCHA. Under 500ms.

npm install @agentdoor/express
<500ms
Agent onboarding
3 lines
To integrate
<5ms
Auth verification
0
Browser needed

Three lines. Any framework.

AgentDoor sits alongside your existing auth. Clerk handles humans, AgentDoor handles agents. Same API, two doors.

  server.js
const express = require("express");
const agentdoor = require("@agentdoor/express");

const app = express();

app.use(agentdoor({
  scopes: [
    { id: "data.read", description: "Read data", price: "$0.001/req" },
    { id: "data.write", description: "Write data", price: "$0.01/req" }
  ]
}));

// Your existing routes — now agent-ready
app.get("/api/data", (req, res) => {
  if (req.isAgent) {
    console.log(`Agent ${req.agent.id} requesting data`);
  }
  res.json({ data: "hello" });
});
  middleware.ts
import { agentdoor } from "@agentdoor/next";

export default agentdoor({
  scopes: [{ id: "data.read", description: "Read" }],
  pricing: { "data.read": "$0.001/req" }
});

export const config = { matcher: ["/api/:path*"] };
  worker.ts
import { Hono } from "hono";
import { agentdoor } from "@agentdoor/hono";

const app = new Hono();
app.use("*", agentdoor({
  scopes: [{ id: "data.read", description: "Read" }]
}));
  server.ts
import Fastify from "fastify";
import { agentdoor } from "@agentdoor/fastify";

const app = Fastify();
app.register(agentdoor, {
  scopes: [{ id: "data.read", description: "Read" }]
});
  main.py
from fastapi import Depends, FastAPI
from agentdoor_fastapi import AgentDoor, AgentDoorConfig, AgentContext

app = FastAPI()
gate = AgentDoor(app, config=AgentDoorConfig(
    service_name="My API",
    scopes=[{"name": "read", "description": "Read access"}],
))

@app.get("/protected")
async def protected(agent: AgentContext = Depends(gate.agent_required())):
    return {"agent": agent.agent_id}

Five steps. Zero browser.

AgentDoor uses Ed25519 challenge-response authentication. The agent's private key never leaves the agent. Total flow under 500ms.

01
🔍

Discover

GET /.well-known/ agentdoor.json

~50ms
02
📝

Register

POST pubkey + scopes → get nonce

~100ms
03
🔏

Verify

Sign nonce → get API key + JWT

~200ms
04

Access

Bearer token on all requests

ongoing
05
🔄

Refresh

Sign timestamp → new JWT

~50ms

Real cryptography. In your browser.

This generates a real Ed25519 keypair, signs a real challenge, and verifies the signature — all using the Web Crypto API. No simulation.

agentdoor — auth flow   WebCrypto Ed25519
Uses Web Crypto API — real keys, real signatures

Auto-generated. Standards-based.

AgentDoor auto-generates a discovery endpoint so agents can find your API's capabilities, pricing, and auth methods with a single GET request.

GET /.well-known/agentdoor.json
{
  "agentdoor_version": "1.0",
  "service_name": "Your API",
  "registration_endpoint": "/agentdoor/register",
  "auth_endpoint": "/agentdoor/auth",
  "scopes_available": [
    {
      "id": "data.read",
      "description": "Read data",
      "price": "$0.001/req",
      "rate_limit": "1000/hour"
    }
  ],
  "auth_methods": ["ed25519-challenge", "x402-wallet", "jwt"],
  "payment": {
    "protocol": "x402",
    "version": "2.0",
    "networks": ["base"],
    "currency": ["USDC"]
  }
}

OAuth was built for humans.

Agents don't have browsers. They can't click consent screens. AgentDoor gives them a native path.

OAuth 2.1

Designed for humans
Browser requiredYes
Round-trips5+
Onboarding time30-60s
Consent screenRequired
Secret exposureToken every req
Agent-nativeNo

AgentDoor

Designed for agents
Browser requiredNo
Round-trips2
Onboarding time<500ms
Consent screenNone
Secret exposureKey never sent
Agent-nativeYes

Works with everything you use.

Framework adapters, auth companion plugins, payment integrations.

🟢 Express
Next.js
🔥 Hono
Fastify
🐍 FastAPI
☁️ Cloudflare Workers
Vercel Edge

Sits alongside your existing auth.

AgentDoor doesn't replace Clerk or Auth0 — it adds an agent door next to your human door.

🔑
Clerk
Agents in Clerk dashboard
🔐
Auth0
M2M client bridge
🟩
Supabase
RLS-aware storage
🔶
Firebase
Firebase Auth users
💳
Stripe
x402 → Stripe invoices
🔗
NextAuth
Agent provider

Your API has agent traffic.
Give it a front door.

Open source. MIT licensed. Ship in 5 minutes.