> ## Documentation Index
> Fetch the complete documentation index at: https://auth0.com/ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Auth0 for AI Agents

> Secure your AI agents with robust user authentication, secure API access, human-in-the-loop controls, and fine-grained authorization.

<Card title="Secure your AI Agents with robust user authentication, secure API access, human-in-the-loop controls, and fine-grained authorization for your data." icon="sparkles" iconType="solid" horizontal />

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/auth0-genai/img/intro/Hero-diagram.png" alt="Universal login screen" />
</Frame>

### User authentication

Securely authenticate users in your AI agents using Auth0's [Universal Login](https://auth0.com/docs/authenticate/login/auth0-universal-login) with support for social, enterprise, and custom identity providers. This allows you to leverage robust standards like OAuth 2.0 and OpenID Connect to secure both interactive and headless AI agents. [Learn More](./user-authentication).

### Call your APIs on a user's behalf

Enable AI agents to securely call your application's own APIs (first-party APIs) on behalf of a user using OAuth 2.0. This pattern ensures that the user's context is maintained, preventing agents from having broad, unrestricted access to all user data. [Learn More](./call-your-apis-on-users-behalf).

### Call other's APIs on a user's behalf using Token Vault

Securely connect AI agents to external tools and services like Google, Slack, or GitHub. Our Token Vault feature manages the complexities of obtaining, storing, and refreshing API tokens, allowing your agents to interact with third-party APIs without handling sensitive credentials or API keys directly. [Learn More](./token-vault).

### Asynchronous authorization

Implement "human-in-the-loop" workflows for actions that are long-running or require user consent. Using standards like [CIBA (Client-Initiated Backchannel Authentication)](https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-initiated-backchannel-authentication-flow), agents can request approval for sensitive operations via push notifications, SMS, or email, even when the user is not actively using the application. [Learn More](./asynchronous-authorization).

### Authorization for RAG

Enforce fine-grained, document-level access control within your Retrieval Augmented Generation (RAG) pipelines using [Auth0 FGA](https://auth0.com/fine-grained-authorization). This ensures that when a Large Language Model (LLM) generates a response, it only uses data that the current user is authorized to see, preventing [sensitive data leakage](https://genai.owasp.org/llmrisk/llm022025-sensitive-information-disclosure/) and ensuring compliance. [Learn More](./authorization-for-rag).

## Get started

Follow our [quickstart guides](/get-started/overview) for a step-by-step tutorial on implementing authentication and authorization in your AI agents.

## Sample applications

Explore our sample applications and templates

<Columns cols={1}>
  <Card href="https://github.com/auth0-samples/auth0-assistant0" title="Assistant0" vertical>
    A fullstack AI personal assistant with pre-configured tools that
    demonstrates different Auth0 for AI Agents features like User Authentication,
    calling APIs (Gmail, Google Calendar, etc.) securely using Token Vault,
    Human-in-the-loop interactions using Asynchronous Authorization, and using
    Auth0 FGA for securing RAG tools.

    `NEXT.JS` `FASTAPI` `VERCEL AI` `LANGCHAIN` `LLAMAINDEX`
  </Card>

  <Card title="SmartHR Assistant" vertical href="https://github.com/auth0-samples/auth0-ai-smart-hr-assistant">
    An AI HR assistant that provides secure access to HR documents based on
    complex authorization rules. This demonstrates the use of Auth0 FGA to
    secure RAG applications with relationship-based access control (Fine-Grained
    Authorization).

    `NEXT.JS` `LLAMAINDEX`
  </Card>

  <Card href="https://github.com/auth0-samples/auth0-ai-samples" title="AI Samples" vertical>
    Explore our repository of standalone sample applications that showcase
    Auth0's authentication and authorization capabilities in generative AI
    applications. Each sample demonstrates a specific Auth0 for AI Agents feature.

    `LANGCHAIN` `FASTAPI` `VERCEL AI` `LLAMAINDEX`
  </Card>
</Columns>

## Frameworks & SDKs

Explore samples and SDKs for the different frameworks supported by Auth0 for AI Agents.

<Columns cols={3}>
  <Card href="/sdks/javascript-sdk" icon="js" iconType="solid" horizontal title="JavaScript" />

  <Card href="/sdks/python-sdk" icon="python" iconType="solid" horizontal title="Python" />

  <Card
    href="/sdks/langchain-sdk"
    icon={
  <img
    src="https://mintlify-assets.b-cdn.net/auth0/langchain.svg"
    alt="LangChain"
  />
}
    horizontal
    title="LangChain"
  />

  <Card
    href="/sdks/llamaindex-sdk"
    icon={
  <img
    src="https://mintlify-assets.b-cdn.net/auth0/llamadex.svg"
    alt="LlamaIndex"
  />
}
    horizontal
    title="LlamaIndex"
  />

  <Card
    href="/sdks/vercel-ai-sdk"
    icon={
  <img
    src="https://mintlify-assets.b-cdn.net/auth0/vercel.svg"
    alt="Vercel AI"
  />
}
    horizontal
    title="Vercel AI"
  />

  <Card
    href="/sdks/cloudflare-sdk"
    horizontal
    title="Cloudflare"
    icon={
  <img
    src="https://mintlify-assets.b-cdn.net/auth0/cloudflare.svg"
    alt="Cloudflare"
    height={48}
    width={48}
  />
}
  />

  <Card
    href="/sdks/genkit-sdk"
    icon={
  <img
    src="https://mintlify-assets.b-cdn.net/auth0/genkit.svg"
    alt="Genkit"
  />
}
    horizontal
    title="Genkit"
  />
</Columns>
