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

# Agent 集成总览

> 通过 Relay 协议兼容路由接入编码助手与 Agent 框架

这个部分用于沉淀 Agent 向工具如何通过正确的协议路由直接接入 Relay。

## 推荐路由

| 工具或框架 | 推荐路由 | 原因 |
| - | - | - |
| Claude Code | Claude 模型走 `https://api.pipellm.ai`，GPT 或 Gemini 走 `https://api.pipellm.ai/anthropic` | Claude Code 使用 Anthropic Messages 协议 |
| OpenCode | `https://api.pipellm.ai/openai/v1` | OpenCode 自定义 provider 很适合接 OpenAI 兼容 chat completions |
| OpenClaw | `https://api.pipellm.ai/openai/v1` | OpenClaw 的 custom provider 对 OpenAI 兼容端点支持很直接 |
| LangChain OpenAI | `https://api.pipellm.ai/v1` | `ChatOpenAI` 直接对应 OpenAI 兼容原生路由 |
| LangChain Anthropic | `https://api.pipellm.ai` | `ChatAnthropic` 直接对应 Anthropic Messages |
| LangChain Gemini | `https://api.pipellm.ai` | `ChatGoogleGenerativeAI` 直接对应 Gemini 原生路由 |

## 每篇工具文档应该回答什么

每个工具文档都应该明确四件事：

* 应该设置哪条 base URL
* 应该配置哪些环境变量或配置项
* 哪些模型族已经验证可用
* 有哪些协议限制或需要绕过的兼容性问题

## 编码 Agent 与助手

<Columns cols={3}>
  <Card title="Claude Code" icon="terminal" href="/zh/integrations/claude-code">
    配置 Claude Code 使用 PipeLLM
  </Card>

  <Card title="OpenCode" icon="code" href="/zh/integrations/opencode">
    使用 JSON 配置接入 PipeLLM
  </Card>

  <Card title="OpenClaw" icon="terminal" href="/zh/integrations/openclaw">
    通过 custom provider 接入 PipeLLM
  </Card>
</Columns>

## Agent 框架集成

<Columns cols={3}>
  <Card title="LangChain（OpenAI）" icon="link" href="/zh/integrations/langchain-openai">
    使用 `ChatOpenAI` 接入 PipeLLM 的 OpenAI 兼容路由
  </Card>

  <Card title="LangChain（Anthropic）" icon="link" href="/zh/integrations/langchain-anthropic">
    使用 `ChatAnthropic` 接入 PipeLLM 的 Anthropic 兼容路由
  </Card>

  <Card title="LangChain（Gemini）" icon="link" href="/zh/integrations/langchain-gemini">
    使用 `ChatGoogleGenerativeAI` 接入 PipeLLM 的 Gemini 路由
  </Card>
</Columns>

## 共享参考

<Columns cols={3}>
  <Card title="路由与协议" icon="route" href="/zh/guides/routing-protocols">
    在配置工具前先选对路由
  </Card>

  <Card title="转换器" icon="shuffle" href="/zh/converter/overview">
    保留工具原生协议格式去调用不同模型
  </Card>

  <Card title="列出模型" icon="list" href="/zh/api-reference/list-models">
    确认当前账号可用的模型 ID
  </Card>
</Columns>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.