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

NameTypeDescription
levelAutonomyLevelAutonomy level
require_approvalboolRequire approval for destructive actions
max_actionsOption<usize>Maximum autonomous actions before pause
allowed_toolsVec<String>Allowed tools for autonomous execution
blocked_toolsVec<String>Blocked tools (never run autonomously)

Methods

new

rust
fn new() -> Self

Create a new autonomy config

level

rust
fn level(mut self, level: AutonomyLevel) -> Self

Set autonomy level

Parameters:

NameType
levelAutonomyLevel

no_approval

rust
fn no_approval(mut self) -> Self

Disable approval requirement

max_actions

rust
fn max_actions(mut self, max: usize) -> Self

Set max actions

Parameters:

NameType
maxusize

allow_tool

rust
fn allow_tool(mut self, tool: impl Into<String>) -> Self

Add allowed tool

Parameters:

NameType
toolimpl Into&lt;String&gt;

block_tool

rust
fn block_tool(mut self, tool: impl Into<String>) -> Self

Add blocked tool

Parameters:

NameType
toolimpl Into&lt;String&gt;

full_auto

rust
fn full_auto(mut self) -> Self

Set to full auto mode

Source

View on GitHub

praisonai/src/config.rs at line 798


Related Documentation