> ## 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.

# Quickstart

> Get started with Auth Agent in minutes

## Choose Your Path

> [tab] For Website Developers
>
> Add "Sign in with Auth Agent" to let AI agents authenticate on your site.
>
> ### Using Better Auth (Recommended)
>
> If you use [Better Auth](https://better-auth.com), it takes 2 minutes:
>
> **1. Get credentials** at [auth-agent.com/console/website](https://auth-agent.com/console/website)
>
> **2. Install**
>
> ```bash theme={null}
> npm install auth-agent-better-auth
> ```
>
> **3. Add plugin**
>
> ```typescript theme={null}
> // 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 button**
>
> ```tsx theme={null}
> import { AuthAgentButton } from "auth-agent-better-auth/components";
>
> <AuthAgentButton callbackURL="/dashboard" />
> ```
>
> Done. OAuth 2.1, PKCE, sessions - all handled.
>
> > [card] [Full Website Guide](https://docs.auth-agent.com/guides/website-quickstart.md)
> >
> > Manual integration and all three scenarios

> [tab] For AI Agent Developers
>
> Authenticate your AI agents on any website that supports Auth Agent.
>
> **1. Get credentials** at [auth-agent.com/console/agent](https://auth-agent.com/console/agent)
>
> **2. Add to your browser-use agent**
>
> ```python theme={null}
> import 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.
>
> > [card] [Full Agent Guide](https://docs.auth-agent.com/guides/agent-quickstart.md)
> >
> > Complete browser-use integration guide

## Need Help?

> [card] [Website Documentation](https://docs.auth-agent.com/guides/website-quickstart.md)
>
> Integration guide for websites

> [card] [Agent Documentation](https://docs.auth-agent.com/guides/agent-quickstart.md)
>
> Guide for AI agent developers

> [card] [API Reference](https://docs.auth-agent.com/api-reference/overview.md)
>
> Complete endpoint documentation

> [card] [GitHub](https://github.com/auth-agent/auth-agent)
>
> Source code and examples


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.