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

# Graphiti

> TokenLabをOpenAI互換のGraphiti LLMプロバイダーとして使用する

## 概要

Graphitiは、`OpenAIGenericClient`を通じてOpenAI互換の `/v1` エンドポイントをサポートしています。そのクライアントをTokenLabに向け、TokenLabのモデルを選択してください。

<Note>
  **タイプ**: ナレッジグラフメモリフレームワーク

  **主要パス**: OpenAI互換のChat Completions

  **サポート信頼度**: サポートされているOpenAI互換パス
</Note>

## 環境設定

```bash theme={null}
export TOKENLAB_API_KEY="sk-your-tokenlab-key"
```

## LLMクライアント

```python theme={null}
import os

from graphiti_core.llm_client.config import LLMConfig
from graphiti_core.llm_client.openai_generic_client import OpenAIGenericClient

llm_config = LLMConfig(
    api_key=os.environ["TOKENLAB_API_KEY"],
    model="claude-sonnet-5",
    small_model="gpt-5.4-mini",
    base_url="https://api.tokenlab.sh/v1",
)

llm_client = OpenAIGenericClient(config=llm_config)
```

グラフデータベースおよびエンベッダーの設定とともに、`llm_client` を `Graphiti(...)` インスタンスに渡してください。

## エンドポイントに関する注意点

GraphitiのOpenAI互換パスは、Chat Completions向けに設計されています。抽出や重複排除のタスクにおいて、構造化されたJSONを確実に返すモデルを使用してください。
