> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Autonomy Config • Rust AI Agent SDK

> AutonomyConfig: Configuration for agent autonomy

# AutonomyConfig

> Defined in the [**config**](../modules/config) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Configuration for agent autonomy

## Fields

| Name               | Type                  | Description                              |
| ------------------ | --------------------- | ---------------------------------------- |
| `level`            | `AutonomyLevel`       | Autonomy level                           |
| `require_approval` | `bool`                | Require approval for destructive actions |
| `max_actions`      | `Option&lt;usize&gt;` | Maximum autonomous actions before pause  |
| `allowed_tools`    | `Vec&lt;String&gt;`   | Allowed tools for autonomous execution   |
| `blocked_tools`    | `Vec&lt;String&gt;`   | Blocked tools (never run autonomously)   |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new() -> Self
```

Create a new autonomy config

### `level`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn level(mut self, level: AutonomyLevel) -> Self
```

Set autonomy level

**Parameters:**

| Name    | Type            |
| ------- | --------------- |
| `level` | `AutonomyLevel` |

### `no_approval`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn no_approval(mut self) -> Self
```

Disable approval requirement

### `max_actions`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn max_actions(mut self, max: usize) -> Self
```

Set max actions

**Parameters:**

| Name  | Type    |
| ----- | ------- |
| `max` | `usize` |

### `allow_tool`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn allow_tool(mut self, tool: impl Into<String>) -> Self
```

Add allowed tool

**Parameters:**

| Name   | Type                      |
| ------ | ------------------------- |
| `tool` | `impl Into&lt;String&gt;` |

### `block_tool`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn block_tool(mut self, tool: impl Into<String>) -> Self
```

Add blocked tool

**Parameters:**

| Name   | Type                      |
| ------ | ------------------------- |
| `tool` | `impl Into&lt;String&gt;` |

### `full_auto`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn full_auto(mut self) -> Self
```

Set to full auto mode

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/config.rs#L798">
  `praisonai/src/config.rs` at line 798
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Configuration" icon="gear" href="/docs/rust/configuration" />

  <Card title="Rust Installation" icon="download" href="/docs/rust/installation" />

  <Card title="Rust Auto Generation" icon="wand-magic-sparkles" href="/docs/rust/auto-generation" />

  <Card title="Rust Autonomy" icon="robot" href="/docs/rust/autonomy" />
</CardGroup>
