agent-shadow 0.1.0

Agent shadowing — monitor, replay, and analyze agent behavior
Documentation
  • Coverage
  • 11.43%
    4 out of 35 items documented0 out of 20 items with examples
  • Size
  • Source code size: 10.18 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 485.84 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • SuperInstance

agent-shadow-rs

Rust port of agent-shadow — agent behavior monitoring and replay.

Features

  • Action recording: timestamped actions with duration and success tracking
  • Trace analysis: success rate, action type breakdown, filtering
  • Shadow mode: silently monitor multiple agents without interference
  • Behavior comparison: compare two agents' traces quantitatively

Usage

use agent_shadow::{Shadow, Action};

let mut shadow = Shadow::new();

// Record actions
shadow.record("agent-a", Action::new(0.0, "search").with_duration(0.5).with_success(true));
shadow.record("agent-a", Action::new(1.0, "fetch").with_duration(0.3).with_success(true));
shadow.record("agent-b", Action::new(0.0, "search").with_duration(0.8).with_success(false));

// Analyze
let trace = shadow.get_trace("agent-a").unwrap();
println!("Success rate: {:.1}%", trace.success_rate() * 100.0);
println!("Actions: {:?}", trace.action_types());

// Compare agents
let cmp = shadow.compare("agent-a", "agent-b").unwrap();
println!("Success rate diff: {:.3}", cmp.success_diff);

License

MIT