subagent

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSubagent

func NewSubagent(_ 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{}

type SubagentDeps

type SubagentDeps struct {
	Subagent subagent.Spawner `json:"subagent"`
}

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 */
}

type SubagentOutput

type SubagentOutput struct {
	Agent   string `json:"agent"`
	Status  string `json:"status"`
	Summary string `json:"summary"`
	Session string `json:"session"`
	Steps   int    `json:"steps"`
}

Jump to

Keyboard shortcuts

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