pub struct SpawnArgs {Show 14 fields
pub run_id: String,
pub blueprint_path: String,
pub task: String,
pub regions: HashMap<String, String>,
pub model: Option<String>,
pub workdir: String,
pub metadata: HashMap<String, String>,
pub callback_url: Option<String>,
pub callback_secret: Option<String>,
pub yolo: bool,
pub no_seed_commands: bool,
pub allow: Vec<String>,
pub max_depth: Option<usize>,
pub parent_run_id: Option<String>,
}Expand description
The parameters for spawning an agent into the world. The runtime doesn’t know
how to load blueprints or resolve tools - that policy lives in the
Spawner the daemon installs - so this just carries the raw request.
Fields§
§run_id: StringThe run id to give the new agent (its directory / control key).
blueprint_path: StringPath to the agent manifest directory or bundle.
task: StringThe task prompt. Seeded into the region keyed task (see
crate::context_setup::init_window_seeded); a matching regions
entry, if present, overrides it.
regions: HashMap<String, String>Literal seed content for named caller-input regions, keyed by the
region’s caller-input name. Merged over task at spawn. #[serde(default)]
keeps older requests (which never sent this) deserializing to an empty map.
model: Option<String>Optional model override (provider/model or model).
workdir: StringWorking directory for tool execution.
metadata: HashMap<String, String>Custom key/value metadata from the request.
callback_url: Option<String>Webhook to POST on completion/error (surfaced in the run metadata).
callback_secret: Option<String>Optional shared secret for HMAC-SHA256 signing the webhook body.
yolo: boolRun this agent unattended (the --yolo launch override): approve every
tool call, waive the taint gate, and auto-answer the agent’s own prompts
(ask_user_*, blueprint interaction points) rather than parking on the
interaction hub for a person who isn’t there.
no_seed_commands: boolRefuse this run’s seed = { command = ... } regions (the
--no-seed-commands launch override). Command seeds execute at spawn,
before any approval prompt, so this is the per-run counterpart to the
[security] allow_seed_commands config switch.
allow: Vec<String>Tools to allow outright for this run (the --allow launch override).
max_depth: Option<usize>Override the blueprint’s max sub-agent tree depth.
parent_run_id: Option<String>The run id of this agent’s parent, when it is a sub-agent / fan-out
worker. Persisted in the run metadata so observers (dashboard, serve
tree) can nest children under their parent. None for a top-level run.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SpawnArgs
impl<'de> Deserialize<'de> for SpawnArgs
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl StructuralPartialEq for SpawnArgs
Auto Trait Implementations§
impl Freeze for SpawnArgs
impl RefUnwindSafe for SpawnArgs
impl Send for SpawnArgs
impl Sync for SpawnArgs
impl Unpin for SpawnArgs
impl UnsafeUnpin for SpawnArgs
impl UnwindSafe for SpawnArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> FromTemplate for T
impl<T> FromTemplate for T
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>
Source§impl<T> Template for T
impl<T> Template for T
Source§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
entity context to produce a Template::Output.Source§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clone.