Skip to main content

NodeKind

Enum NodeKind 

Source
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.

Fields

§model_ref: String
§prompt_ref: String
§output_schema: String
§system_prompt: Option<String>
§

Tool

Python function, HTTP endpoint, or gRPC tool.

Fields

§tool_ref: String
§input_mapping: HashMap<String, String>
§output_schema: String
§

PythonFn

Arbitrary Python function executed by a Python worker.

Fields

§module: String
§function: String
§output_schema: String
§

Condition

Router — evaluates expressions and branches.

Fields

§

Parallel

Fan-out to multiple branches concurrently.

Fields

§branches: Vec<NodeId>
§

Join

Waits for all parallel branches to complete.

Fields

§wait_for: Vec<NodeId>
§merge_strategy: MergeStrategy
§

HumanApproval

Pauses workflow for human decision.

Fields

§description: String
§timeout_secs: Option<u64>
§fallback_node: Option<NodeId>
§

Wait

Suspends until a timer fires or external event arrives.

Fields

§condition: WaitCondition
§correlation_key: Option<String>
§timeout_secs: Option<u64>
§

Subgraph

Executes a child workflow.

Fields

§workflow_ref: String
§workflow_version: Option<String>
§input_mapping: HashMap<String, String>
§output_mapping: HashMap<String, String>
§

MemoryRetrieval

Retrieves context from a memory/retrieval connector.

Fields

§connector_ref: String
§query_expr: String
§output_schema: String
§

Policy

Evaluates policy rules; can block or branch on violation.

Fields

§policy_ref: String
§on_violation: ViolationAction
§

Finalizer

Side-effect node (notifications, writes).

Fields

§tool_ref: String
§

Agent

Delegates to a local JamJet agent.

Fields

§agent_ref: String
§input_mapping: HashMap<String, String>
§output_schema: String
§

McpTool

Invokes a tool from an external MCP server.

Fields

§server: String
§tool: String
§input_mapping: HashMap<String, String>
§output_schema: String
§

A2aTask

Delegates a task to an external A2A agent.

Fields

§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

👎Deprecated:

Use Coordinator node instead

Dynamically discovers and selects an agent at runtime.

Fields

§skill: String
👎Deprecated:

Use Coordinator node instead

§protocol: Option<String>
👎Deprecated:

Use Coordinator node instead

§output_binding: String
👎Deprecated:

Use Coordinator node instead

§

Coordinator

Dynamic agent routing with structured scoring + LLM tiebreaker. Supersedes AgentDiscovery.

Fields

§task: String
§required_skills: Vec<String>
§preferred_skills: Vec<String>
§trust_domain: Option<String>
§strategy: String
§input_mapping: HashMap<String, String>
§output_key: String
§

AgentTool

Invoke a registered agent as a callable tool.

Fields

§input_mapping: HashMap<String, String>
§output_key: String
§timeout_ms: Option<u64>
§

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: EvalOnFail

Action on overall failure (any scorer below threshold).

§max_retries: u32

Maximum retry attempts before propagating failure.

§input_expr: Option<String>

Input expression — which state field to evaluate (default: last node output).

Implementations§

Source§

impl NodeKind

Source

pub fn queue_type(&self) -> QueueType

Returns the queue type this node should be dispatched to.

Source

pub fn is_durable(&self) -> bool

Returns true if this node requires durable tracking across crashes.

Trait Implementations§

Source§

impl Clone for NodeKind

Source§

fn clone(&self) -> NodeKind

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NodeKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for NodeKind

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for NodeKind

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,