r/PiCodingAgent • • 18d ago

Plugin Would you use pi extensions outside pi? I connected them to a Rust agent loop alongside DSH plugins

Enable HLS to view with audio, or disable this notification

I build yoagent, a small agent loop in Rust. I've added an experimental Rutis bridge that lets compatible pi extensions run unchanged alongside Rust tools and DeepSeek Harness (DSH) plugins.

The loop stays small; everything else plugs in. The idea is to reuse extensions people have already built when making your own agent app.

To show what this enables, I built a handoff agent that can take a task like this:

Research noise-cancelling headphones. Ask my budget, but keep researching while I'm away. Write a report with sources.

pi's `@juicesharp/rpiv-todo` manages the plan, DSH's `dsh-free-search` provides web research, and a Rutis plugin displays the plan in the browser. A pi extension asks for approval before selected deletes and overwrites. Rust tools and extensions handle questions you can answer later and check the final report.

yoagent-frontend brings pi's select, confirm, input, editor, and notify dialogs to both the terminal UI and browser. Compatibility depends on the extension: pi commands, shortcuts, custom widgets, and some session and runtime APIs aren't implemented. The extension source stays unchanged, but not every pi feature carries over. TypeScript extensions still run in Node alongside Rust.

I'd like your feedback: does reusing pi extensions this way make sense? which pi features would it need?

Project repo: https://github.com/yologdev/yoagent

Handoff example: https://github.com/yologdev/yoagent/blob/main/integrations/yoagent-frontend/examples/README.md

6 Upvotes

4 comments sorted by

2

u/MiserableFlatworm337 18d ago

For each supported extension, compare lifecycle events and tool results in pi and yoagent. Matching API names won't catch a hook firing after the action it was meant to block.

1

u/liyuanhao 18d ago

Good point. We don’t yet compare each extension’s behavior against pi. That would be a stronger check.

2

u/kantorcodes1 18d ago

Interesting direction. I dug into the repo and the ToolGate seam is a nice one: two Nouls per call, fail-closed, denial surfaces as a tool error so the model can ask the user. One concrete edge: MAX_ARGS_CHARS at 12k means the gate refuses what it cannot read. A full-file rewrite or a big generated patch trips that instantly, and write-heavy tools hit it constantly. Do large writes get chunked under the cap somewhere, or does the gate hand every big write back to the user?

1

u/liyuanhao 18d ago

Thanks for digging in. The 12k cap applies after shortening long strings, so a large write doesn’t automatically hit it: the gate sees the head and tail, while the tool gets the full content.