agents

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

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 表示不追踪。

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL