在 Hermes Agent 中使用 RunAPI。
Hermes Agent 可以使用自定义 OpenAI 兼容端点调用聊天模型。把 prompt 复制进 Hermes Agent,让它创建 custom provider;需要精确 YAML 时再看配置 tab。
Configure this Hermes Agent install to use RunAPI.
Requirements:
- Read the API key from RUNAPI_API_KEY. Do not hardcode the key.
- Add a custom provider named runapi.
- Use base_url "https://runapi.ai/v1".
- Use key_env RUNAPI_API_KEY.
- Use api_mode chat_completions.
- Set model.provider to custom:runapi.
- Set the default model to gpt-5.2.
- Run `hermes doctor` and report any config problems before starting a session.
- If RUNAPI_API_KEY is missing, ask me to set it before starting Hermes Agent.
custom_providers:
- name: runapi
base_url: "https://runapi.ai/v1"
key_env: RUNAPI_API_KEY
api_mode: chat_completions
model:
provider: custom:runapi
default: gpt-5.2
export RUNAPI_API_KEY="runapi_xxx"
hermes model
hermes doctor
hermes
这个配置会改变什么
Hermes Agent 支持通过 hermes model 选择模型,也可以使用命名自定义端点。最快路径是把 RunAPI setup prompt 粘贴进 Hermes Agent,让 agent 自己更新配置。把 key 放进 RUNAPI_API_KEY,把 base URL 设为 RunAPI 的 /v1 端点,并在长任务前运行 hermes doctor。
用 prompt 在 Hermes Agent 中安装 RunAPI
粘贴 setup prompt
复制第一个 tab 里的 prompt 给 Hermes Agent。它会要求 Hermes Agent 读取 RUNAPI_API_KEY,并把 RunAPI 添加为命名 custom provider。
复制 prompt
核对生成的配置
Hermes Agent 应该把 provider 设为 custom:runapi,default 设为 gpt-5.2,并用 key_env 指向 RUNAPI_API_KEY。
provider: custom:runapi
运行诊断
编辑配置后运行 hermes doctor,然后打开 Hermes Agent 并发送一条短测试提示,再用于更大的任务。
hermes doctor
配置字段
| 字段 | 值 | 作用 |
|---|---|---|
custom_providers.name |
runapi |
创建一个 Hermes Agent 可以按 custom:runapi 选择的命名自定义端点。 |
base_url |
https://runapi.ai/v1 |
让 Hermes Agent 指向 RunAPI 的 OpenAI 兼容 API 表面。 |
key_env |
RUNAPI_API_KEY |
从环境变量读取 RunAPI key,避免硬编码。 |
api_mode |
chat_completions |
使用 OpenAI 兼容聊天请求形态。 |
Hermes Agent 配置问题
可以。Hermes Agent 支持模型选择和自定义端点。为命名 custom provider 配置 RunAPI 的 /v1 base URL,把 API key 放进 RUNAPI_API_KEY,并选择 gpt-5.2 这样的 RunAPI 模型。
想走引导式选择时用 hermes model。需要服务器或共享环境中的可重复配置时,直接编辑配置文件。两种方式都建议之后运行 hermes doctor 验证。
把 RUNAPI_API_KEY 设置在启动 Hermes Agent 的同一个 shell、service unit 或 gateway 环境中。GUI 或 daemon 启动时不一定继承交互式 shell 变量。
可以。把 RunAPI 加为 custom:runapi 不会移除其他 Hermes Agent 模型选项。需要切换模型时使用 hermes model 或 /model 命令。