#[non_exhaustive]pub enum NodeAction {
LlmInfer {
system_prompt_override: Option<String>,
use_streaming: bool,
include_tool_definitions: bool,
tool_filter_override: Option<Vec<String>>,
thinking_budget: Option<u32>,
temperature: Option<f32>,
max_tokens: Option<u32>,
},
ToolCall {
tool_name: String,
args_template: Option<String>,
},
Delegate {
agent_kind: String,
task_template: String,
},
HumanApproval {
description: String,
},
ConditionCheck {
condition: String,
},
SwitchParadigm {
paradigm: String,
},
}Expand description
The action performed by a graph node.
Each node can perform one of several action types:
- LLM inference (the core reasoning step)
- Tool execution (calling a specific tool)
- Sub-agent delegation (spawning a specialized sub-agent)
- Human approval (a checkpoint requiring human intervention)
- Condition check (a routing node that evaluates a condition)
- Paradigm switch (changing the active paradigm for subsequent nodes)
When a GraphActionExecutor (from oneai-agent) is configured,
the LlmInfer and ToolCall nodes delegate to the AgentLoop’s full
inference and execution pipeline (context assembly, tool definitions,
hooks, permission, domain pack). This is the P2-2 “闭环” mechanism.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
LlmInfer
LLM inference node — sends conversation to the model and gets a response.
When include_tool_definitions is true, the GraphActionExecutor will
build tool definitions for this node (filtered by tool_filter_override
or the active paradigm’s tool set). This is critical for ReAct loops —
the model needs to see available tools to decide whether to call them.
When include_tool_definitions is false, the node sends a pure inference
request without tool definitions (for final answer nodes, condition checks, etc).
Fields
include_tool_definitions: boolWhether to include tool definitions in the inference request.
When true, the GraphActionExecutor builds tool definitions based on
tool_filter_override or the active paradigm config.
When false (default), the LLM receives a pure text prompt without tools.
tool_filter_override: Option<Vec<String>>Override the tool filter for this node (if any). When Some, only these tools are included in the inference request. When None, the active paradigm’s tool_filter is used (or all tools if no paradigm is active).
ToolCall
Tool execution node — calls a specific tool with arguments.
Fields
Delegate
Sub-agent delegation node — spawns a specialized sub-agent.
Fields
HumanApproval
Human approval node — pauses execution for human review. This is an interrupt point where the user can inspect state and decide to continue, modify, or abort.
ConditionCheck
Condition check node — evaluates a condition and routes to different edges. This is the mechanism for dynamic routing in the graph.
Fields
SwitchParadigm
Paradigm switch node — changes the active paradigm for subsequent nodes.
When executed, this node updates GraphState.active_paradigm and
clears GraphState.parsed_decision. Subsequent LlmInfer nodes
(with include_tool_definitions = true) will use the new paradigm’s
tool set and system prompt. This enables multi-paradigm workflows
as explicit graph paths (e.g., Plan → ReAct → Reflect).
The paradigm string maps to ParadigmKind in oneai-agent:
“plan”, “react”, “reflect”, “explore”.