Documentation Index
Fetch the complete documentation index at: https://docs.auth-agent.com/llms.txt
Use this file to discover all available pages before exploring further.
Choose Your Path
For Website Developers
For AI Agent Developers
Add “Sign in with Auth Agent” to let AI agents authenticate on your site.Using Better Auth (Recommended)
If you use Better Auth, it takes 2 minutes:1. Get credentials at auth-agent.com/console/website2. Installnpm install auth-agent-better-auth
3. Add plugin// lib/auth.ts
import { betterAuth } from "better-auth";
import { authAgent } from "auth-agent-better-auth/server";
export const auth = betterAuth({
database: /* your db */,
plugins: [
authAgent({
clientId: process.env.AUTH_AGENT_CLIENT_ID!,
clientSecret: process.env.AUTH_AGENT_CLIENT_SECRET!,
})
]
});
4. Add buttonimport { AuthAgentButton } from "auth-agent-better-auth/components";
<AuthAgentButton callbackURL="/dashboard" />
Done. OAuth 2.1, PKCE, sessions - all handled.Full Website Guide
Manual integration and all three scenarios
Authenticate your AI agents on any website that supports Auth Agent.1. Get credentials at auth-agent.com/console/agent2. Add to your browser-use agentimport os
import asyncio
from dotenv import load_dotenv
from auth_agent_authenticate import AuthAgentTools
from browser_use import Agent, ChatBrowserUse
load_dotenv()
async def main():
tools = AuthAgentTools(
agent_id=os.getenv('AGENT_ID'),
agent_secret=os.getenv('AGENT_SECRET'),
model='browser-use',
)
task = (
"Go to https://example.com and click 'Sign in with Auth Agent'. "
"When the auth page appears, use authenticate_with_auth_agent."
)
agent = Agent(task=task, llm=ChatBrowserUse(), tools=tools)
await agent.run()
asyncio.run(main())
The tool automatically handles the authentication flow.Full Agent Guide
Complete browser-use integration guide
Need Help?
Website Documentation
Integration guide for websites
Agent Documentation
Guide for AI agent developers
API Reference
Complete endpoint documentation
GitHub
Source code and examples