Autonomy Config • Rust AI Agent SDK
AutonomyConfig: Configuration for agent autonomy
AutonomyConfig
Defined in the config module.
Rust AI Agent SDK
Configuration for agent autonomy
Fields
| Name | Type | Description |
|---|---|---|
level | AutonomyLevel | Autonomy level |
require_approval | bool | Require approval for destructive actions |
max_actions | Option<usize> | Maximum autonomous actions before pause |
allowed_tools | Vec<String> | Allowed tools for autonomous execution |
blocked_tools | Vec<String> | Blocked tools (never run autonomously) |
Methods
new
fn new() -> SelfCreate a new autonomy config
level
fn level(mut self, level: AutonomyLevel) -> SelfSet autonomy level
Parameters:
| Name | Type |
|---|---|
level | AutonomyLevel |
no_approval
fn no_approval(mut self) -> SelfDisable approval requirement
max_actions
fn max_actions(mut self, max: usize) -> SelfSet max actions
Parameters:
| Name | Type |
|---|---|
max | usize |
allow_tool
fn allow_tool(mut self, tool: impl Into<String>) -> SelfAdd allowed tool
Parameters:
| Name | Type |
|---|---|
tool | impl Into<String> |
block_tool
fn block_tool(mut self, tool: impl Into<String>) -> SelfAdd blocked tool
Parameters:
| Name | Type |
|---|---|
tool | impl Into<String> |
full_auto
fn full_auto(mut self) -> SelfSet to full auto mode
Source
View on GitHubpraisonai/src/config.rs at line 798