Struct AliasedAgentConfig
pub struct AliasedAgentConfig {Show 22 fields
pub enabled: bool,
pub channels: Vec<ChannelRef>,
pub model_provider: ModelProviderRef,
pub risk_profile: RiskProfileRef,
pub runtime_profile: RuntimeProfileRef,
pub skill_bundles: Vec<String>,
pub knowledge_bundles: Vec<String>,
pub mcp_bundles: Vec<String>,
pub acp_enable_mcp: bool,
pub cron_jobs: Vec<String>,
pub tts_provider: TtsProviderRef,
pub transcription_provider: TranscriptionProviderRef,
pub classifier_provider: ModelProviderRef,
pub precheck: ChannelPrecheckConfig,
pub summary_provider: ModelProviderRef,
pub delegate_same_risk_profile: bool,
pub delegates: Vec<DelegateTargetConfig>,
pub resolved: ResolvedRuntime,
pub workspace: AgentWorkspaceConfig,
pub memory: AgentMemoryConfig,
pub identity: IdentityConfig,
pub a2a: AgentA2aConfig,
}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: RiskProfileRefRisk profile alias (e.g. "default"). Resolves delegation guardrails at runtime.
runtime_profile: RuntimeProfileRefRuntime 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], a named
group of MCP servers. Secure by default: an agent is granted only the
servers named by its bundles. An agent with no mcp_bundles receives
no MCP servers (omission is not a grant). See
Config::mcp_servers_for_agent.
acp_enable_mcp: boolInitialize this agent’s mcp_bundles tools when it serves an ACP
(session/new) session.
Off by default: MCP servers are external processes/services that can
block startup while they connect, and ACP session/new is expected to
return promptly. Enable it when this agent must call its mcp_bundles
tools over ACP; session/new then pays the one-time MCP connection cost
(bounded and non-fatal per server). Set per agent so each ACP profile
opts in independently; when this agent is the ACP default
(acp.default_agent, or the sole configured agent), the flag is picked
up automatically for sessions that omit agentAlias.
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, so this field has no effect on ACP traffic.
precheck: ChannelPrecheckConfigPer-agent reply-intent precheck controls. The classifier call reads
this block at message time; model/provider selection stays on
classifier_provider so there is only one routing source of truth.
summary_provider: ModelProviderRefPer-agent override for the context-compression summarizer provider, as
a providers.models.<type>.<alias> reference. Empty (Default) = inherit
the runtime profile’s context_compression.summary_provider, else the
agent’s own resolved provider+model. Reference only, never a copy;
resolved by Config::effective_summary_provider. Validated in
Config::validate().
delegate_same_risk_profile: boolAuto-allow delegation to every agent sharing this agent’s risk
profile. Default true preserves the historical reach where any
same-profile peer is a delegation target. Set false to opt this
agent out so only the explicit delegates list is reachable.
Gating (whether delegation is permitted at all) still lives on the
risk profile’s delegation_policy.mode; this only narrows reach.
delegates: Vec<DelegateTargetConfig>Explicit delegate roster: additional agent aliases this agent may
delegate to, beyond same-profile peers. Possibly empty. String
entries are accepted for concise manual editing and load as bounded
delegates; saved config emits object entries with explicit modes.
Entries may name agents on a different risk profile. Config::validate()
fails loud on a dangling alias, duplicate alias, or self-reference.
resolved: ResolvedRuntime§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.
a2a: AgentA2aConfigPer-agent A2A publication block ([agents.<alias>.a2a]). Gates
whether this alias is discoverable as a spec-conforming A2A agent
and which resolved skills appear on its card. Default-closed
(published = false, no exposed skills). See
crate::multi_agent::AgentA2aConfig.
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.
pub fn secret_field_terminals() -> Vec<&'static str>
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.
pub fn nested_section_group(name: &str) -> Option<&'static str>
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.
pub fn nested_option_entries(&self) -> Vec<NestedOptionEntry>
pub fn create_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>
pub fn rename_map_key( &mut self, section_path: &str, map_key: &str, new_key: &str, ) -> Result<bool, String>
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 (const: unstable) · §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