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

# OpenManus

> 了解如何在 OpenManus 的 config.toml 中配置 LLM base_url，接入 siflow endpoint，让通用 AI 智能体使用算秩模型。

[OpenManus](https://github.com/FoundationAgents/OpenManus) 是一个开源通用 AI 智能体。它从 `config.toml` 中读取模型设置，其中 `[llm]` section 支持自定义 `base_url`，因此可以让 agent 接入 siflow endpoint。

本文默认模型为 `glm-5.2`；完整模型列表和价格请查看 [模型广场](https://console.siflow.cn/model-inference/models)。

## 配置

在 [API 密钥](https://console.siflow.cn/model-inference/api_keys) 页面创建 API Key。复制 `config/config.example.toml` 为 `config/config.toml`，并将 `[llm]` section 接入 siflow endpoint：

```toml theme={null}
# config/config.toml
[llm]
model = "glm-5.2"
base_url = "https://api.siflow.cn/model-api/v1"
api_key = "<Your API Key>"
max_tokens = 4096
temperature = 0.0

[llm.vision]
model = "glm-5.2"
base_url = "https://api.siflow.cn/model-api/v1"
api_key = "<Your API Key>"
```

| 字段             | 值                                                                               |
| -------------- | ------------------------------------------------------------------------------- |
| `model`        | 模型 ID，例如 `glm-5.2`。OpenManus 是 agent，依赖 tool calling，因此请选择原生支持 tool calling 的模型 |
| `base_url`     | siflow OpenAI-compatible endpoint：`https://api.siflow.cn/model-api/v1`          |
| `api_key`      | 创建的 API Key                                                                     |
| `[llm.vision]` | 设置为相同的模型和 endpoint，确保使用 vision LLM 的步骤也通过 siflow endpoint 路由                    |

默认 `[llm]` API type 为 OpenAI-compatible，因此接入时不需要额外设置 `api_type`。

## 验证

运行 agent 并输入一个简单请求。如果它使用配置好的模型返回结果，即表示连接成功：

```bash theme={null}
python main.py
# Enter your prompt: In one short sentence, which model are you?
# → I am GLM, a large language model developed by Z.ai.
```

加载后的配置会解析为 `model: glm-5.2` / `base_url: https://api.siflow.cn/model-api/v1`，可确认请求到达 siflow endpoint。
