Skip to main content

Blueprint

Struct Blueprint 

Source
pub struct Blueprint {
Show 16 fields pub name: String, pub description: String, pub stages: Vec<Stage>, pub context_layout: ContextLayout, pub transforms: Vec<ContextTransform>, pub version: String, pub compaction_config: Option<CompactionConfig>, pub max_child_depth: Option<usize>, pub entry_stage: Option<String>, pub metadata: HashMap<String, Value>, pub security: Option<SecurityConfig>, pub batch_tool_hint: Option<bool>, pub repetition_detection: Option<RepetitionDetectionConfig>, pub file_tracking: Option<FileTrackingConfig>, pub sandbox: Option<ToolSandboxConfig>, pub dynamic_tools: bool,
}
Expand description

An agent blueprint - the complete definition of an agent type.

Includes stages, model selection, tools, AND context layout. A blueprint defines everything needed to instantiate and run an agent with specific capabilities and memory structure.

Fields§

§name: String

Unique name for this agent type

§description: String

Human-readable description

§stages: Vec<Stage>

Execution stages (e.g., analyze → implement → review)

§context_layout: ContextLayout

Context window layout defining memory regions

§transforms: Vec<ContextTransform>

Context transforms for inter-agent communication

§version: String

Version of this blueprint

§compaction_config: Option<CompactionConfig>

Configuration for LLM-based compaction

§max_child_depth: Option<usize>

Maximum depth of the sub-agent tree (default: 3)

§entry_stage: Option<String>

Which stage to start from (default: first defined)

§metadata: HashMap<String, Value>

Additional metadata

§security: Option<SecurityConfig>

Security configuration for taint tracking.

§batch_tool_hint: Option<bool>

Agent-level override for the batch-tool-calls system-prompt hint. None inherits the global config toggle; a per-stage batch_tool_hint overrides this. See crate::taint::resolve_batch_tool_hint for the cascade.

§repetition_detection: Option<RepetitionDetectionConfig>

Repetition detection configuration.

§file_tracking: Option<FileTrackingConfig>

File tracking configuration.

§sandbox: Option<ToolSandboxConfig>

Agent-level sandbox configuration for tool execution. Per-stage [stages.<name>.sandbox] overrides this; both cascade through crate::resolve_sandbox.

§dynamic_tools: bool

Opt-in escape hatch: when true, the agent may add tools to its own tools/ directory mid-run and have them re-discovered and re-advertised for its next turn. Off by default - tools are otherwise discovered once at spawn and an agent cannot grow its own toolchain.

Implementations§

Source§

impl Blueprint

Source

pub fn new( name: String, description: String, stages: Vec<Stage>, context_layout: ContextLayout, ) -> Self

Create a new blueprint with the specified configuration.

Source

pub fn agent_tool_permissions(&self) -> HashMap<String, String>

Agent-level tool permissions, keyed by tool name.

The manifest parser records a top-level [tool_permissions] block as tool_perm:<tool> → policy-string entries in Self::metadata. This projects them back into a tool-keyed map for the runtime’s agent-level permission layer. Non-tool_perm: keys and non-string values are ignored.

Source

pub fn with_transforms(self, transforms: Vec<ContextTransform>) -> Self

Add context transforms to this blueprint.

Source

pub fn with_version(self, version: String) -> Self

Set the version of this blueprint.

Source

pub fn validate(&self) -> Result<(), ValidationError>

Validate that the blueprint is well-formed.

Source

pub fn resolve_entry_stage_name(&self) -> String

Resolve the entry stage name.

Source

pub fn find_stage(&self, name: &str) -> Option<&Stage>

Find a stage by name.

Trait Implementations§

Source§

impl Clone for Blueprint

Source§

fn clone(&self) -> Blueprint

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 Blueprint

Source§

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

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

impl<'de> Deserialize<'de> for Blueprint

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 Blueprint

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

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