Files
zeekayandHanzo Dev 84e4069c2c docs name the state dir and config file the bot reads: ~/.bot/bot.json
The docs said ~/.hanzo-bot/hanzo-bot.json (and ~/.hanzo-bot-<profile>, hanzo-bot.plugin.json), which nothing reads: src/config/paths.ts resolves ~/.bot, bot.json and ~/.bot-<profile>, and plugins ship bot.plugin.json. Every such path in docs/ now names what the code opens.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-24 21:12:09 -07:00

1.9 KiB
Raw Permalink Blame History

read_when, summary, title, x-i18n
read_when summary title x-i18n
你需要多个隔离的智能体(工作区 + 路由 + 认证)
`hanzo-bot agents` 的 CLI 参考(列出/添加/删除/设置身份) agents
generated_at model provider source_hash source_path workflow
2026-02-01T19:58:38Z claude-opus-4-5 pi 30556d81636a9ad8972573cc6b498e620fd266e1dfb16eef3f61096ea62f9896 cli/agents.md 14

hanzo-bot agents

管理隔离的智能体(工作区 + 认证 + 路由)。

相关内容:

示例

hanzo-bot agents list
hanzo-bot agents add work --workspace ~/.bot/workspace-work
hanzo-bot agents set-identity --workspace ~/.bot/workspace --from-identity
hanzo-bot agents set-identity --agent main --avatar avatars/hanzo-bot.png
hanzo-bot agents delete work

身份文件

每个智能体工作区可以在工作区根目录包含一个 IDENTITY.md:

  • 示例路径:~/.bot/workspace/IDENTITY.md
  • set-identity --from-identity 从工作区根目录读取(或从显式指定的 --identity-file 读取)

头像路径相对于工作区根目录解析。

设置身份

set-identity 将字段写入 agents.list[].identity:

  • name
  • theme
  • emoji
  • avatar(工作区相对路径、http(s) URL 或 data URI)

从 IDENTITY.md 加载:

hanzo-bot agents set-identity --workspace ~/.bot/workspace --from-identity

显式覆盖字段:

hanzo-bot agents set-identity --agent main --name "HanzoBot" --emoji "🤖" --avatar avatars/hanzo-bot.png

配置示例:

{
  agents: {
    list: [
      {
        id: "main",
        identity: {
          name: "HanzoBot",
          theme: "midnight",
          emoji: "🤖",
          avatar: "avatars/hanzo-bot.png",
        },
      },
    ],
  },
}