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

# Hermes Agent

> 在 Hermes Agent 中接入 S2 模型进行自主 AI 编程。

<img src="https://mintcdn.com/sa-5efeb1e4/2ItCS6POxcu0zOQm/images/token-plan/hermes-agent-banner.png?fit=max&auto=format&n=2ItCS6POxcu0zOQm&q=85&s=a41b39a7d4680b7c8bcc0e58cd58b33f" alt="Hermes Agent" style={{ borderRadius: '8px', marginTop: '12px', maxWidth: '100%' }} width="1145" height="196" data-path="images/token-plan/hermes-agent-banner.png" />

## 概述

[Hermes Agent](https://github.com/NousResearch/hermes-agent) 是由 [Nous Research](https://nousresearch.com) 开发的开源自主学习 AI 智能体，具备持久记忆、自改进能力与丰富的工具生态。本文将指导你把 SenseAudio 的 **S2 模型**（模型 ID：`senseaudio-s2`）接入 Hermes Agent。

<CardGroup cols={2}>
  <Card title="跨会话持久记忆" icon="brain">
    编程模式与项目上下文自动沉淀，用得越多越懂你。
  </Card>

  <Card title="自改进学习" icon="wand-magic-sparkles">
    内置技能系统会从每次交互中持续优化。
  </Card>

  <Card title="40+ 集成工具" icon="toolbox">
    覆盖代码、搜索、文件与外部服务等常用能力。
  </Card>

  <Card title="多平台支持" icon="layer-group">
    CLI、Telegram、Discord、Slack、WhatsApp 全平台可用。
  </Card>
</CardGroup>

## 前提条件

<Check>已订阅 SenseAudio [Token Plan](https://senseaudio.cn/tokenplan)</Check>
<Check>一台可访问终端的电脑（macOS、Linux 或 Windows WSL2）</Check>

## 安装 Hermes Agent

<Steps>
  <Step title="一键安装">
    在终端中运行以下命令：

    ```bash theme={null}
    curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
    ```

    <Note>
      安装脚本会自动检测并安装 uv、Python、Node.js、ripgrep、ffmpeg 等依赖，无需提前手动配置。
    </Note>
  </Step>

  <Step title="验证安装">
    执行环境自检命令，确认依赖与配置就绪：

    ```bash theme={null}
    hermes doctor
    ```
  </Step>
</Steps>

<Note>
  更多安装细节与进阶用法请参考 [Hermes Agent 官方文档](https://hermes-agent.nousresearch.com/docs/)。
</Note>

## 配置 Token Plan

Hermes Agent 暂未内置 SenseAudio，需通过 `hermes setup` 手动配置自定义 Provider 与模型：

```bash theme={null}
hermes setup
```

<Steps>
  <Step title="选择 Provider">
    从 provider 列表中选择 **Custom endpoint**。

    <Frame>
      <img src="https://mintcdn.com/sa-5efeb1e4/cEuOjPWgRv8IP-Vn/images/token-plan/hermes-agent-provider-cn.png?fit=max&auto=format&n=cEuOjPWgRv8IP-Vn&q=85&s=234f4e88fe69876d7ef5e17a733d5c4c" alt="选择 Custom endpoint" style={{ borderRadius: '8px', maxWidth: '100%' }} width="1208" height="1042" data-path="images/token-plan/hermes-agent-provider-cn.png" />
    </Frame>
  </Step>

  <Step title="填写 API Base URL">
    输入 SenseAudio 的 API 接入地址（中国大陆节点）：

    ```text theme={null}
    https://api.senseaudio.cn/v1
    ```
  </Step>

  <Step title="输入 API Key">
    粘贴从控制台 **账户管理 → Token Plan** 获取的 **Token Plan API Key**。

    <Frame>
      <img src="https://mintcdn.com/sa-5efeb1e4/2uwj4t1TiXTu6X9i/images/token-plan/hermes-agent-apikey-cn.png?fit=max&auto=format&n=2uwj4t1TiXTu6X9i&q=85&s=e105df3c15ebfcb6d9fc3a6ca6473cd5" alt="输入 Token Plan API Key" style={{ borderRadius: '8px', maxWidth: '100%' }} width="1330" height="672" data-path="images/token-plan/hermes-agent-apikey-cn.png" />
    </Frame>
  </Step>

  <Step title="输入模型名称">
    手动输入模型 ID **`senseaudio-s2`**（即 S2）作为默认模型。
  </Step>
</Steps>

<Info>
  **还没有 API Key？** 请先订阅 [Token Plan](https://senseaudio.cn/tokenplan)，然后在控制台 **账户管理 → Token Plan** 创建专属 API Key。套餐额度用尽或达到限制后，可开启 **Extra Usage**，超出部分将自动按量计费、从账户余额扣费。
</Info>

## 开始使用

配置完成后，在终端输入以下命令即可启动 Hermes Agent，开始与 **S2 模型** 对话：

```bash theme={null}
hermes
```

启动后，你可以直接用自然语言下达任务，例如：

* "帮我用 Python 写一个爬取网页标题的脚本"
* "检查当前项目的依赖有没有安全漏洞"
* "把 README.md 翻译成英文"

<Tip>
  **越用越聪明**：Hermes Agent 会自动记录你的编程习惯、项目背景和偏好设置，下次打开时无需重复说明——用得越久，给出的回答就越贴合你的需求。
</Tip>

## 相关资源

<CardGroup cols={3}>
  <Card title="Claude Code" icon="sparkles" href="/guides/token-plan/claude-code">
    在 Claude Code 中接入 S2 模型
  </Card>

  <Card title="S2 使用技巧" icon="lightbulb" href="/guides/token-plan/best-practices">
    发挥 S2 模型最佳效果
  </Card>

  <Card title="常见问题" icon="circle-question" href="/guides/token-plan/faq">
    订阅、限额、切换、开票等问题解答。
  </Card>
</CardGroup>
