pub struct AgentConfig {
pub name: CompactString,
pub description: CompactString,
pub system_prompt: String,
pub model: Option<CompactString>,
pub max_iterations: usize,
pub tool_choice: ToolChoice,
pub thinking: bool,
pub heartbeat: HeartbeatConfig,
pub members: Vec<String>,
pub skills: Vec<String>,
pub mcps: Vec<String>,
pub tools: Vec<CompactString>,
}Expand description
Serializable agent configuration.
Contains all parameters for an agent: identity, system prompt, model, iteration limits, heartbeat, and delegation scope. Used both as the TOML deserialization target and the runtime agent definition.
Fields§
§name: CompactStringAgent identifier. Derived from TOML key, not stored in TOML.
description: CompactStringHuman-readable description.
system_prompt: StringSystem prompt sent before each LLM request. Loaded from .md file.
model: Option<CompactString>Model to use from the registry. None = registry’s active/default.
max_iterations: usizeMaximum iterations before stopping.
tool_choice: ToolChoiceControls which tool the model calls.
thinking: boolWhether to enable thinking/reasoning mode.
heartbeat: HeartbeatConfigHeartbeat configuration. Interval 0 (the default) means no heartbeat.
members: Vec<String>Agents this agent can delegate to via spawn_task. Empty = no delegation.
skills: Vec<String>Skill names this agent can access. Empty = all skills (walrus default).
mcps: Vec<String>MCP server names this agent can access. Empty = all MCPs (walrus default).
tools: Vec<CompactString>Computed tool whitelist. Empty = all tools. Not serialized.
Implementations§
Source§impl AgentConfig
impl AgentConfig
Sourcepub fn new(name: impl Into<CompactString>) -> Self
pub fn new(name: impl Into<CompactString>) -> Self
Create a new config with the given name and defaults for everything else.
Sourcepub fn system_prompt(self, prompt: impl Into<String>) -> Self
pub fn system_prompt(self, prompt: impl Into<String>) -> Self
Set the system prompt.
Sourcepub fn description(self, desc: impl Into<CompactString>) -> Self
pub fn description(self, desc: impl Into<CompactString>) -> Self
Set the description.
Sourcepub fn model(self, name: impl Into<CompactString>) -> Self
pub fn model(self, name: impl Into<CompactString>) -> Self
Set the model to use from the registry.
Trait Implementations§
Source§impl Clone for AgentConfig
impl Clone for AgentConfig
Source§fn clone(&self) -> AgentConfig
fn clone(&self) -> AgentConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more