Documentation
¶
Overview ¶
Package chain registers agent/chain: run one inbound turn through several agents in sequence, sharing the session.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New registers agent/chain: sequential agent pipeline; every node runs a full turn on the shared session.
Best practices:
- Nodes are regular agents (agent/coding, another agent/chain) injected via deps.agents.
- All nodes share the session: node N sees node N-1's messages via DeriveMessages.
- The inbound user message is recorded once, on the first node's turn; later nodes receive an empty message, so agents that require a non-empty prompt (agent/acp-remote) can only be the first node.
- Keep routing-style nodes small (own model, few maxSteps); skip/repeat policies belong to wrapper plugins, not chain.
Types ¶
type Config ¶
type Config struct {
// ID is the chain agent id referenced by loop.defaultAgent or /agent use.
ID agentkit.AgentID `json:"id"`
// Nodes lists node agent ids (from deps.agents) executed in order for every turn.
Nodes []agentkit.AgentID `json:"nodes"`
// ContinueOnError keeps running later nodes after a node fails; default aborts the chain.
ContinueOnError bool `json:"continueOnError,omitempty"`
}
Config configures agent/chain.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime is a composite Agent that runs nodes sequentially within one dispatch.
func (*Runtime) AgentCatalogEntry ¶
AgentCatalogEntry describes the chain for /agent help output.
Click to show internal directories.
Click to hide internal directories.