Skip to main content

Module subagent_node

Module subagent_node 

Source
Expand description

Sub-agent nodes — the graph node that delegates to a harness agent (a model-driven agent loop) resolved by name from a CapabilityRegistry.

Where crate::graph::subgraph embeds an entire [CompiledGraph] as a node, this module embeds a harness agent as a node: a graph step hands its work to a registered, independently-observable agent and folds the agent’s answer back into the parent graph state.

The pieces:

See [types] for the data definitions and test.rs for focused tests.

Structs§

HarnessSubAgent
Adapts a harness SubAgent into a registry-storable HarnessAgent.
SubAgentBudget
An optional cap on the work a single sub-agent invocation may perform.
SubAgentInput
The structured input a SubAgentNode hands to a delegated agent.
SubAgentNode
A graph node that delegates to a harness agent resolved by name.
SubAgentOutput
The structured output a delegated agent returns to its SubAgentNode.
SubAgentPolicy
Timeout, retry, and budget policy applied around a sub-agent invocation.

Traits§

HarnessAgent
A harness agent invocable by name from a graph node.

Functions§

subagent_node
Lowers a SubAgentNode plus a capability registry into a graph node [Handler].

Type Aliases§

InputMapper
Maps parent graph State into the SubAgentInput a delegated agent runs over.
OutputMapper
Maps a delegated agent’s SubAgentOutput into the parent graph Update merged through the graph reducer.