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

# LangChain SDKs & Samples

> Auth0 for AI Agents LangChain & LangGraph SDKs make it easy for developers to integrate with and secure AI agent workflows using LangChain and LangGraph.

## JavaScript & TypeScript

### [Auth0 AI for LangChain](https://github.com/auth0/auth0-ai-js/tree/main/packages/ai-langchain)

This SDK provides building blocks for using Auth0 for AI Agents with [LangChain](https://www.langchain.com/) and [LangGraph](https://www.langchain.com/langgraph). It supports:

* A RAG Retriever for using OpenFGA
* Tools for implementing asynchronous user authentication
* Tools for getting access tokens for third-party connections
* [OpenFGA-based](https://openfga.dev/) tool authorizers

```bash wrap lines theme={null}
npm install @auth0/ai-langchain
```

## Python

### [Auth0 AI for LangChain](https://github.com/auth0/auth0-ai-python/tree/main/packages/auth0-ai-langchain)

This SDK provides building blocks for using Auth0 for AI Agents with LangChain and LangGraph. Includes a RAG Retriever for using OpenFGA, tools for implementing asynchronous user authentication, tools for getting access tokens for third-party connections, and OpenFGA-based tool authorizers. It supports:

* A RAG Retriever for using OpenFGA,
* Tools for getting access tokens for third-party connections,
* OpenFGA-based tool authorizers.

```bash wrap lines theme={null}
pip install auth0-ai-langchain
```

## Sample applications

Checkout our sample applications built with LangChain and LangGraph.

<Columns cols={2}>
  <Card title="Assistant0 (Next.js)" href="https://github.com/auth0-samples/auth0-assistant0/tree/main/ts-langchain">
    A fullstack AI personal assistant with pre-configured tools that demonstrate 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.
  </Card>

  <Card title="Assistant0 (FastAPI)" href="https://github.com/auth0-samples/auth0-assistant0/tree/main/py-langchain">
    A fullstack AI personal assistant with pre-configured tools that demonstrate 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.
  </Card>

  <Card title="AI Samples" href="https://github.com/auth0-samples/auth0-ai-samples">
    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.
  </Card>

  <Card title="Auth0 AI SDK TypeScript Samples" href="https://github.com/auth0/auth0-ai-js/tree/main/examples">
    Explore example applications that accompany Auth0's JavaScript AI SDKs.
    These demonstrate recommended implementation patterns for the SDKs.
  </Card>

  <Card title="Auth0 AI SDK Python Samples" href="https://github.com/auth0/auth0-ai-python/tree/main/examples">
    Explore example applications that accompany Auth0's Python AI SDKs.
    These demonstrate recommended implementation patterns for the SDKs.
  </Card>
</Columns>

## Guides & Tutorials

Checkout our guides for LangChain and LangGraph in TypeScript and Python.

<Columns cols={2}>
  <Card title="Build an AI Assistant with LangGraph, Vercel, and Next.js: Use Gmail as a Tool Securely" href="https://auth0.com/blog/genai-tool-calling-build-agent-that-calls-gmail-securely-with-langgraph-vercelai-nextjs/" icon="newspaper" iconType="solid" horizontal />

  <Card title="Check Google Calendar Availability" href="/ai/docs/how-tos/check-google-calendar-availability" icon="google" iconType="solid" horizontal />

  <Card title="List GitHub Repositories" href="/ai/docs/how-tos/list-github-repositories" icon="github" iconType="solid" horizontal />

  <Card title="List Slack Channels" href="/ai/docs/how-tos/list-slack-channels" icon="slack" iconType="solid" horizontal />
</Columns>
