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

# 在 Hermes Agent 中使用 LithosAI

> 通过 OpenAI Chat Completions API，把 Hermes Agent 直接接入 LithosAI。

## 开始之前

安装 Hermes Agent CLI，在 [API Key](https://console.lithosai.cloud/keys?lang=zh) 页面创建 key，并在 [模型](https://console.lithosai.cloud/models?lang=zh) 页面选择模型。

<Steps>
  <Step title="设置 API key">
    把 key 写入 `~/.hermes/.env`：

    <Accordion title="Hermes API key 配置">
      ```bash ~/.hermes/.env theme={null}
      LITHOSAI_API_KEY=your-key
      ```
    </Accordion>
  </Step>

  <Step title="配置 LithosAI">
    下面的配置以 `moonshotai/Kimi-K3-fast` 为例。

    把它合并到 `~/.hermes/config.yaml`，保留已有的 provider。按你的模型设置 `context_length`，最少 [64,000 token](https://hermes-agent.nousresearch.com/docs/getting-started/quickstart)。

    <Accordion title="Hermes 配置">
      ```yaml ~/.hermes/config.yaml theme={null}
      providers:
        lithosai:
          api: https://api.lithosai.cloud/v1
          key_env: LITHOSAI_API_KEY
          transport: chat_completions
          default_model: moonshotai/Kimi-K3-fast
          discover_models: false
          context_length: 65536
          models:
            moonshotai/Kimi-K3-fast:
              context_length: 65536
              supports_reasoning: true
      model:
        default: moonshotai/Kimi-K3-fast
        provider: custom:lithosai
      agent:
        reasoning_effort: high
      ```
    </Accordion>

    要添加其他模型或速度档位，复制 `providers.lithosai.models` 下的条目，用[模型列表](https://console.lithosai.cloud/models?lang=zh)中该模型的 ID 作为新的 key，并按模型设置 `context_length`。重新打开 Hermes 后改动生效。
  </Step>

  <Step title="开始对话">
    运行 `hermes` 开始对话。
  </Step>
</Steps>

## 模型与推理强度

* **模型和速度档位：** 用 `/model` 在当前对话中切换。
* **推理强度**：用 `/reasoning` 选择 **low**、**high** 或 **max**，默认为 **high**。

所有 Agent 都会遇到的问题见[常见问题](/zh/agent-integrations#常见问题)。

## 参考资料

* [Hermes Agent 文档](https://hermes-agent.nousresearch.com/docs/user-guide/sessions)
* [LithosAI 模型列表](https://console.lithosai.cloud/models?lang=zh)


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