Rust-native, library-first coding-agent runtime and terminal CLI inspired by Pi, with composable LLM providers, tools, sessions, and plugin ABI

★ 308⑂ 58👁 1⑃ 395● 49▤ 150
RustMITCreated 2026-08-15rpi.bigfisharc.cn/
Download: rpi v0.31.0rpi-0.31.0 ↓0.31.02026-11-27
+5
Daily
308
stars
58
forks
1
watchers
395
prs
49
issues
150
releases

README

rpi — a Rust-native coding-agent runtime

English | 简体中文


  












rpi is a library-first coding-agent runtime written in Rust, plus a terminal
agent built on top of it. Eleven composable crates span provider adapters, a
durable crash-resumable agent loop, a reusable runtime, a terminal UI, and a
stable plugin ABI — so the same code works as an embedded SDK or as a ready-to-run
rpi command.

rpi began as a Rust reimplementation of the Pi TypeScript SDK
by Mario Zechner. It now includes its own Rust-native plugin ABI and execution
infrastructure. See Acknowledgements and NOTICE
for upstream attribution.

Quick start · Website · Docs · Extension catalog and submissions · rpi-extension

 See it in action

!rpi TUI reading a project README and displaying the run and test commands

Terminal. Run rpi in a project directory. The screenshot shows an isolated sample session and a read tool call. User guide

!rpi-web with a project sidebar, tool activity and a Markdown reply

Web. Install with rpi install rpi-web, then run rpi --webserver in your project directory and open the address it prints. Web setup guide

!RPI Work desktop preview with a conversation and a Git diff side by side

Desktop. RPI Work’s GPUI preview shows project sessions, conversation and Git diffs in a native window. RPI Work


Terminal and SDK recordings

!rpi terminal demo — opening the built-in help without a model request

Open the terminal agent and explore /help, with no real API key or model request. Recording script: demo/tui.tape.

!rpi SDK demo — an agent loop and a real tool round-trip, offline with the faux provider

The agent loop and a real write tool round-trip, recorded with no API key and no network — the same path the tests take. Source of truth is demo/sdk.tape; regenerate with task demo.



 Three ways to use it

| You want | Depend on | Start at |
| -------- | --------- | -------- |
| A working terminal coding agent | nothing | cargo install rpi-cli |
| Your own agent inside your process | rpi-agent (+ rpi-ai, rpi-tools) | examples/minimal |
| A tool/provider that extends every session | rpi-plugin-sdk | examples/plugin-stub |

The three share one implementation. Build your tools once, debug them inside an
embedded agent, and ship the same code as a cdylib plugin that the global rpi
loads. See docs/agent/project-structure.md for the recommended
project layout.

 Install

Prebuilt binary (no Rust toolchain needed):

bash
curl -fsSL https://raw.githubusercontent.com/bigfish1913/pi-rust/main/scripts/install.sh | sh


Verifies the published SHA-256 checksum and installs to /usr/local/bin or
~/.local/bin. Preview first with --dry-run.

On Windows (x64), run in PowerShell 5.1 or later:

powershell
& ([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing https://raw.githubusercontent.com/bigfish1913/pi-rust/main/scripts/install.ps1).Content))


Verifies the published SHA-256 checksum and installs to
$env:LOCALAPPDATA\Programs\rpi. Follow the printed instruction

Top issues

Discussions

Latest release

rpi v0.31.0 v0.31.0 2026-11-27
What's Changed
 perf: reduce history restore allocations and interrupted recovery hydration by @bigfish1913 in https://github.com/bigfish1913/pi-rust/pull/394
 docs: add extension contribution link to README by @bigfish1913 in https://github.com/bigfish1913/pi-rust/pull/395
 fix(rpc): correlate and settle every native execution lease by @bigfish1913 in https://github.com/bigfish1913/pi-rust/pull/396
 feat(extensions): follow the catalog move to pi-rust/rpi-extension by @bigfish1913 in https://github.com/bigfish1913/pi-rust/pull/398
 feat(tui): support explicit hiding in entry renderers by @big

Snapshot: 2026-11-28T10:06:57Z · Data license Apache-2.0 · JSON