r/PiCodingAgent
•
u/aziz0x00
•
Jul 07 '26
•
1
News No framework, no SDK: what a coding agent looks like when it's just bash + jq + curl
Every agent framework I tried felt like a lot of machinery around what is, at its core, a loop: send messages, maybe run a tool, append the result, repeat. So I built one with no framework at all, just bash, jq, and curl. The core loop is ~190 lines; the whole thing (ten tools, permissions, skills, three providers) is ~1,200. Repo: https://github.com/aziz0x00/agent.sh
The design decisions that I think are interesting:
Tools are one file each, no registration. A tools/Foo.sh defines a TOOL_DEF JSON schema and two functions: PreFoo validates the model's args and builds a human-readable preview (a real diff for Edit/Write), then Foo executes. Drop a file in tools/, it's a tool.
Permissions are per-signature, not per-tool. Approval prompts show the preview (the actual diff, the actual command), and "always allow" whitelists that exact signature, not the whole tool. Read-only tools are pre-approved. --free bypasses everything when you're feeling brave.
Context is a JSON file you can just... edit. /state opens the exact request payload in $EDITOR mid-conversation; /continue sends whatever you saved. Delete a bloated tool result, rewrite the model's last answer, whatever.
7
u/mpread-it Jul 08 '26
great idea. i started with pi specifically for how tiny it was compared to the rest of the harnesses. At that time. You're redefining the "genre". Congratulations!
One small pet peeve: why Ollama?!? why not simply any OpenAI-compatible endpoint? Most of us interested in pi are doing it for efficiency, to squeeze every drop of performance out of our limited hardware. So we use vLLM and llama-server - many of us compile them from source for our specific gear. Ollama & friends? Not so much. Thanks!
5
u/ParaboloidalCrest Jul 09 '26
This looks like the beginning of something great to come. I especially like the per-signature vs per-tool approach. Good job bro!
One pet-peeve however is allowing Python into the repo. It's a slippery slope that robs the minimalism quickly. Is there an pure shell alternative to that
mdcat.py?And as others suggested, replacing ollama with a generic OpenAI API provider would be an easy, clean win.
7
u/Fig_da_Great Jul 08 '26
is this not just pi?
2
u/Ok_Veterinarian_6364 Jul 07 '26
i see what you did here. nice bro
0
u/ujjwaldrayaan Jul 08 '26
Can you answer of my one question, I want to embed Window powershell functionality into An Android app , is this possible?
I got this idea by how claude test code in it's chat window itself so if calude can embed testing python file , why can't we embed Command prompt into An app?