Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCoordinator ¶
func BuildCoordinator( cfg bootstrap.Config, store *store.Store, models *bootstrap.ModelSet, bundle assets.Bundle, recordUsage UsageRecorder, ) (*agentcore.Agent, *tools.AskUserTool, *ctxpack.WriterRestorePack)
BuildCoordinator 组装 Coordinator Agent 及其 SubAgent。 返回 Agent、AskUserTool 和 WriterRestorePack。 Host 层通过 Agent.Subscribe 获取事件流,不再需要 emit 回调。
Types ¶
type UsageRecorder ¶ added in v0.1.2
type UsageRecorder func(agentName string, msg agentcore.AgentMessage)
UsageRecorder 是 BuildCoordinator 可选的用量回调;签名与 OnMessage 一致, 每条 agent 消息都会调一次,由 Host 层负责聚合。nil 表示不追踪。
Click to show internal directories.
Click to hide internal directories.