Skip to content
Back

Agent runPro

One card that follows a coding agent through a task: steps stream in with the live one shimmering, the agent stops on a proposed change for you to approve or send back with a note, then the result with Open pull request.

oxyn add agent-run

Add rate limiting to the public API

Claude Sonnet 5.5
  1. Read src/api/router.rs3s
  2. Searched for “middleware”2s
  3. Planned a token bucket per API key9s
  4. Waiting for your review
    Needs you
src/api/limit.rsReview
+pub struct Bucket { tokens: f64, last: Instant }
+impl Bucket {
+ pub fn take(&mut self, now: Instant) -> bool {
// …
- Ok(next.run(req).await)
+ if !bucket.take(now) { return Err(too_many(retry)) }
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • One card that follows a coding agent through a task: the model and task in the header, steps streaming in as a dense trail with the live one shimmering, a stop on a proposed change (file + diff) to Approve & write or Request changes with a note, then the result line with Open pull request.

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

Agent run is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add agent-run

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Review

Stops on a diff for review.

Add rate limiting to the public API

Claude Sonnet 5.5
  1. Read src/api/router.rs3s
  2. Searched for “middleware”2s
  3. Planned a token bucket per API key9s
  4. Waiting for your review
    Needs you
src/api/limit.rsReview
+pub struct Bucket { tokens: f64, last: Instant }
+impl Bucket {
+ pub fn take(&mut self, now: Instant) -> bool {
// …
- Ok(next.run(req).await)
+ if !bucket.take(now) { return Err(too_many(retry)) }
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Running

Steps streaming.

Add rate limiting to the public API

Claude Sonnet 5.5
  1. Read src/api/router.rs3s
  2. Searched for “middleware”2s
  3. Planned a token bucket per API key9s
  4. Implement the limiterWriting limit.rs6s
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Done

Result with Open pull request.

Add rate limiting to the public API

Claude Sonnet 5.5
  1. Read src/api/router.rs3s
  2. Searched for “middleware”2s
  3. Planned a token bucket per API key9s
  4. Implemented the limiter21s
  5. Ran 14 tests8s
14 tests passed · 2 files changed
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

AgentRun

PropTypeDefaultDescription
taskrequiredString—Task (title).
modelrequiredString—Model name.
stepsrequiredVec<TrailStep>—Steps so far.
changeOption<(String, Vec<String>)>Default::default()Proposed change `(file, diff lines)` waiting for review.
resultOption<String>Default::default()Result line once done ("12 tests passed").
nowrequiredClockMs—Shared clock.
on_approveEventHandler<()>—Approve the change.
on_rejectEventHandler<String>—Send it back with a note.
on_prEventHandler<()>—Open a pull request.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabRequest changes, Approve & write, Open pull request

Accessibility

  • The change is a labelled region; Request changes opens a note field.
From the spec
  • The change is a labelled region.

Motion & interaction

Timing
  • Reduced motion: no entrance rise, no shimmer (static muted text), rings and bars jump to their value.

Responsive behaviour

  • Diff lines scroll inside their frame.
Edge cases (spec)
  • Diff scrolls in its frame.

Notes for AI

  • Import AgentRun from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: AgentRunEl in oxyn_gpui.
  • Props to set first: task, model, steps, now.
  • It reads a clock (now) for live timers; pass one clock for the whole page rather than one per component.
  • 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