YAML Reference

所有项目字段集中说明

Suzumio 项目是 YAML 文件。Resolved YAML 定义 task、agents、tool registration、scheduler policy、Docker runner、model presets、channels 和本地 observability defaults。

解析流程

suzumio config render path/to/project.yaml 会打印与 suzumio init 存入 resolved.yaml 相同的 resolved config。

text
source YAML
  -> quote bare @import(...) markers
  -> substitute environment placeholders in text
  -> parse YAML
  -> resolve whole-field imports recursively
  -> apply extends profiles
  -> apply defaults and validate
  -> write resolved.yaml and SQLite project config

Resolved config 是 runtime source material。初始化后修改原始 YAML,不会自动改变已初始化 project;需要重新 render 和 init。

最小结构

yaml
name: demo
task: |
  Demonstrate one non-preemptive activation.

backend:
  runner:
    mode: ai
    model: main
    models:
      providers:
        gateway:
          type: openai-compatible
          baseURLEnv: SUZUMIO_GATEWAY_BASE_URL
          apiKeyEnv: SUZUMIO_GATEWAY_API_KEY
      presets:
        main:
          provider: gateway
          model: gpt-5.5

tools:
  toolpacks:
    - core

agents:
  pm:
    role: project-manager
    displayName: Yuki
    prompt: |
      Handle the user request and stay concise.
    tools:
      - messages.send
      - coordination.wait_for_signal
      - completion.submit

顶层字段

字段必填默认值说明
nameProject id,也是 SUZUMIO_ROOT 下的 runtime directory name。
task持久 task statement,会渲染进第一次 activation prompt,并通过 agent history 延续。
agentsAgent id 到 agent config 的 map。至少需要一个 agent。
toolstoolpacks: [core, web]Project toolpack registration。Agent 仍需要 per-agent tool allowlist。
platformsEmpty list可选外部聊天平台 bridge,例如 Feishu。
schedulerSignal scheduler defaultsSignal delivery、nudges 和 quiet monitor 设置。
communicationCoordinator pm,不限制 coordinator-only渲染进 activation prompt 的 communication policy。
backendDocker chat runner defaultsDocker image、controller URL、mounts、proxy、AI runner 和 model registry。
channels#project, #blockedChannel messages 允许使用的 channel names。
extends在 local fields 前合并的 profile object 或 profile object list。
observabilityHTTP/WebUI enabled on 127.0.0.1:39400YAML 中记录的 server defaults。实际 bind address 由 CLI flags 控制。

nametask

yaml
name: theorem-search
task: |
  Produce a concise report.
  Separate proven facts, experiments, failed attempts, and remaining gaps.

name 是 CLI commands 使用的 project id,也是 SUZUMIO_ROOT 下的目录名。task 会渲染进每个 agent 的第一次 activation prompt。

agents

yaml
agents:
  pm:
    role: project-manager
    displayName: Yuki
    prompt: @import(prompts/pm.md)
    model: pm-main
    tools:
      - messages.send
      - coordination.wait_for_signal
      - completion.submit

  worker:
    role: researcher
    count: 2
    names: [Akari, Ren]
    prompt: @import(prompts/worker.md)
    model: worker-main
    tools:
      - messages.send
      - coordination.wait_for_signal
      - shell.exec
    mounts:
      - source: ./reference
        target: /mnt/reference
        readonly: true
    env:
      EXPERIMENT_MODE: quick
字段默认值说明
roleAgent id随 agent 保存的人类可读 role。
displayNameAgent id人类可读 display name。
namesCounted agents 的可选名字,按 index 分配。
count将一个 config entry 展开为 worker-1worker-2 等编号 agents。
promptEmpty string每个 activation prompt 中包含的 agent instructions。
modelbackend.runner.model该 agent 使用的 model preset。
toolsEmpty listPer-agent model-visible tool allowlist。支持 exact names、namespace.**
mountsEmpty list只挂载给该 agent 的 host files 或 directories。
envEmpty map传给该 agent runner containers 的额外 environment variables。

Counted agents 使用 generated ids。上面的例子会创建 worker-1worker-2,display names 是 AkariRen

tools

yaml
tools:
  toolpacks:
    - core
    - shell
    - web
    - path: ./toolpacks/scheduler
      id: scheduler
    - path: ./toolpacks/plan
      id: plan
    - path: ./toolpacks/review
      id: review-tools
EntryRegistered tools
coremessages.send, coordination.wait_for_signal, completion.submit, file.read, file.write, file.patch
shellshell.exec
webweb.fetch
Local toolpacks/schedulerschedule.onceschedule.recurringschedule.listschedule.cancel,以及 scheduled-message WebUI controls 和 scheduler hook。
Local toolpacks/planplan.createplan.statusplan.updateplan.set_item_statusplan.close,以及 active-plan WebUI controls 和 continuation scheduler hook。
Local { path, id }该目录中 suzumio.toolpack.json 声明的 model-facing tools 和可选 WebUI entries。

tools.toolpacks 为 project 注册 definitions。agents.<id>.tools allowlist 决定模型可以看到哪些已注册 tools。内置 file tools 可以用 file.* 授权,也可以写 exact names,例如 file.readfile.patch。Toolpack WebUI entries 是 user-facing controls,不使用 per-agent model allowlist。

自定义 toolpack 细节见 Custom Tools

platforms

yaml
platforms:
  - id: feishu-main
    kind: feishu
    appIdEnv: FEISHU_APP_ID
    appSecretEnv: FEISHU_APP_SECRET
    inbound:
      recipient: pm
      priority: P2
      allowedChatTypes: [group]
      groupMessageMode: bot_mentions
      reactionAck:
        enabled: true
        emojiType: Typing
    outbound:
      recipient: user
      replyToLastInbound: true

Platforms 是 Suzumio messages 和外部聊天系统之间的可选 bridge。suzumio serve 默认启动 enabled platforms;如果只想运行本地 HTTP/WebUI,不连接外部平台,可以用 suzumio serve --no-platforms

Feishu platform 使用飞书 Node SDK 的长连接接收 im.message.receive_v1 events。默认只有群聊里 @ 当前机器人的消息会变成 Suzumio 中从 sender 发给 inbound.recipient 的 message;私聊 p2p 和普通群消息会被忽略。把 accepted message 交给 Suzumio 前,bridge 会先给飞书原消息添加 Typing reaction,作为 best-effort ack。Suzumio 中 recipient 等于 outbound.recipient 的 messages 会推回飞书,优先回复该 project/platform 最近一次收到的飞书消息。

字段默认值说明
idRequiredPlatform id,用于 audit events 和 dedupe。
kindRequired当前只支持 feishu
enabledtruesuzumio serve 时启用 bridge。
appId / appIdEnvFEISHU_APP_ID env飞书 app id。为避免泄漏 secret,推荐用 appIdEnv
appSecret / appSecretEnvFEISHU_APP_SECRET env飞书 app secret。推荐用 appSecretEnv
inbound.enabledtrue通过长连接接收飞书事件。
inbound.recipientpm接收外部用户消息的 Suzumio agent。
inbound.priorityP2创建 Suzumio message 时使用的 priority。
inbound.senderuser外部消息进入 Suzumio 时使用的 sender id。
inbound.includeMetadatatrue在 message body 末尾追加飞书 ids,便于追踪。
inbound.allowedChatTypes[group]允许进入 Suzumio 的飞书 chat type。只有明确需要私聊进入时才加入 p2p
inbound.groupMessageModebot_mentions群聊中只接收 @ 当前机器人的消息。只有明确需要普通群消息进入时才设为 all
inbound.botOpenId / botOpenIdEnvFEISHU_BOT_OPEN_ID env,然后自动查询用于校验群 @ 是否指向当前 bot 的 open_id。未配置时 bridge 会请求 /open-apis/bot/v3/info
inbound.reactionAck.enabledtrue在唤醒 PM 前,给 accepted inbound 飞书消息添加 reaction。Reaction 失败会记录 audit event,但不会阻塞 PM 处理。
inbound.reactionAck.emojiTypeTyping入站 ack 使用的飞书 reaction emoji_type。该值大小写敏感。
outbound.enabledtrue轮询 Suzumio events 并把 user-facing messages 发到飞书。
outbound.recipientuser被视为外部用户输出的 Suzumio recipient。
outbound.replyToLastInboundtrue尽量回复最近一次 inbound 飞书消息。
outbound.defaultReceiveId / defaultReceiveIdEnvNone没有 inbound route 时的 fallback receive id。
outbound.defaultReceiveIdTypechat_idFallback route 的飞书 id 类型。
outbound.pollIntervalMs2000轮询新的 Suzumio user-facing messages 的间隔。

飞书侧需要创建企业自建应用、启用 Bot、配置 Receive events through persistent connection、订阅 im.message.receive_v1、添加发送和接收消息权限、发布版本,并把机器人加入目标聊天。群消息中,im:message.group_at_msg:readonly 可接收 @ 机器人消息;如果审批通过,im:message.group_msg:readonly 可接收 associated group chats 的全量消息。默认 reaction ack 需要 im:messageim:message.reactions:write_only 权限。Suzumio 仍会在创建本地 message 前按 inbound.allowedChatTypesinbound.groupMessageMode 过滤。

scheduler

yaml
scheduler:
  kind: nonpreemptive-signals
  maxSignalsPerActivation: 20
  noEffectNudge:
    enabled: true
    priority: P2
    maxConsecutive: 0
    initialDelayMs: 30000
    backoffFactor: 2
    maxDelayMs: 300000
  failedNudge:
    enabled: false
    priority: P2
    maxConsecutive: 3
    initialDelayMs: 60000
    backoffFactor: 2
    maxDelayMs: 900000
  allQuietNudge:
    enabled: false
    targetAgent: pm
    priority: P2
    cooldownMs: 300000
  quietAgentMonitor:
    enabled: true
    rules:
      - id: worker-watch
        agent: worker-1
        recipient: pm
        sender: monitor
        priority: P2
        initialDelayMs: 1800000
        repeatDelayMs: 900000
        message: "{{agent}} has been quiet for {{quietMinutes}} minutes."
  failedAgentMonitor:
    enabled: true
    rules:
      - id: worker-failed-watch
        agent: worker-1
        recipient: pm
        sender: monitor
        priority: P2
        initialDelayMs: 300000
        repeatDelayMs: 900000
        message: "{{agent}} has been failed for {{failedMinutes}} minutes after {{activationId}}."
字段默认值说明
kindnonpreemptive-signalsSignal-driven scheduler。nonpreemptive-mailbox 作为 alias 接受。
maxSignalsPerActivation20Activation start 时最多包含的 pending signals 数量。
noEffectNudge.enabledtrueActivation 完成但没有 useful effect 时创建 follow-up nudge。
noEffectNudge.priorityP2No-effect nudge signal priority。
noEffectNudge.maxConsecutive0连续 no-effect activations 后最多 nudge 次数。0 表示不设上限。
noEffectNudge.initialDelayMs30000初始 nudge delay。
noEffectNudge.backoffFactor2Exponential backoff multiplier。
noEffectNudge.maxDelayMs300000最大 nudge delay。
failedNudge.enabledfalseAgent 保持 failed 且没有 pending signal 时,创建 delayed self-directed retry signal。
failedNudge.priorityP2Failed retry signal priority。
failedNudge.maxConsecutive3Failed activations 后最多自动 retry 次数。0 表示不设上限。
failedNudge.initialDelayMs60000第一次 failed retry signal 前的 delay。
failedNudge.backoffFactor2后续 failed retry signals 的 exponential backoff multiplier。
failedNudge.maxDelayMs900000最大 failed retry delay。
failedNudge.messageBuilt-in text渲染给 failed agent 的 nudge body。
allQuietNudge.enabledfalse所有 agents quiet 且无 pending signals 时创建 scheduler signal。
allQuietNudge.targetAgentpm接收 all-quiet nudge 的 agent。
allQuietNudge.priorityP2All-quiet nudge signal priority。
allQuietNudge.cooldownMs300000All-quiet nudges 最小间隔。
allQuietNudge.messageBuilt-in text渲染进 scheduler signal 的 message。
quietAgentMonitor.enabledfalse启用 quiet-agent monitor rules。
quietAgentMonitor.rulesEmpty listQuiet-agent monitor rule list。
failedAgentMonitor.enabledfalse启用 failed-agent monitor rules。
failedAgentMonitor.rulesEmpty listFailed-agent monitor rule list。

Priority 包括 P0P1P2P3P2 用于应优先于 routine backlog 的 control-flow 或 continuation signals。普通 queued messages 默认使用 P3

Quiet-agent monitor rule 字段:

字段默认值说明
idDerived from index, agent, sender, recipient稳定 rule key,用于 dedupe。
enabledtrue启用该 rule。
agentRequired监控的 agent id,只在它是 quiet 时触发。
recipientpmMessage recipient。必须是 user 或 existing agent。
sendermonitorVirtual message sender。不会创建真实 sender agent。
priorityP2Message priority。
initialDelayMs1800000首次 message 前的 quiet duration。
repeatDelayMs900000同一个 quiet state 继续存在时的 repeat interval。
messageBuilt-in textMonitor message template body。

Monitor template 支持

Failed-agent monitor rules 使用同样字段,但只在 agent 是 failed 时触发。它们的 templates 还支持

communication

yaml
communication:
  coordinatorAgent: pm
  restrictNonCoordinatorToCoordinator: true
  nonCoordinatorMaxPriority: P2
  pmRoutineVerifierPriority: P3
字段默认值说明
coordinatorAgentpmRendered prompt 中的 coordinator agent。
restrictNonCoordinatorToCoordinatorfalsePrompt contract:non-coordinator 只 message coordinator。
nonCoordinatorMaxPriorityP2Non-coordinator routine messages 的 prompt-level max priority。
pmRoutineVerifierPriorityP3PM routine review/delegation messages 的 prompt-level default。

该 section 影响 activation instructions。Tool authorization 仍由 agents.<id>.tools 决定。

backend

yaml
backend:
  kind: docker-chat
  image: suzumio-runner:dev
  controllerUrl: http://host.docker.internal:39400
  docker:
    network: bridge
    proxy:
      inheritEnv: true
      rewriteLocalhost: true
      https: ${HTTPS_PROXY}
      http: ${HTTP_PROXY}
      all: ${ALL_PROXY}
      noProxy: ${NO_PROXY}
    mounts:
      - source: ./reference
        target: /mnt/reference
        readonly: true
        description: Project reference material.
  runner:
    mode: ai
    model: worker-main
字段默认值说明
kinddocker-chat当前 backend implementation。
imagesuzumio-runner:devActivation containers 使用的 Docker image。
controllerUrlhttp://host.docker.internal:39400Containers 调用 Suzumio support routes 和提交 output 的 URL。
docker.networkNoneDocker network mode。Linux host networking 使用 host
docker.mountsEmpty list挂载到每个 activation container 的 host files 或 directories。
docker.proxyInherit env, rewrite localhost传入 runner containers 的 proxy config。
runnermode: aiAI runner config。

Mount 字段:

字段默认值说明
sourceRequiredHost path。Relative paths 在 render 时相对 top-level project YAML 解析。
targetRequiredContainer path。使用 /mnt/reference 这类 non-reserved paths。
readonlytrueMount access。
descriptionNone渲染进 activation prompts 的描述。

Proxy 字段包括 inheritEnvhttphttpsallnoProxyrewriteLocalhost。Bridge networking 下,rewriteLocalhost: true 会把 loopback proxy hosts 改写为 host.docker.internalnetwork: host 下 host-loopback proxy URL 在容器中直接可达。

backend.runner 和 Models

yaml
backend:
  runner:
    mode: ai
    model: worker-with-fallback
    maxIterations: 20
    maxToolCalls: 80
    models:
      providers:
        gateway:
          type: openai-compatible
          baseURLEnv: SUZUMIO_GATEWAY_BASE_URL
          apiKeyEnv: SUZUMIO_GATEWAY_API_KEY
          timeoutMs: 300000
          chunkTimeoutMs: 60000
          headers: {}
          options: {}
      presets:
        worker-main:
          provider: gateway
          model: gpt-5.5
          apiModel: gpt-5.5
          reasoningEffort: high
          temperature: 0.2
          topP: 1
          maxOutputTokens: 8000
          contextLimit: 260000
          toolChoice: auto
        worker-with-fallback:
          model-list:
            - worker-main
            - backup-main

Runner 字段:

字段默认值说明
modeai只支持 ai
modelNoneProject-level model preset name。Agents 可以用 agents.<id>.model 覆盖。
maxIterationsProvider/runtime defaultOptional model loop iterations cap。
maxToolCallsProvider/runtime defaultOptional tool calls cap for one activation。
models.providersEmpty mapProvider registry。
models.presetsEmpty mapNamed model presets 和 fallback lists。

Provider 字段:

字段默认值说明
typeRequiredopenaianthropicgoogleopenai-compatible
apiKeyNoneInline API key。Committed examples 不写真实值。
apiKeyEnvNoneAPI key environment variable name。
baseURLNoneInline provider base URL。私有 endpoint 不写入 committed examples。
baseURLEnvNoneProvider base URL environment variable name。
headers{}Extra provider headers。
timeoutMsProvider defaultTotal request timeout,或 false
chunkTimeoutMsProvider defaultStreaming chunk timeout。
options{}Provider-specific options。

Preset 字段:

字段默认值说明
providerRequired for concrete presetProvider registry key。
modelRequired for concrete presetLocal and provider-facing model id,除非设置 apiModel
apiModelNone与 local preset model 不同的 provider-facing model id。
model-listNoneOrdered fallback list。不能与 concrete provider/model fields 同时使用。
reasoningEffortNoneProvider-facing reasoning effort。
temperatureNoneProvider-facing temperature。
topPNoneProvider-facing top-p。
topKNoneProvider-facing top-k。
maxOutputTokensNoneProvider-facing output token cap。
contextLimit260000Context overflow handling metadata。
toolChoiceNoneautorequirednone
providerOptions{}Preset-level provider-specific options。
headers{}Preset-level headers。

Committed examples 使用 baseURLEnvapiKeyEnv。真实 provider endpoints 和 keys 保留在环境变量中。

channels

yaml
channels:
  - "#project"
  - "#blocked"
  - "#reviews"

发送到未声明 channel 的 message 会失败。默认 channels 是 #project#blocked

observability

yaml
observability:
  http:
    enabled: true
    host: 127.0.0.1
    port: 39400
  webui:
    enabled: true

这些值在 YAML 中记录 intended server defaults。实际 running process 的 bind address 和 port 由 suzumio serve flags 控制。

YAML Conventions

PatternTypical valueExample
Block scalarMulti-line task 和 prompt text。`task:
Quoted stringsChannel names 和 punctuation-heavy strings。"#project"
ArraysTools、channels、profiles。- messages.send
MapsAgents、providers、presets、Docker options。agents: { ... }

Whole-Field Imports

完整字段值为 @import(path) 时,该字段会被 imported file 替换。Import marker 必须占满整个字段值。

yaml
task: @import(tasks/main.md)
agents:
  pm: @import(agents/pm.yaml)
  worker:
    prompt: @import(prompts/worker.md)
Imported fileResolution
.yaml.yml作为 YAML 解析,然后继续解析其中的 imports。
.json作为 JSON 解析,然后继续解析其中的 imports。
其他扩展名作为 raw UTF-8 text 导入。

Import path 相对包含该 import 的文件解析。HTTP imports 会被拒绝。Import loops 和过深 import depth 会被拒绝。

extends 和 Merge Rules

yaml
extends:
  - @import(profiles/base.yaml)
  - @import(profiles/ai.yaml)

name: theorem-project
task: @import(tasks/theorem.md)

每个 extends entry 都解析成 object。Suzumio 从前到后合并 profile objects,再把 local file 合并到最上层。

Merge caseBehavior
Object into objectRecursively deep-merged。
Array into arrayLater array replaces earlier array。
Scalar into any valueLater scalar replaces earlier value。
Local file vs profileLocal file wins。

Validation Workflow

bash
suzumio config render path/to/project.yaml
suzumio init path/to/project.yaml
suzumio status project-name

Rendered output 会显示 defaults、imports、array replacement、inherited model settings、provider endpoint/key environment-variable names,以及 normalized local toolpack paths。