pub struct AliasedAgentConfig {Show 35 fields
pub enabled: bool,
pub channels: Vec<ChannelRef>,
pub model_provider: ModelProviderRef,
pub risk_profile: String,
pub runtime_profile: String,
pub skill_bundles: Vec<String>,
pub knowledge_bundles: Vec<String>,
pub mcp_bundles: Vec<String>,
pub cron_jobs: Vec<String>,
pub tts_provider: TtsProviderRef,
pub transcription_provider: TranscriptionProviderRef,
pub classifier_provider: ModelProviderRef,
pub compact_context: bool,
pub max_tool_iterations: usize,
pub max_history_messages: usize,
pub max_context_tokens: usize,
pub parallel_tools: bool,
pub tool_dispatcher: String,
pub strict_tool_parsing: bool,
pub tool_call_dedup_exempt: Vec<String>,
pub tool_filter_groups: Vec<ToolFilterGroup>,
pub max_system_prompt_chars: usize,
pub thinking: ThinkingConfig,
pub history_pruning: HistoryPrunerConfig,
pub precheck: ChannelPrecheckConfig,
pub context_aware_tools: bool,
pub eval: EvalConfig,
pub auto_classify: Option<AutoClassifyConfig>,
pub context_compression: ContextCompressionConfig,
pub max_tool_result_chars: usize,
pub keep_tool_context_turns: usize,
pub tool_receipts: ToolReceiptsConfig,
pub workspace: AgentWorkspaceConfig,
pub memory: AgentMemoryConfig,
pub identity: IdentityConfig,
}Expand description
Configuration for an aliased agent. Each [agents.<alias>] TOML
block deserializes into one of these. The DelegateTool looks up
entries here to dispatch a subtask to a named sibling agent.
Fields§
§enabled: boolWhether this agent is active. Set false to disable without removing the definition.
channels: Vec<ChannelRef>Channel aliases this agent handles (e.g. ["telegram.<alias>", "discord.<alias>"]).
Each entry is a ChannelRef resolving through [channels.<type>.<alias>];
Config::validate() fails loud on dangling references.
model_provider: ModelProviderRefDotted model-provider alias (e.g. "anthropic.<alias>").
Resolves through model_providers.<type>.<alias> at runtime;
Config::validate() fails loud on dangling references.
risk_profile: StringRisk profile alias (e.g. "default"). Resolves delegation guardrails at runtime.
runtime_profile: StringRuntime profile alias (e.g. "default"). Resolves agentic/iteration settings.
skill_bundles: Vec<String>Skill bundle aliases. Each entry resolves to
skill_bundles[key].directory at runtime; the agent loads every
listed bundle.
knowledge_bundles: Vec<String>Knowledge bundle aliases. Additive — the agent loads every listed bundle.
mcp_bundles: Vec<String>MCP bundle aliases. Each entry references mcp_bundles[key],
itself a named group of MCP servers; agents pick which bundles to
load.
cron_jobs: Vec<String>Cron job aliases. Each entry references cron[key] — a declarative
scheduled job invoked by the scheduler on its configured trigger.
When the cron fires, this agent is the actor that executes the job.
tts_provider: TtsProviderRefTTS provider as a dotted alias reference (<type>.<alias>,
e.g. "openai.<alias>"). Resolves through tts_providers.<type>.<alias>.
Empty = no TTS for this agent (there is no global default-provider concept;
every agent that wants TTS sets its own tts_provider).
transcription_provider: TranscriptionProviderRefTranscription / STT provider as a dotted alias reference
(<type>.<alias>, e.g. "groq.<alias>"). Resolves through
transcription_providers.<type>.<alias>. Empty = agent has no
transcription preference; channels that ingest voice still need a
resolved provider (there is no global default), so an inbound voice
flow into an agent with empty transcription_provider errors loudly
at the channel boundary.
classifier_provider: ModelProviderRefOptional override for the per-message LLM reply-intent classifier
(classify_channel_reply_intent in zeroclaw-channels). When non-empty,
the channel orchestrator routes the “should this message be replied to?”
classification call to [providers.models.<type>.<alias>] referenced
here, instead of reusing the main agent’s model_provider.
Source of truth for api_key / uri / model / temperature etc. is the
referenced [providers.models.<type>.<alias>] entry. This field is
a reference only (NEVER a copy) — per AGENTS.md SINGLE SOURCE OF TRUTH.
Empty (Default) = inherit the main agent’s resolved provider+model
(preserves pre-PR behavior; backward compatible).
Use case: classification is a cheap REPLY/NO_REPLY decision, doesn’t
need a high-end model. Point this at a fast/free small model
(e.g. kimi-k2.5, qwen-turbo) while model_provider stays on the
expensive answering model (e.g. qwen3.6-plus).
Note: TOML table names cannot contain ., so alias kimi-k2.5
must be written as [providers.models.custom.kimi-k2-5]. The
underlying model = "kimi-k2.5" string can still contain dots.
ACP channels (IDE-direct) always reply and skip the classifier entirely — this field has no effect on ACP traffic.
compact_context: boolWhen true: bootstrap_max_chars=6000, rag_chunk_limit=2. Use for 13B or smaller models.
max_tool_iterations: usizeMaximum tool-call loop turns per user message. Default: 10.
Setting to 0 falls back to the safe default of 10.
max_history_messages: usizeMaximum conversation history messages retained per session. Default: 50.
max_context_tokens: usizeMaximum estimated tokens for conversation history before compaction triggers.
Uses ~4 chars/token heuristic. When this threshold is exceeded, older messages
are summarized to preserve context while staying within budget. Default: 32000.
parallel_tools: boolEnable parallel tool execution within a single iteration. Default: false.
tool_dispatcher: StringTool dispatch strategy (e.g. "auto"). Default: "auto".
strict_tool_parsing: boolWhen true, only native provider tool calls are executable. Text fallback parsing remains disabled, so XML/markdown/GLM-looking text is treated as final assistant text.
tool_call_dedup_exempt: Vec<String>Tools exempt from the within-turn duplicate-call dedup check. Default: [].
tool_filter_groups: Vec<ToolFilterGroup>Per-turn MCP tool schema filtering groups.
When non-empty, only MCP tools matched by an active group are included in the
tool schema sent to the LLM for that turn. Built-in tools always pass through.
Default: [] (no filtering — all tools included).
max_system_prompt_chars: usizeMaximum characters for the assembled system prompt. When > 0, the prompt
is truncated to this limit after assembly (keeping the top portion which
contains identity and safety instructions). 0 means unlimited.
Useful for small-context models (e.g. glm-4.5-air ~8K tokens → set to 8000).
thinking: ThinkingConfigThinking/reasoning level control. Configures how deeply the model reasons
per message. Users can override per-message with /think:<level> directives.
history_pruning: HistoryPrunerConfigHistory pruning configuration for token efficiency.
precheck: ChannelPrecheckConfigReply-intent precheck configuration for channel messages.
context_aware_tools: boolEnable context-aware tool filtering (only surface relevant tools per iteration).
eval: EvalConfigPost-response quality evaluator configuration.
auto_classify: Option<AutoClassifyConfig>Automatic complexity-based classification fallback.
context_compression: ContextCompressionConfigContext compression configuration for automatic conversation compaction.
max_tool_result_chars: usizeMaximum characters for a single tool result before truncation.
Head (2/3) and tail (1/3) are preserved with a truncation marker in the
middle. Set to 0 to disable truncation. Default: 50000.
keep_tool_context_turns: usizeNumber of most recent conversation turns whose full tool-call/result
messages are preserved in channel conversation history. Older turns
keep only the final assistant text. Set to 0 to disable (previous
behavior). Default: 2.
tool_receipts: ToolReceiptsConfigHMAC tool execution receipt configuration.
workspace: AgentWorkspaceConfigPer-agent workspace block ([agents.<alias>.workspace]).
Holds the agent’s filesystem path, cross-agent access allowlist,
filesystem-escape boolean, and cross-agent memory allowlist.
Default is fully jailed (no cross-agent access). See
crate::multi_agent::AgentWorkspaceConfig.
memory: AgentMemoryConfigPer-agent memory backend selection ([agents.<alias>.memory]).
The backend field is locked at agent creation and immutable on
subsequent loads. Defaults to Sqlite. See
crate::multi_agent::AgentMemoryConfig.
identity: IdentityConfigPer-agent identity format ([agents.<alias>.identity]). Each
agent renders its own IDENTITY.md / SOUL.md inside its
per-agent workspace; this block selects the format (OpenClaw or
AIEOS) and optional inline/file source for the agent’s identity
document.
Implementations§
Source§impl AliasedAgentConfig
impl AliasedAgentConfig
Sourcepub fn configurable_prefix() -> &'static str
pub fn configurable_prefix() -> &'static str
Returns the #[prefix] value for this Configurable struct.
Sourcepub fn secret_fields(&self) -> Vec<SecretFieldInfo>
pub fn secret_fields(&self) -> Vec<SecretFieldInfo>
Returns metadata about all #[secret] fields on this struct and nested children.
Sourcepub fn secret_field_terminals() -> Vec<&'static str>
pub fn secret_field_terminals() -> Vec<&'static str>
Static enumeration of every #[secret] field’s terminal name
(snake_case, matching the on-disk TOML key) reachable from
this type via #[nested] traversal. Unlike secret_fields(),
this requires no instance — the per-struct codegen literals
are joined at call time with recursive calls into the inner
types’ own secret_field_terminals().
Used by the migration crate’s raw-TOML encrypt walker as the
secret-key allowlist. prop_fields()-derived allowlists skip
compound (non-Vec) #[secret] fields, so this method is the
authoritative source.
Sourcepub fn encrypt_secrets(&mut self, store: &SecretStore) -> Result<(), Error>
pub fn encrypt_secrets(&mut self, store: &SecretStore) -> Result<(), Error>
Encrypt all secret fields in place using the provided store.
Sourcepub fn decrypt_secrets(&mut self, store: &SecretStore) -> Result<(), Error>
pub fn decrypt_secrets(&mut self, store: &SecretStore) -> Result<(), Error>
Decrypt all secret fields in place using the provided store.
Sourcepub fn set_secret(&mut self, name: &str, value: String) -> Result<(), Error>
pub fn set_secret(&mut self, name: &str, value: String) -> Result<(), Error>
Set a secret field by its full dotted name, dispatching to nested children.
Sourcepub fn prop_fields(&self) -> Vec<PropFieldInfo>
pub fn prop_fields(&self) -> Vec<PropFieldInfo>
Returns metadata about all property fields on this struct and nested children.
Sourcepub fn get_prop(&self, name: &str) -> Result<String, Error>
pub fn get_prop(&self, name: &str) -> Result<String, Error>
Get a property value by its full dotted name, returning it as a display string.
Sourcepub fn set_prop(&mut self, name: &str, value_str: &str) -> Result<(), Error>
pub fn set_prop(&mut self, name: &str, value_str: &str) -> Result<(), Error>
Set a property value by its full dotted name, parsing from string.
Sourcepub fn prop_is_secret(name: &str) -> bool
pub fn prop_is_secret(name: &str) -> bool
Check if a property name refers to a secret field (static, no instance needed).
Sourcepub fn init_defaults(&mut self, prefix: Option<&str>) -> Vec<&'static str>
pub fn init_defaults(&mut self, prefix: Option<&str>) -> Vec<&'static str>
Instantiate None nested sections whose prefix matches.
Returns the prefixes that were initialized.
Sourcepub fn map_key_sections() -> Vec<MapKeySection>
pub fn map_key_sections() -> Vec<MapKeySection>
Enumerate every map-keyed (HashMap<String, T>) and list-shaped
(Vec<T>) section discoverable from this Configurable’s tree.
The dashboard / CLI consume this to surface “+ Add” affordances
without hardcoding the section list.
Sourcepub fn nested_section_help(name: &str) -> Option<&'static str>
pub fn nested_section_help(name: &str) -> Option<&'static str>
Help blurb for a #[nested] field on this struct, sourced from
the field-level /// docstring. Returns None for unknown
names so callers can fall through to a different lookup.
Sourcepub fn get_map_keys(&self, section_path: &str) -> Option<Vec<String>>
pub fn get_map_keys(&self, section_path: &str) -> Option<Vec<String>>
Return the current alias keys at section_path, or None if
the path doesn’t resolve to a map-keyed section in this tree.
Sourcepub fn nested_option_entries(&self) -> Vec<NestedOptionEntry>
pub fn nested_option_entries(&self) -> Vec<NestedOptionEntry>
Snapshot of every #[nested] Option<T> field on this struct
as (field_name, is_some) tuples, in declaration order.
field_name is the raw Rust ident (snake_case) — consumers
can map to display names via their own table. The schema
is the single source of truth: adding a new
pub foo: Option<FooConfig> field with #[nested] surfaces
here without touching any caller.
Sourcepub fn create_map_key(
&mut self,
section_path: &str,
map_key: &str,
) -> Result<bool, String>
pub fn create_map_key( &mut self, section_path: &str, map_key: &str, ) -> Result<bool, String>
Insert a default-valued entry under a map-keyed section, or
append to a list-shaped one, with map_key as the new entry’s
natural identifier (HashMap key for Map sections; identifier
field for List sections).
Returns Ok(true) if a new entry was created, Ok(false) if
the entry already existed (idempotent), or Err(reason) if
the section path doesn’t resolve to a Map/List in this tree.
Sourcepub fn delete_map_key(
&mut self,
section_path: &str,
map_key: &str,
) -> Result<bool, String>
pub fn delete_map_key( &mut self, section_path: &str, map_key: &str, ) -> Result<bool, String>
Remove the entry identified by map_key from the map-keyed
section at section_path.
Returns Ok(true) if the entry existed and was removed,
Ok(false) if it didn’t exist, or Err(reason) if the
section path doesn’t resolve.
Sourcepub fn rename_map_key(
&mut self,
section_path: &str,
map_key: &str,
new_key: &str,
) -> Result<bool, String>
pub fn rename_map_key( &mut self, section_path: &str, map_key: &str, new_key: &str, ) -> Result<bool, String>
Rename map_key to new_key within the map-keyed section at
section_path, preserving the entry’s value.
Returns Ok(true) if renamed, Ok(false) if map_key didn’t
exist, or Err(reason) if new_key already exists or the
section path doesn’t resolve.
Source§impl AliasedAgentConfig
impl AliasedAgentConfig
Sourcepub fn is_dispatchable(&self) -> bool
pub fn is_dispatchable(&self) -> bool
True when this agent has the bindings required to dispatch a turn:
enabled, non-empty model_provider, risk_profile, and
runtime_profile. Config::validate() emits the per-field errors
that, when all passed, mean this returns true.
Trait Implementations§
Source§impl Clone for AliasedAgentConfig
impl Clone for AliasedAgentConfig
Source§fn clone(&self) -> AliasedAgentConfig
fn clone(&self) -> AliasedAgentConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AliasedAgentConfig
impl Debug for AliasedAgentConfig
Source§impl Default for AliasedAgentConfig
impl Default for AliasedAgentConfig
Source§fn default() -> AliasedAgentConfig
fn default() -> AliasedAgentConfig
Source§impl<'de> Deserialize<'de> for AliasedAgentConfig
impl<'de> Deserialize<'de> for AliasedAgentConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AliasedAgentConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AliasedAgentConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for AliasedAgentConfig
impl JsonSchema for AliasedAgentConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl MaskSecrets for AliasedAgentConfig
impl MaskSecrets for AliasedAgentConfig
fn mask_secrets(&mut self)
fn restore_secrets_from(&mut self, current: &AliasedAgentConfig)
Source§impl Serialize for AliasedAgentConfig
impl Serialize for AliasedAgentConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for AliasedAgentConfig
impl RefUnwindSafe for AliasedAgentConfig
impl Send for AliasedAgentConfig
impl Sync for AliasedAgentConfig
impl Unpin for AliasedAgentConfig
impl UnsafeUnpin for AliasedAgentConfig
impl UnwindSafe for AliasedAgentConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more