pub struct AgentConfig {Show 13 fields
pub name: String,
pub description: String,
pub system_prompt: String,
pub model: Option<String>,
pub max_iterations: usize,
pub tool_choice: ToolChoice,
pub thinking: bool,
pub members: Vec<String>,
pub skills: Vec<String>,
pub mcps: Vec<String>,
pub tools: Vec<String>,
pub compact_threshold: Option<usize>,
pub compact_tool_max_len: usize,
}Expand description
Serializable agent configuration.
Contains all parameters for an agent: identity, system prompt, model, iteration limits, and delegation scope. Used both as the TOML deserialization target and the runtime agent definition.
Fields§
§name: StringAgent identifier. Derived from TOML key, not stored in TOML.
description: StringHuman-readable description.
system_prompt: StringSystem prompt sent before each LLM request. Loaded from .md file.
model: Option<String>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.
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 (crabtalk default).
mcps: Vec<String>MCP server names this agent can access. Empty = all MCPs (crabtalk default).
tools: Vec<String>Computed tool whitelist. Empty = all tools. Not serialized.
compact_threshold: Option<usize>Token count threshold for automatic context compaction. When history exceeds this, the agent compacts automatically. None = disabled. Defaults to 100_000.
compact_tool_max_len: usizeMax byte length to keep from tool-role messages when compacting. Longer results are truncated before sending to the compaction LLM.
Implementations§
Source§impl AgentConfig
impl AgentConfig
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