{
 "schema_version": 1,
 "generated": "2026-10-26",
 "id": "bigfish1913-pi-rust--test-agent-tools-offline-in-rust",
 "repo": "bigfish1913/pi-rust",
 "repo_url": "https://github.com/bigfish1913/pi-rust",
 "repo_slug": "bigfish1913-pi-rust",
 "title": "Test an embedded agent offline with no API key",
 "page_title": "How to test an embedded agent offline with no API key with Pi Rust",
 "summary": "Run the minimal example against the deterministic faux provider to test agent behavior.",
 "who": "A Rust developer building an agent into their own app who needs repeatable tests that never touch the network.",
 "problem": "Agent tests that call a live model are slow, flaky, and cost money to run.",
 "outcome": "The agent loop runs end to end with fixed output and no credentials, so tests pass the same way on every run.",
 "steps": [
  "Run `git clone https://github.com/bigfish1913/pi-rust.git`",
  "Change into the folder with `cd pi-rust`",
  "Run `cargo run -p minimal`",
  "Read examples/minimal/src/main.rs and reuse its AgentBuilder setup in your own test"
 ],
 "agent_prompt": "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.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "45 minutes",
 "basis": "readme",
 "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.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "rust",
 "requirements": [
  "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/bigfish1913-pi-rust/test-agent-tools-offline-in-rust/",
 "md": "https://dedupedai.com/use-cases/bigfish1913-pi-rust/test-agent-tools-offline-in-rust/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/bigfish1913-pi-rust--test-agent-tools-offline-in-rust.json",
 "api_version": "v1"
}
