Documentation
¶
Overview ¶
Package subagent lets the agent delegate to isolated child agents (FR-09). A subagent reuses the same harness loop with its own prompt, tool subset, and permission mode, giving context isolation. It is exposed to the parent as an "Agent" CoreTool; recursion is bounded by a depth guard carried on the context.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
Provider llm.Provider
ParentTools *tool.Registry
Agents map[string]Definition
MaxDepth int // default 3
CanUseTool permission.CanUseTool
Hooks harness.HookRunner
// Transcript, when non-nil, persists each subagent run to its own sidechain
// file under the parent session (whose id is read from the context). Subagent
// tokens are recorded there, separate from the parent's totals.
Transcript *transcript.Store
}
Config wires the Agent tool.
type Definition ¶
type Definition struct {
Description string // shown to the parent model in the Agent tool prompt
Prompt []string // the subagent's system prompt
Tools []string // tool names it may use (empty = inherit all)
PermissionMode permission.Mode // its permission mode (default: parent's)
MaxTurns int
}
Definition configures a named subagent (FR-09.1).
Click to show internal directories.
Click to hide internal directories.