pub enum NodeKind {
Show 19 variants
Model {
model_ref: String,
prompt_ref: String,
output_schema: String,
system_prompt: Option<String>,
},
Tool {
tool_ref: String,
input_mapping: HashMap<String, String>,
output_schema: String,
},
PythonFn {
module: String,
function: String,
output_schema: String,
},
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>,
},
}Expand description
All node kinds supported by the JamJet runtime.
Variants§
Model
LLM call with a prompt and structured output.
Tool
Python function, HTTP endpoint, or gRPC tool.
PythonFn
Arbitrary Python function executed by a Python worker.
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).
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.