pub enum NodeKind {
Show 21 variants
Model {
model_ref: String,
prompt_ref: String,
output_schema: String,
system_prompt: Option<String>,
tools: Vec<Value>,
},
Tool {
tool_ref: String,
input_mapping: HashMap<String, String>,
output_schema: String,
},
PythonFn {
module: String,
function: String,
output_schema: String,
agent_tool_dispatch: bool,
},
JavaFn {
class_name: String,
method: String,
output_schema: String,
agent_tool_dispatch: bool,
},
Condition {
branches: Vec<ConditionalBranch>,
},
Parallel {
branches: Vec<NodeId>,
},
Join {
wait_for: Vec<NodeId>,
merge_strategy: MergeStrategy,
},
HumanApproval {
description: String,
timeout_secs: Option<u64>,
fallback_node: Option<NodeId>,
},
Wait {
condition: WaitCondition,
correlation_key: Option<String>,
timeout_secs: Option<u64>,
},
Subgraph {
workflow_ref: String,
workflow_version: Option<String>,
input_mapping: HashMap<String, String>,
output_mapping: HashMap<String, String>,
},
MemoryRetrieval {
connector_ref: String,
query_expr: String,
output_schema: String,
},
Policy {
policy_ref: String,
on_violation: ViolationAction,
},
Finalizer {
tool_ref: String,
run_on: FinalizerTrigger,
},
Agent {
agent_ref: String,
input_mapping: HashMap<String, String>,
output_schema: String,
},
McpTool {
server: String,
tool: String,
input_mapping: HashMap<String, String>,
output_schema: String,
},
A2aTask {
remote_agent: String,
skill: String,
input_mapping: HashMap<String, String>,
output_schema: String,
stream: bool,
on_input_required: Option<NodeId>,
timeout_secs: Option<u64>,
},
AgentDiscovery {
skill: String,
protocol: Option<String>,
output_binding: String,
},
Coordinator {
task: String,
required_skills: Vec<String>,
preferred_skills: Vec<String>,
trust_domain: Option<String>,
budget: Option<CoordinatorBudget>,
tiebreaker: Option<TiebreakerConfig>,
strategy: String,
weights: DimensionWeights,
input_mapping: HashMap<String, String>,
output_key: String,
},
AgentTool {
agent: AgentTarget,
mode: AgentToolMode,
input_mapping: HashMap<String, String>,
output_key: String,
timeout_ms: Option<u64>,
budget: Option<AgentToolBudget>,
},
Eval {
scorers: Vec<EvalScorer>,
on_fail: EvalOnFail,
max_retries: u32,
input_expr: Option<String>,
},
LimitExceeded,
}Expand description
All node kinds supported by the JamJet runtime.
Variants§
Model
LLM call with a prompt and structured output.
Fields
Tool
Python function, HTTP endpoint, or gRPC tool.
PythonFn
Arbitrary Python function executed by a Python worker.
Fields
agent_tool_dispatch: boolTrue when this node is an ADK agent tool-dispatch node, i.e. it runs a whole turn’s model-chosen tool calls in one shot.
Policy for these nodes cannot be derived from the static node kind:
the tool names only exist in runtime state. The worker instead
evaluates the frozen pending calls carried in the work-item payload.
#[serde(default)] so IRs compiled before this field existed
deserialize to false and behave exactly as they did before.
JavaFn
Arbitrary Java method executed by an external Java tool-worker.
The Java analog of NodeKind::PythonFn: a class_name + method
pair the worker reflects/dispatches. Routes to the java_tool queue,
which a net-new Java worker drains over the same HTTP claim/complete
API the Python python_tool worker uses — durable, exactly-once.
Fields
agent_tool_dispatch: boolSee NodeKind::PythonFn::agent_tool_dispatch. The Java tool-worker
receives identical payload enrichment, so it has the identical
enforcement gap and needs the identical marker.
Condition
Router — evaluates expressions and branches.
Fields
branches: Vec<ConditionalBranch>Parallel
Fan-out to multiple branches concurrently.
Join
Waits for all parallel branches to complete.
HumanApproval
Pauses workflow for human decision.
Wait
Suspends until a timer fires or external event arrives.
Subgraph
Executes a child workflow.
Fields
MemoryRetrieval
Retrieves context from a memory/retrieval connector.
Policy
Evaluates policy rules; can block or branch on violation.
Finalizer
Side-effect node (notifications, writes).
Agent
Delegates to a local JamJet agent.
McpTool
Invokes a tool from an external MCP server.
A2aTask
Delegates a task to an external A2A agent.
Fields
AgentDiscovery
Use Coordinator node instead
Dynamically discovers and selects an agent at runtime.
Fields
Coordinator
Dynamic agent routing with structured scoring + LLM tiebreaker. Supersedes AgentDiscovery.
Fields
budget: Option<CoordinatorBudget>tiebreaker: Option<TiebreakerConfig>weights: DimensionWeightsAgentTool
Invoke a registered agent as a callable tool.
Eval
Evaluates the preceding node’s output using configurable scorers.
Supports LLM-judge, deterministic assertions, latency/cost thresholds, and custom Python scorer plugins.
Fields
scorers: Vec<EvalScorer>Ordered list of scorer configurations.
on_fail: EvalOnFailAction on overall failure (any scorer below threshold).
LimitExceeded
Terminal node emitted by strategy compilers when an iteration or cost
limit is reached. The runtime records the workflow as LimitExceeded
and stops further execution. No fields are required — it is purely a
marker that carries optional descriptive metadata in the node’s
description / labels.
Implementations§
Source§impl NodeKind
impl NodeKind
Sourcepub fn queue_type(&self) -> QueueType
pub fn queue_type(&self) -> QueueType
Returns the queue type this node should be dispatched to.
Sourcepub fn is_durable(&self) -> bool
pub fn is_durable(&self) -> bool
Returns true if this node requires durable tracking across crashes.