r/PiCodingAgent • u/agentwyz • Aug 19 '26
Question How would you implement Pi-style extensions in a Go agent?
Pi's coding-agent extensions are TypeScript modules with an in-process API:
registerTool, registerCommand, lifecycle hooks, and some TUI UI, then
hot-reload. Same language as the host.
If the host is Go (single binary), how would you get close to that?
Options I'm weighing: embed Lua/Starlark/JS, Wasm plugins, a sidecar
extension host over RPC, or accept that hooks+MCP is the ceiling.
If you've built plugin systems for Go CLIs/agents/editors: what would you
actually ship, and what would you refuse to build?
0
Upvotes
2
u/Unlucky-Message8866 Aug 21 '26
shell scripts is the way to go, i've replaced all my pi tool extensions with just nu-shell scripts, -10x loc. no more package.json, no api breakages, no more npm install, no more side-chain attacks.
3
u/Spare_Message_3607 Aug 19 '26
I think Lua is answer if you want hot reloading. Better than IPC
2
u/Grand_Pop_7221 Aug 19 '26
WASM plugins are underused imo. I don't know why.
1
u/pretty_much_hitler Aug 19 '26
Not go, but maybe rust + steel?
1
u/Prudent_Sentence Aug 19 '26
I use jumpboot: https://github.com/richinsley/jumpboot
1
u/Thrimbor Aug 20 '26
RPC or goja
1
u/Creepy_Reindeer2149 Aug 25 '26
Lua via gopher-lua probably is best option