pub struct CapabilitiesConfig {
pub enable_subagents: bool,
pub enabled_tools: Option<Vec<BuiltinTools>>,
pub disabled_tools: Option<Vec<BuiltinTools>>,
pub compaction_threshold: Option<usize>,
pub image_model: String,
pub finish_tool_schema_json: Option<String>,
}Expand description
Agent capability toggles: tool allowlists, subagent support, and compaction.
Fields§
§enable_subagents: boolWhether this agent can spawn subagents.
enabled_tools: Option<Vec<BuiltinTools>>If set, only these built-in tools are available (allowlist).
disabled_tools: Option<Vec<BuiltinTools>>If set, these built-in tools are removed (denylist).
compaction_threshold: Option<usize>Token threshold that triggers conversation compaction.
image_model: StringThe model to use for image generation.
This setting is a shorthand for GeminiConfig.models.image_generation.name.
If both are specified, the value in GeminiConfig takes precedence and
this field is ignored.
finish_tool_schema_json: Option<String>Optional JSON schema string for the finish tool’s structured output.
Implementations§
Source§impl CapabilitiesConfig
impl CapabilitiesConfig
Sourcepub fn with_tools(tools: Vec<BuiltinTools>) -> Self
pub fn with_tools(tools: Vec<BuiltinTools>) -> Self
Create a capabilities config with only the specified tools enabled.
Subagent support is enabled by default.
Sourcepub fn read_only() -> Self
pub fn read_only() -> Self
Create a capabilities config for read-only agents with subagent support.
Sourcepub fn custom_tools_only() -> Self
pub fn custom_tools_only() -> Self
Create a capabilities config with no builtin tools — only custom tools.
Subagent support is still enabled.
Trait Implementations§
Source§impl Clone for CapabilitiesConfig
impl Clone for CapabilitiesConfig
Source§fn clone(&self) -> CapabilitiesConfig
fn clone(&self) -> CapabilitiesConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more