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

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# 在 Hermes 智能体中使用 AIsa

> 只需一条命令和浏览器登录，即可在 Hermes 智能体中将 AIsa 添加为远程 MCP 服务器。可选将 AIsa 用作模型提供商。

Hermes Agent 内置了 MCP 客户端。将 AIsa 添加为远程 MCP 服务器，登录一次后，Hermes 即可发现并调用 AIsa 覆盖网络调研、金融、社交媒体、SEO、销售等领域的各项能力。

AIsa MCP 服务器：

```txt theme={null}
https://mcp.aisa.one/mcp
```

## 前提条件

开始之前，请确保你已具备：

* AIsa 账户（[console.aisa.one](https://console.aisa.one)），通过浏览器登录
* macOS、Linux 或 Windows WSL2 终端

## 1. 安装 Hermes Agent

运行官方安装脚本：

```bash theme={null}
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
```

重新加载 shell：

```bash theme={null}
source ~/.zshrc
```

验证安装：

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

## 2. 添加 AIsa MCP 服务器

在终端中运行以下命令（不要在 Hermes 会话内执行）：

```bash theme={null}
hermes mcp add aisa --url https://mcp.aisa.one/mcp --auth oauth
```

Hermes 会打开你的浏览器。登录 AIsa 并批准访问；无需复制任何密钥。后续如需重新登录，运行 `hermes mcp login aisa`。

> [accordion] 使用 API key 代替 OAuth
>
> 对于无头（headless）机器，可以使用 header 认证添加服务器：
>
> ```bash theme={null}
> hermes mcp add aisa --url https://mcp.aisa.one/mcp --auth header
> ```
>
> 当 Hermes 询问服务器是否需要认证时输入 `Y`，然后在 **API key / Bearer token** 处粘贴你的 AIsa key。Hermes 会将其作为 `MCP_AISA_API_KEY` 存储在 `.env` 文件中，并在 `config.yaml` 中引用。

## 3. 验证

```bash theme={null}
hermes mcp test aisa
```

Hermes 应显示 `Connected` 和 `Tools discovered: 7`。启动新的 Hermes 会话以加载这些工具，或在当前运行的会话中运行 `/reload-mcp`。

## 4. 使用 AIsa 能力

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

Hermes 现已具备 AIsa 工具。`search`、`list_categories`、`get_details`、`batch_get_schema` 和 `batch_quote`（对具体调用进行报价而不实际执行）完全免费；`use` 和 `batch_use` 会执行实际调用并按次计费。

尝试输入：

```txt theme={null}
使用 AIsa 能力搜索网页并总结关于 Hermes Agent 的最新信息。
```

## 可选：将 AIsa 用作模型提供商

Hermes 也可以运行 AIsa 目录中的模型。这需要 AIsa API key（[console.aisa.one/api-keys](https://console.aisa.one/api-keys)）。

运行：

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

选择：

```txt theme={null}
Custom Model / OpenAI-compatible endpoint
```

![选择 Custom Model / OpenAI-compatible endpoint](https://assets.aisaskills.com/custom-endpoint.png)

当 Hermes 询问 API 端点和 API key 时，输入：

```txt theme={null}
API base URL: https://api.aisa.one/v1
API key: YOUR_AISA_API_KEY
```

如果端点有效，Hermes 会确认对 AIsa 模型列表的访问权限：

```txt theme={null}
Verified endpoint via https://api.aisa.one/v1/models
167 model(s) visible
```

![Hermes API 兼容模式提示](https://assets.aisaskills.com/api-model.png)

选择模式 `1. Auto-detect` 或 `2. Chat Completions`；两者均可正常工作，因为 base URL 以 `/v1` 结尾。推荐使用模式 2，因为它更明确且更易于调试。

| 模式 | 所需 base URL | 适用场景 |
| - | - | - |
| 1. Auto-detect | `https://api.aisa.one/v1` | 对于 `/v1` URL 解析为 Chat Completions |
| 2. Chat Completions | `https://api.aisa.one/v1` | 标准 OpenAI 兼容端点 |
| 3. Responses / Codex | `https://api.aisa.one/v1` | Codex CLI 以及需要服务端状态的推理模型 |
| 4. Anthropic Messages | `https://api.aisa.one/`（不含 `/v1`） | Claude Code 和其他 Anthropic 原生客户端 |

> 如果选择模式 4，请从 base URL 中移除 `/v1`；Anthropic 客户端会自动追加 `/v1/messages`。

然后输入模型编号或键入模型名称，例如 `gpt-5.5`。请选择文本、推理或代码模型，不要选择图像、视频、Embedding、Whisper 或 TTS 模型。当 Hermes 询问上下文长度时，按 Enter 键自动检测。

## 快速参考

| 项目 | 值 |
| - | - |
| 添加 AIsa | `hermes mcp add aisa --url https://mcp.aisa.one/mcp --auth oauth` |
| 重新登录 | `hermes mcp login aisa` |
| 检查连接 | `hermes mcp test aisa` |
| 在会话中重新加载 | `/reload-mcp` |
| 可选模型提供商 | `Custom Model / OpenAI-compatible endpoint`，`https://api.aisa.one/v1`，模式 `2. Chat Completions` |

## 故障排查

| 问题 | 解决方案 |
| - | - |
| `hermes: command not found` | 运行 `source ~/.zshrc` 或重新打开终端 |
| OAuth 在脚本或 CI 中失败 | OAuth 需要交互式终端。改用 `--auth header` 并配合 API key |
| AIsa 工具缺失或出现 401 | 先运行 `hermes mcp login aisa`，再运行 `hermes mcp test aisa`，最后执行 `/reload-mcp` |
| 在运行中的会话内添加了服务器且登录超时 | 在单独的终端中运行 `hermes mcp login aisa` |
| 模型端点验证失败 | 确保 base URL 为 `https://api.aisa.one/v1` |
| 选错了模型 | 重新运行 `hermes model` 并选择文本或代码模型 |

## 相关

> [card] [在 OpenClaw 中使用 AIsa](https://aisa.one/docs/zh/guides/tutorials/use-aisa-in-openclaw.md)
>
> 将 AIsa 添加到其他智能体运行时。

> [card] [通过 MCP 连接](https://aisa.one/docs/zh/agent-quickstart.md)
>
> 其他客户端的 MCP 配置指南。

> [card] [模型目录](https://aisa.one/docs/zh/guides/models.md)
>
> 在选择 Hermes 默认模型前，浏览支持的模型列表。


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