Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSubagent ¶
func NewSubagent(cfg SubagentConfig, deps SubagentDeps) (agentkit.Tool, error)
NewSubagent registers tool/subagent: Delegate a subtask to a child agent (tool name: delegate) and wait for its conclusion.
Best practices:
- Pair with prompt/section/subagents, which lists the valid agent names; this tool's description is static and cannot.
- Mount it only on the main agent's tools runtime. The subagent spawner needs a separate runtime without it, both to break a dependency cycle and to keep children from delegating further.
- Bump toolTimeouts for delegate: a child agent runs many steps and will blow through the default tool timeout.
Types ¶
type SubagentConfig ¶
type SubagentConfig struct {
// DefaultTimeoutSeconds applies when the model omits timeoutSeconds on delegate.
DefaultTimeoutSeconds int `json:"defaultTimeoutSeconds,omitempty"`
}
func (*SubagentConfig) SetDefaults ¶ added in v0.3.55
func (c *SubagentConfig) SetDefaults()
SetDefaults implements pluginkit.Defaulter.
type SubagentDeps ¶
type SubagentInput ¶
type SubagentInput struct {
Agent string `json:"agent" jsonschema:"Name of the subagent to delegate to, from the subagent list in the system prompt"`
Task string `` /* 128-byte string literal not displayed */
Async *bool `` /* 147-byte string literal not displayed */
// TimeoutSeconds overrides the spawner wall clock for this call and extends the delegate tool wait when larger than toolTimeouts.
TimeoutSeconds *int `json:"timeoutSeconds,omitempty" jsonschema:"Wall-clock limit in seconds for this delegation. Default 900 when omitted."`
}
Click to show internal directories.
Click to hide internal directories.