Skip to main content

AliasedAgentConfig

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: bool

Whether 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: ModelProviderRef

Dotted model-provider alias (e.g. "anthropic.<alias>"). Resolves through model_providers.<type>.<alias> at runtime; Config::validate() fails loud on dangling references.

§risk_profile: RiskProfileRef

Risk profile alias (e.g. "default"). Resolves delegation guardrails at runtime.

§runtime_profile: RuntimeProfileRef

Runtime 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: bool

Initialize 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: TtsProviderRef

TTS 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: TranscriptionProviderRef

Transcription / 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: ModelProviderRef

Optional 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: ChannelPrecheckConfig

Per-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: ModelProviderRef

Per-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: bool

Auto-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: AgentWorkspaceConfig

Per-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: AgentMemoryConfig

Per-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: IdentityConfig

Per-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: AgentA2aConfig

Per-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

Source

pub fn configurable_prefix() -> &'static str

Returns the #[prefix] value for this Configurable struct.

Source

pub fn secret_fields(&self) -> Vec<SecretFieldInfo>

Returns metadata about all #[secret] fields on this struct and nested children.

Source

pub fn secret_field_terminals() -> Vec<&'static str>

Source

pub fn encrypt_secrets(&mut self, store: &SecretStore) -> Result<()>

Encrypt all secret fields in place using the provided store.

Source

pub fn decrypt_secrets(&mut self, store: &SecretStore) -> Result<()>

Decrypt all secret fields in place using the provided store.

Source

pub fn set_secret(&mut self, name: &str, value: String) -> Result<()>

Set a secret field by its full dotted name, dispatching to nested children.

Source

pub fn prop_fields(&self) -> Vec<PropFieldInfo>

Returns metadata about all property fields on this struct and nested children.

Source

pub fn get_prop(&self, name: &str) -> Result<String>

Get a property value by its full dotted name, returning it as a display string.

Source

pub fn set_prop(&mut self, name: &str, value_str: &str) -> Result<()>

Set a property value by its full dotted name, parsing from string.

Source

pub fn prop_is_secret(name: &str) -> bool

Check if a property name refers to a secret field (static, no instance needed).

Source

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.

Source

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.

Source

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.

Source

pub fn nested_section_group(name: &str) -> Option<&'static str>

Source

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.

Source

pub fn nested_option_entries(&self) -> Vec<NestedOptionEntry>

Source

pub fn create_map_key( &mut self, section_path: &str, map_key: &str, ) -> Result<bool, String>

Source

pub fn delete_map_key( &mut self, section_path: &str, map_key: &str, ) -> Result<bool, String>

Source

pub fn rename_map_key( &mut self, section_path: &str, map_key: &str, new_key: &str, ) -> Result<bool, String>

Source§

impl AliasedAgentConfig

Source

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

Source§

fn clone(&self) -> AliasedAgentConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AliasedAgentConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AliasedAgentConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for AliasedAgentConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for AliasedAgentConfig

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl MaskSecrets for AliasedAgentConfig

Source§

fn mask_secrets(&mut self)

Source§

fn restore_secrets_from(&mut self, current: &Self)

Source§

impl Serialize for AliasedAgentConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,