Skip to main content

WorkflowSpawnInfo

Struct WorkflowSpawnInfo 

Source
pub struct WorkflowSpawnInfo {
Show 16 fields pub agent_id: String, pub goal: String, pub role: String, pub isolation: String, pub context_inheritance: String, pub model_hint: Option<String>, pub trust: String, pub output_schema: Option<Value>, pub reducer: Option<String>, pub input_agent_ids: Vec<String>, pub judge_match: Option<JudgeMatch>, pub loop_max_iters: Option<usize>, pub classify_labels: Vec<String>, pub token_budget: Option<u64>, pub max_turns: Option<u32>, pub max_wall_ms: Option<u64>,
}
Expand description

Enough to run one spawned workflow node, carried to the SDK in the WorkflowBatchSpawned observation. Role/isolation/inheritance are canonical snake_case strings (serde names) so the host SDK can rebuild an agent run spec — the kernel generates these specs internally, so this is how the goal reaches the SDK that actually executes the node.

Fields§

§agent_id: String§goal: String§role: String§isolation: String§context_inheritance: String§model_hint: Option<String>§trust: String

W3 trust level ("trusted" | "quarantined") — the SDK runs quarantined nodes without privileges and crosses their output back only as a structured summary.

§output_schema: Option<Value>

G3 structured output: the JSON Schema the node’s output must conform to, carried verbatim from WorkflowNode::output_schema. The SDK instructs the agent with it and validates + retries on its result. None when the node declared no schema. Additive ABI.

§reducer: Option<String>

G2 deterministic compute: present only for a NodeKind::Reduce node — the name of the SDK-registered pure function the SDK runs (over input_agent_ids’ outputs) instead of an LLM agent. None for every ordinary node. Additive ABI.

§input_agent_ids: Vec<String>

G2: the dependency agent ids whose outputs a NodeKind::Reduce node consumes (its depends_on, resolved to stable agent ids). Empty for non-reduce nodes. Additive ABI.

§judge_match: Option<JudgeMatch>

Present only for a tournament judge spawn (A#2): the two entrant agent ids whose outputs this judge must compare. The SDK looks up those entrants’ produced candidates, runs the judge, and reports the winner in the result’s tournament_winner. None for every ordinary (entrant / spawn / loop / classify) node. Additive ABI: omitted on the wire when None.

§loop_max_iters: Option<usize>

Present only for a NodeKind::Loop iteration spawn (A#2 v2): the loop’s max_iters. It both marks the spawn as a loop iteration — so the SDK knows to solicit and report a loop_continue stop signal from the agent — and gives the cap for the agent’s prompt. None for every non-loop node. Mirrors how reducer / judge_match distinguish reduce / judge spawns. Additive ABI: omitted on the wire when None.

§classify_labels: Vec<String>

Present only for a NodeKind::Classify spawn (A#2): the branch labels the classifier must choose among. Non-empty marks the spawn as a classifier — the SDK instructs the agent to pick exactly one label and reports it in the result’s classify_branch. Empty for every non-classify node. Additive ABI: omitted on the wire when empty.

§token_budget: Option<u64>

M4/G5: the node’s per-node cumulative token cap, if set. The SDK sets the child run’s max_total_tokens to this so the node self-terminates at the cap. Additive ABI: omitted when None.

§max_turns: Option<u32>

O3: per-node turn cap → the child run’s max_turns. Additive ABI: omitted when None.

§max_wall_ms: Option<u64>

O3: per-node wall-clock cap (ms) → the child run’s timeout. Additive ABI: omitted when None.

Trait Implementations§

Source§

impl Clone for WorkflowSpawnInfo

Source§

fn clone(&self) -> WorkflowSpawnInfo

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for WorkflowSpawnInfo

Source§

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

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

impl<'de> Deserialize<'de> for WorkflowSpawnInfo

Source§

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

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

impl Eq for WorkflowSpawnInfo

Source§

impl PartialEq for WorkflowSpawnInfo

Source§

fn eq(&self, other: &WorkflowSpawnInfo) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for WorkflowSpawnInfo

Source§

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

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for WorkflowSpawnInfo

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more