pub struct Agent {Show 16 fields
pub id: AgentId,
pub system_prompt: SystemPrompt,
pub model_preference: ModelPreference,
pub declared_tools: Vec<String>,
pub routing_examples: Vec<String>,
pub capabilities: AgentCapabilities,
pub tool_access: AgentToolAccess,
pub tool_class_policy: AgentToolClassPolicy,
pub permissions: PermissionSet,
pub guardrails: Vec<Guardrail>,
pub context_budget: ContextBudget,
pub tool_policy: ToolPolicy,
pub communication_rules: CommunicationRules,
pub write_governance: WriteGovernance,
pub cognitive_architecture: Option<CognitiveArchitecture>,
pub metadata: HashMap<String, Value>,
}Expand description
The canonical agent type — bounded execution context.
Identity is the floor, not the ceiling. All boundary fields have sensible defaults (fully open). An agent with only id + system_prompt works like a thin identity agent. Boundaries are opt-in, not opt-out.
Fields§
§id: AgentId§system_prompt: SystemPrompt§model_preference: ModelPreference§declared_tools: Vec<String>§routing_examples: Vec<String>§capabilities: AgentCapabilities§tool_access: AgentToolAccess§tool_class_policy: AgentToolClassPolicy§permissions: PermissionSet§guardrails: Vec<Guardrail>§context_budget: ContextBudget§tool_policy: ToolPolicy§communication_rules: CommunicationRules§write_governance: WriteGovernance§cognitive_architecture: Option<CognitiveArchitecture>When present, the agent’s reasoning is decomposed into parallel
cognitive streams (emotional, logical, antithink, etc.) that run
as an inner subgraph before the main LLM call.
When None, normal single-call execution. Zero overhead.
metadata: HashMap<String, Value>Implementations§
Source§impl Agent
impl Agent
Sourcepub fn new(id: impl Into<String>, system_prompt: impl Into<String>) -> Self
pub fn new(id: impl Into<String>, system_prompt: impl Into<String>) -> Self
Create a minimal agent — just identity, all boundaries open.
Sourcepub fn with_cognitive_architecture(self, arch: CognitiveArchitecture) -> Self
pub fn with_cognitive_architecture(self, arch: CognitiveArchitecture) -> Self
Enable cognitive architecture on this agent.
When set, the agent’s inner world runs before each LLM call,
enriching context through parallel lobe processing and synthesis.
When None (default), zero overhead — standard agent behavior.