DEDUPED Hot AI repos, turned into use cases Get the Monday 5

How to test an embedded agent offline with no API key with Pi Rust

Run the minimal example against the deterministic faux provider to test agent behavior.

Short answer: Run git clone https://github.com/bigfish1913/pi-rust.git; then Change into the folder with cd pi-rust; run cargo run -p minimal. All steps.

Who it is forA Rust developer building an agent into their own app who needs repeatable tests that never touch the network.

The problemAgent tests that call a live model are slow, flaky, and cost money to run.

The outcomeThe agent loop runs end to end with fixed output and no credentials, so tests pass the same way on every run.

What you need first

  • Rust 1.78 or later, for installing from crates.io
  • An ANTHROPIC_API_KEY or OPENAI_API_KEY, or a ~/.rpi/agent/models.json file, for live model calls
  • Git, to clone the repository for the offline examples

Steps

  1. Run git clone https://github.com/bigfish1913/pi-rust.git
  2. Change into the folder with cd pi-rust
  3. Run cargo run -p minimal
  4. Read examples/minimal/src/main.rs and reuse its AgentBuilder setup in your own test

Prompt for your agent

Clone bigfish1913/pi-rust, run `cargo run -p minimal`, and then write a Rust test in <target-crate> that builds an agent with the faux provider and asserts the reply. Expected output: the minimal example prints 2 messages after run and the assistant reply. Verify that the test passes with no network access and no API key set.

Caveat. The faux provider covers the paths your test scripts, so live provider behavior still needs its own checks against the real HTTP providers behind the providers feature flag.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for bigfish1913/pi-rust and "Test an embedded agent offline with no API key"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer