Dicklesworthstone/pi_agent_rust
High-performance AI coding agent CLI written in Rust with zero unsafe code
What it solves
pi_agent_rust is a native AI coding agent CLI designed to replace slow, resource-intensive, or unreliable terminal-based AI assistants. It provides a high-performance, single-binary experience with strong security controls for tool execution, reducing the startup overhead and memory footprint associated with managed runtimes like Node.js or Electron.
How it works
Written in Rust, the project is a port of the original Pi Agent. It utilizes two purpose-built libraries: asupersync for structured concurrency and async runtime management, and rich_rust for high-quality terminal UI formatting. The agent supports streaming responses and includes 35 built-in tools. It manages sessions using a SQLite session index and a segmented log for efficient reopening of large histories.
Who it’s for
Developers who want a fast, lightweight AI coding assistant in their terminal that can interact with their codebase, manage long-running sessions, and execute tools securely.
Highlights
- Native Performance: A single-binary design that minimizes cold-start time and memory usage.
- Capability-Gated Security: A two-stage execution guard that blocks dangerous shell patterns (e.g., recursive deletes) before they are spawned.
- Extensive Tooling: 35 built-in tools for coding tasks, with a capability-based hostcall system.
- Broad Provider Support: Built-in support for local providers like Ollama, llama.cpp, and Mistral.rs, as well as OpenAI-compatible servers.
- Structured Concurrency: Uses
asupersyncto ensure predictable resource cleanup and prevent orphaned futures.
Related
- Project
- Project
- Project
- Project
- Project