Expand description
Agent-turn handler — bridges the DAG executor to the chat/inference layer.
This is the final piece of the critical path:
R1 → R5 → R3 → R6 → R7 → agent_turn_handler
When a user sends @researcher analyze this data, the chat layer:
- Parses the @mention (R7) → resolves to a roster agent.
- If the agent has a DAG pipeline definition, the agent-turn handler executes the pipeline using the DAG executor (R3), with each node dispatched as a local LLM agent turn.
- If no DAG is defined, falls through to the standard single-agent
inference path (
run_chat_inference_for_agent).
The handler implements NodeExecutor so the DAG executor can call it
for each node. Each node execution is a local LLM inference turn with
the node’s inputs (from the blackboard) injected into the prompt context.
Structs§
- Agent
Turn Config - Configuration for an agent-turn handler invocation.
- Agent
Turn Executor - A node executor that dispatches each DAG node as a local LLM agent turn.
Enums§
- Agent
Turn Outcome - Result of an agent-turn handler invocation.
Functions§
- execute_
agent_ turn - Execute an agent turn, optionally through a DAG pipeline.
- parse_
dag_ pipeline - Parse a DAG pipeline from a JSON definition.