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

# LangChain SDKとサンプル

> AI Identity for B2BのLangChain & LangGraph SDKを使えば、開発者はLangChainやLangGraphで構築したAI agentワークフローを簡単に統合し、セキュアに保護できます。

## JavaScript & TypeScript

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

このSDKは、[LangChain](https://www.langchain.com/)や[LangGraph](https://www.langchain.com/langgraph)でAI Identity for B2Bを利用するための構成要素を提供します。主な機能は以下のとおりです。

* OpenFGAを利用するRAG Retriever
* 非同期のユーザー認証を実装するためのツール
* サードパーティ接続のアクセストークンを取得するためのツール
* [OpenFGAベース](https://openfga.dev/)のツール認可機能

```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)

このSDKは、LangChainおよびLangGraphでAI Identity for B2Bを活用するための構成要素を提供します。OpenFGAを利用するためのRAG Retriever、非同期のユーザー認証を実装するためのツール、サードパーティ接続のアクセストークンを取得するためのツール、OpenFGAベースのツール認可機能が含まれています。主なサポート内容は以下のとおりです:

* OpenFGAを利用するためのRAG Retriever
* サードパーティ接続のアクセストークンを取得するためのツール
* OpenFGAベースのツール認可機能

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

## サンプルアプリケーション

LangChainとLangGraphで構築したサンプルアプリケーションをご覧ください。

> **[Assistant0 (Next.js)](https://github.com/auth0-samples/auth0-assistant0/tree/main/ts-langchain)**
>
> 事前構成済みのツールを備えたフルスタックのAIパーソナルアシスタントです。ユーザー認証、Token Vaultを使用したAPI (Gmail、Google Calendarなど) の安全な呼び出し、非同期認可を使用したHuman-in-the-loopのやり取り、Auth0 FGAによるRAGツールの保護など、AI Identity for B2Bのさまざまな機能を体験できます。

> **[Assistant0 (FastAPI)](https://github.com/auth0-samples/auth0-assistant0/tree/main/py-langchain)**
>
> 事前構成済みのツールを備えたフルスタックのAIパーソナルアシスタントです。ユーザー認証、Token Vaultを使用したAPI (Gmail、Google Calendarなど) の安全な呼び出し、非同期認可を使用したHuman-in-the-loopのやり取り、Auth0 FGAによるRAGツールの保護など、AI Identity for B2Bのさまざまな機能を体験できます。

> **[AIサンプル](https://github.com/auth0-samples/auth0-ai-samples)**
>
> 生成AIアプリケーションでAuth0の認証・認可機能を活用する方法を示した、
> スタンドアロンのサンプルアプリケーションのリポジトリです。
> 各サンプルでは、AI Identity for B2Bの特定の機能を取り上げています。

> **[Auth0 AI SDK TypeScriptサンプル](https://github.com/auth0/auth0-ai-js/tree/main/examples)**
>
> Auth0のJavaScript AI SDKに付属するサンプルアプリケーションです。
> SDKの推奨実装パターンを確認できます。

> **[Auth0 AI SDK Pythonサンプル](https://github.com/auth0/auth0-ai-python/tree/main/examples)**
>
> Auth0のPython AI SDKに付属するサンプルアプリケーションです。
> SDKの推奨実装パターンを確認できます。

## ガイドとチュートリアル

TypeScript と Python で LangChain および LangGraph を使うためのガイドをご覧ください。

> **[LangGraph、Vercel、Next.js で AI アシスタントを構築する：Gmail をツールとして安全に使用する](https://auth0.com/blog/genai-tool-calling-build-agent-that-calls-gmail-securely-with-langgraph-vercelai-nextjs/)**

> **[Google Calendarの空き状況を確認する](/ai/docs/ja-jp/how-tos/check-google-calendar-availability)**

> **[GitHub リポジトリの一覧を取得する](/ai/docs/ja-jp/how-tos/list-github-repositories)**

> **[Slack チャンネルの一覧を取得する](/ai/docs/ja-jp/how-tos/list-slack-channels)**
