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: StringUnique name for this agent type
description: StringHuman-readable description
stages: Vec<Stage>Execution stages (e.g., analyze → implement → review)
context_layout: ContextLayoutContext window layout defining memory regions
transforms: Vec<ContextTransform>Context transforms for inter-agent communication
version: StringVersion 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: boolOpt-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
impl Blueprint
Sourcepub fn new(
name: String,
description: String,
stages: Vec<Stage>,
context_layout: ContextLayout,
) -> Self
pub fn new( name: String, description: String, stages: Vec<Stage>, context_layout: ContextLayout, ) -> Self
Create a new blueprint with the specified configuration.
Sourcepub fn agent_tool_permissions(&self) -> HashMap<String, String>
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.
Sourcepub fn with_transforms(self, transforms: Vec<ContextTransform>) -> Self
pub fn with_transforms(self, transforms: Vec<ContextTransform>) -> Self
Add context transforms to this blueprint.
Sourcepub fn with_version(self, version: String) -> Self
pub fn with_version(self, version: String) -> Self
Set the version of this blueprint.
Sourcepub fn validate(&self) -> Result<(), ValidationError>
pub fn validate(&self) -> Result<(), ValidationError>
Validate that the blueprint is well-formed.
Sourcepub fn resolve_entry_stage_name(&self) -> String
pub fn resolve_entry_stage_name(&self) -> String
Resolve the entry stage name.
Sourcepub fn find_stage(&self, name: &str) -> Option<&Stage>
pub fn find_stage(&self, name: &str) -> Option<&Stage>
Find a stage by name.