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

# JavaScript SDKs & Samples

> Auth0 JavaScript SDKs make it easy for developers to integrate with and secure AI agent workflows.

## Auth0 SDKs

Updated Auth0 SDKs to secure AI agent workflows:

### [Next.js](https://github.com/auth0/nextjs-auth0)

This SDK streamlines integrating Auth0 authentication and authorization services into Next.js applications. It supports:

* User authentication
* Tools for getting access tokens for supported social and enterprise identity providers

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

### [Node.js](https://github.com/auth0/node-auth0)

This library streamlines integrating Auth0's authentication and authorization services into Node.js applications. It supports:

* User authentication
* Tools for signing up users, managing user profiles, and securing API endpoints.

```bash wrap lines theme={null}
npm install auth0
```

### [Auth0 Fastify SDK](https://www.npmjs.com/package/@auth0/auth0-fastify)

This SDK streamlines integrating Auth0 authentication and authorization services into Fastify applications. It supports:

* User authentication
* Tools for getting access tokens to call first-party APIs

```bash wrap lines theme={null}
npm i @auth0/auth0-fastify
```

## Auth0 AI SDKs

Auth0 AI SDKs to streamline integrating your application with popular agentic frameworks:

### [Auth0 AI SDK](https://github.com/auth0/auth0-ai-js)

This SDK provides base abstractions for authentication and authorization in AI applications. It supports:

* Asynchronous user authentication using the [Client Initiated Backchannel Authentication (CIBA)](https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1_0.html) protocol
* [OpenFGA-based](https://openfga.dev/) filter for RAG

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

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

This library helps to set up the React components that can be used in AI applications using Auth0 for AI Agents. The components are styled using [Tailwind CSS](https://tailwindcss.com/). It supports:

* Tools for getting access tokens for supported social and enterprise identity providers

```bash wrap lines theme={null}
npx @auth0/ai-components add TokenVault
```

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

This SDK provides a secure Redis-based data store implementation for use with the Auth0 AI SDKs. It supports:

* Securely encrypting data before storing it in Redis
* Organizing keys using namespaces
* Setting expiration times for stored data

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

## Sample applications

Checkout our sample applications for JavaScript/TypeScript built with frameworks like LangGraph and Vercel AI.

<Columns cols={2}>
  <Card title="Assistant0 (Next.js)" href="https://github.com/auth0-samples/auth0-assistant0">
    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.

    <ul>
      <li>
        [LangGraph
        version](https://github.com/auth0-samples/auth0-assistant0/tree/main/ts-langchain)
      </li>

      <li>
        [Vercel AI SDK
        version](https://github.com/auth0-samples/auth0-assistant0/tree/main/ts-vercel-ai)
      </li>

      <li>
        [LlamaIndex
        version](https://github.com/auth0-samples/auth0-assistant0/tree/main/ts-llamaindex)
      </li>
    </ul>
  </Card>

  <Card title="SmartHR Assistant" 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). Implemented on a Next.js application with LlamaIndex.
  </Card>

  <Card title="Agent0" href="https://github.com/auth0-samples/agent0">
    A full-stack AI personal assistant, powered by React and Fastify, that
    invokes your APIs using tool calls on a logged-in user's behalf.
  </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>
</Columns>

## Guides & Tutorials

Checkout our guides for Next.js, LangChain, LlamaIndex, Vercel AI, and Genkit in JavaScript/TypeScript.

<Columns cols={2}>
  <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 />

  <Card title="Get Salesforce Opportunities" href="/ai/docs/how-tos/get-salesforce-opportunities" icon="salesforce" iconType="solid" horizontal />
</Columns>
