One script tag. Any AI agent can now discover, authenticate, and use your app programmatically.
<script src="https://cdn.jsdelivr.net/npm/agentdom@3/agentdom.js"></script>Three ways to add AgentDOM to your app.
Add this before </body> in your HTML:
<!-- AgentDOM v3 — makes your site agent-ready -->
<script src="https://cdn.jsdelivr.net/npm/agentdom@3/agentdom.js"></script>That's it. Any agent using AgentDOM can now scan and interact with your page.
Customize AgentDOM for your specific app.
/agentdom.json)Place this at your site root to tell agents what your app offers:
{
"agentdom": "3.0.0",
"name": "Your App",
"description": "What your app does",
"auth": {
"methods": ["form", "oauth2"],
"login_url": "/login"
},
"capabilities": [
{ "name": "search", "url": "/search" }
]
}Add data-agentdom-* attributes so agents understand your forms:
<form data-agentdom-intent="authenticate">
<input name="email" type="email"
data-agentdom-field="email">
<input name="password" type="password"
data-agentdom-field="password">
<button type="submit">Log In</button>
</form>
<!-- Agent auto-generates: login(email, password) -->Let agents authenticate with your service securely.
Agent fills your login form directly. No API changes needed.
login(email: "user@co.com",
password: "agent-token")
// AgentDOM fills + submitsStandard OAuth2 flow with agent-specific scopes.
"auth": {
"methods": ["oauth2"],
"oauth2": {
"authorize_url": "/oauth/authorize"
}
}Issue agent-specific API keys with limited scopes.
<input name="api_key"
data-agentdom-field="api_key">Short-lived tokens for agent sessions.
POST /auth/agent-token
{ "agent_id": "agentdom-v3",
"scopes": ["read"], "ttl": 3600 }Your page's forms and buttons automatically become callable tools.
| Your Page Has | Agent Gets | Example |
|---|---|---|
| Login form | login(email, password) | Gmail, Stripe |
| Search bar | search(query) | Google, Amazon |
| Signup form | create_account(name, email, pwd) | Any registration |
| Checkout form | checkout(card, exp, cvc) | Stripe, Shopify |
| Nav links | navigate_to(destination) | Dashboard |
| Buttons | subscribe(), download() | SaaS apps |
JavaScript API available on any page with AgentDOM.
AgentDOM.scan()Returns structured JSON schema of all forms, buttons, and links.
AgentDOM.scanWithTools()Scan + auto-generate tools. Returns schema with tools array.
AgentDOM.synthesizeTools(schema?)Generate tools from a schema. Returns { tools, page_type, summary }.
AgentDOM.click(selector)Human-like click with bezier mouse path.
AgentDOM.type(selector, text)Type with realistic keystroke timing. React-compatible.
AgentDOM.fillForm(selector, data)Fill entire form from { fieldName: value } object.
AgentDOM.submitForm(selector)Find and click the submit button.
AgentDOM.hover(selector, duration?)Hover with pointer events. Triggers tooltips and dropdowns.
| Protocol | Endpoint | Use Case |
|---|---|---|
| HTTP API | POST /tools/discover | Scan URL → get tools |
| HTTP API | POST /tools/execute | Execute a tool |
| MCP | tools/list | Claude / Cursor |
| OpenAI | Function Calling | Tools per turn |
| Gemini | Function Calling | Tools per turn |
| A2A | /.well-known/agent.json | Agent Card |