Skip to content
Back

Autonomy levels

How much an agent may do on its own – three levels, and its real actions gliding between Runs on its own and Asks you first, with a lock for what always asks.

oxyn add autonomy-levels
MCP

Support agent

What the agent may do on its own

Low-risk work goes ahead; anything risky stops for you

Runs on its own2
  • Read the help center
  • Draft replies
Asks you first4
  • Update ticket fieldsRisky
  • Send repliesRisky
  • Remove attachmentsDestructive
  • Issue refundsDestructive
Dioxus
rsx! {
    AutonomyLevels {
        actions: Some(agent.actions()),
        default_level: 1,
        default_pinned: Some(vec!["refund".into()]),
        title: "Support agent".into(),
        on_level_change: move |l| settings.set_level(l),
        on_pinned_change: move |p| settings.set_locks(p),
    }
}

Rendered from Rust at build time · goes live when visible

When to use

  • How much an agent may do on its own: three levels, and the agent's real actions split between "Runs on its own" and "Asks you first", with a lock per action that always asks.

When not to use

  • An agent asks before it acts: use Approval Card instead.
  • Several open requests in one card: use Approval pager instead.
  • An agent's question in its own card above the composer: use Decision Card instead.

Installation

Autonomy levels is free and MIT. The oxyn CLI copies its code, and the components it needs, into src/oxyn/ of your Dioxus or GPUI project, so it is yours to change.

Terminal
cargo install --git https://github.com/ismailqureshi72/Oxyn oxyn-cli
oxyn init
oxyn add autonomy-levels
Rust
use crate::oxyn::{AutonomyLevels, STATUS_INDICATOR_CSS};

Rather depend on the crate? cargo add oxyn-dioxus oxyn-core --git https://github.com/ismailqureshi72/Oxyn, then use oxyn_dioxus::{AutonomyLevels, STATUS_INDICATOR_CSS};

Usage

Dioxus · rust
rsx! {
    AutonomyLevels {
        actions: Some(agent.actions()),
        default_level: 1,
        default_pinned: Some(vec!["refund".into()]),
        title: "Support agent".into(),
        on_level_change: move |l| settings.set_level(l),
        on_pinned_change: move |p| settings.set_locks(p),
    }
}

Examples

If risky

If risky – the two safe actions run on their own, the risky ones and the two locked destructive ones ask first.

Support agent

What the agent may do on its own

Low-risk work goes ahead; anything risky stops for you

Runs on its own2
  • Read the help center
  • Draft replies
Asks you first4
  • Update ticket fieldsRisky
  • Send repliesRisky
  • Remove attachmentsDestructive
  • Issue refundsDestructive
Code
rsx! {
    AutonomyLevels {
        actions: Some(agent.actions()),
        default_level: 1,
        default_pinned: Some(vec!["refund".into()]),
        title: "Support agent".into(),
        on_level_change: move |l| settings.set_level(l),
        on_pinned_change: move |p| settings.set_locks(p),
    }
}

Full auto

Full auto: everything runs except what you locked.

Support agent

What the agent may do on its own

It all goes ahead, apart from the locked actions

Runs on its own4
  • Read the help center
  • Draft replies
  • Update ticket fieldsRisky
  • Send repliesRisky
Asks you first2
  • Remove attachmentsDestructive
  • Issue refundsDestructive
Code
rsx! {
    AutonomyLevels {
        actions: Some(agent.actions()),
        default_level: 1,
        default_pinned: Some(vec!["refund".into()]),
        title: "Support agent".into(),
        on_level_change: move |l| settings.set_level(l),
        on_pinned_change: move |p| settings.set_locks(p),
    }
}

Always ask

Always ask: every action waits for you, and the first group says so.

Support agent

What the agent may do on its own

Every action waits for your yes

Runs on its own0
Every action waits for you
Asks you first6
  • Read the help center
  • Draft replies
  • Update ticket fieldsRisky
  • Send repliesRisky
  • Remove attachmentsDestructive
  • Issue refundsDestructive
Code
rsx! {
    AutonomyLevels {
        actions: Some(agent.actions()),
        default_level: 1,
        default_pinned: Some(vec!["refund".into()]),
        title: "Support agent".into(),
        on_level_change: move |l| settings.set_level(l),
        on_pinned_change: move |p| settings.set_locks(p),
    }
}

Locked

A lock set on a safe action: it always asks, whatever the level.

Support agent

What the agent may do on its own

Low-risk work goes ahead; anything risky stops for you

Runs on its own1
  • Draft replies
Asks you first5
  • Read the help center
  • Update ticket fieldsRisky
  • Send repliesRisky
  • Remove attachmentsDestructive
  • Issue refundsDestructive
Code
rsx! {
    AutonomyLevels {
        actions: Some(agent.actions()),
        default_level: 1,
        default_pinned: Some(vec!["refund".into()]),
        title: "Support agent".into(),
        on_level_change: move |l| settings.set_level(l),
        on_pinned_change: move |p| settings.set_locks(p),
    }
}

Pointed

A row pointed at: the row tints and its lock shows.

Support agent

What the agent may do on its own

Low-risk work goes ahead; anything risky stops for you

Runs on its own2
  • Read the help center
  • Draft replies
Asks you first4
  • Update ticket fieldsRisky
  • Send repliesRisky
  • Remove attachmentsDestructive
  • Issue refundsDestructive
Code
rsx! {
    AutonomyLevels {
        actions: Some(agent.actions()),
        default_level: 1,
        default_pinned: Some(vec!["refund".into()]),
        title: "Support agent".into(),
        on_level_change: move |l| settings.set_level(l),
        on_pinned_change: move |p| settings.set_locks(p),
    }
}

Details

Actions with a detail line under the name.

Support agent

What the agent may do on its own

Low-risk work goes ahead; anything risky stops for you

Runs on its own2
  • Read the help centerArticles, macros and past answers
  • Draft repliesSaved as drafts on the ticket
Asks you first4
  • Update ticket fieldsRiskyPriority, tags and the assignee
  • Send repliesRiskyReplies go straight to the customer
  • Remove attachmentsDestructiveFiles older than 90 days
  • Issue refundsDestructiveUp to the order's full amount
Code
rsx! {
    AutonomyLevels {
        actions: Some(agent.actions()),
        default_level: 1,
        default_pinned: Some(vec!["refund".into()]),
        title: "Support agent".into(),
        on_level_change: move |l| settings.set_level(l),
        on_pinned_change: move |p| settings.set_locks(p),
    }
}

Narrow

Under 340 px the detail lines are left out and the levels tighten.

Support agent

What the agent may do on its own

Low-risk work goes ahead; anything risky stops for you

Runs on its own2
  • Read the help centerArticles, macros and past answers
  • Draft repliesSaved as drafts on the ticket
Asks you first4
  • Update ticket fieldsRiskyPriority, tags and the assignee
  • Send repliesRiskyReplies go straight to the customer
  • Remove attachmentsDestructiveFiles older than 90 days
  • Issue refundsDestructiveUp to the order's full amount
Code
rsx! {
    AutonomyLevels {
        actions: Some(agent.actions()),
        default_level: 1,
        default_pinned: Some(vec!["refund".into()]),
        title: "Support agent".into(),
        on_level_change: move |l| settings.set_level(l),
        on_pinned_change: move |p| settings.set_locks(p),
    }
}

Classic

Classic style: the levels in one track inside a white card, each action its own card on a grey panel.

Support agent

What the agent may do on its own

Low-risk work goes ahead; anything risky stops for you

Runs on its own2
  • Read the help center
  • Draft replies
Asks you first4
  • Update ticket fieldsRisky
  • Send repliesRisky
  • Remove attachmentsDestructive
  • Issue refundsDestructive
Code
rsx! {
    AutonomyLevels {
        actions: Some(agent.actions()),
        default_level: 1,
        default_pinned: Some(vec!["refund".into()]),
        title: "Support agent".into(),
        on_level_change: move |l| settings.set_level(l),
        on_pinned_change: move |p| settings.set_locks(p),
    }
}

API reference

AutonomyLevels

PropTypeDefaultDescription
actionsOption<Vec<AutonomyAction>>Default::default()The agent's actions (the demo's when `None`).
levelOption<u8>Default::default()Controlled level (0 Always ask, 1 If risky, 2 Full auto).
default_levelu81Starting level when uncontrolled.
pinnedOption<Vec<String>>Default::default()Controlled locks (ids that always ask).
default_pinnedOption<Vec<String>>Default::default()Starting locks when uncontrolled (the demo's when `None` and `actions` is `None`).
titleString"Agent permissions"Heading, e.g. the agent's name.
subtitleString"What the agent may do on its own"Line under the heading.
pointStringDefault::default()An action shown pointed at (its row tinted, its lock revealed).
styleStringDefault::default()`clean`, `classic`, or empty to follow `data-cstyle`.
on_level_changeEventHandler<u8>—Another level was picked.
on_pinned_changeEventHandler<Vec<String>>—A lock was set or removed (the whole set).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
← → ↑ ↓Picks the previous or next level
TabFrom the levels to the locks of the actions
SpaceorEnterSets or removes the focused lock

Accessibility

  • The levels are a radio group named Autonomy, described by what the chosen level means.
  • Both groups are labelled sections; every lock is a toggle button with aria-pressed that names its action.
  • Each change is read out politely – the new level and the counts of actions that run alone or wait for you.

Responsive behaviour

  • 432 px up to its container.
  • Under 340 px the detail lines go and the levels get tighter; without hover the locks always show and rows grow taller.
Edge cases (spec)

Up to 432 px. Under 340 px the detail lines go and the levels tighten; without hover the locks always show and rows grow to 44 px.

Notes for AI

  • Import AutonomyLevels from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: AutonomyLevelsEl in oxyn_gpui.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI