

Join the discussion
Write your take first — we'll ask for email only when you're ready to publish.
- Hacker News
- if you are looking for a customizable agent harness that provides everything except a tui (cli, acp, embeddable python package) i built and use this for a handful of projects where i needed a vendor-agnostic replacement for claude agent sdk: https://github.com/zackham/aloopby zackham
- this inspired me to build something similar.
i like the idea but i wanted slightly different constraints:
- one file
- zero dependencies (other than node)
- <1k loc
- ascii only
- suckless configuration
- works with ollama models
- more readble sourcecode
- pretty markdown output
- toggle-able read-only mode
https://willhanlen.com/~~/outbox/26/5/ai.js/?code
took me only a few hours. amazing times we live in!
by migrevdolseg - I'd love to learn how to build something like this, but unfortunately the code is unreadable.
If author could write a heavily commented version that would be amazing.
by flog - by nahimn
- I built full agentic-loop from scratch with full MCP support and session save and resume capabilities just this week. The intent was to learn by building full system from scratch, and share the learnings with others.
Working demo: https://asciinema.org/a/983581
Code: https://github.com/freakynit/agentic-loop
Tutorial: https://building-an-agent.pagey.site/
by freakynit - Kudos. I set on this exact journey a couple of days back and Pi is what I started reading for inspiration as well. I really can't stand the text boxes and the animations of the mainstream harnesses.by tecoholic
- I love it. I think I'm going to have fun with this and possibly learn a bit, too. I'm pondering a container based dev environment at the moment and might throw it in with busybox and see how far I get :)by hkt
- I like the small-surface-area approach. The question I’d use to evaluate this is how well the harness records/replays tool calls and failure modes, since that is where debugging agent behavior usually gets messy.by Amber-chen
- Interested in something like this if the code can be more readable, it would be interesting to see it in languages like lua etc. too in future.
- your 500 LOC requirement has made this thing completely and unnecessarily inscrutable and unreadable.
Pass.
by petcat - by esafak
- Does it work in just-bash?
https://github.com/vercel-labs/just-bash/blob/main/packages/...
by cachius - I love this. This is the grown-up brother of my one-liner bash+python at
https://github.com/kkovacs/kkrc/blob/ecff1f65d5ccfa24d5f6695...
:)
by kkovacs - Could you post the initial 6KB version? I'd love to have a version that I can actually read and understand. I don't care if it's 2K LOC.by mjuarez
- heh... i'm afraid i didn't commit it -- as it was in the original pi-autoresearch yolo'ing phase.by nahimn
- > Could you post the initial 6KB version? I'd love to have a version that I can actually read and understand. I don't care if it's 2K LOC.
I don't think that even with APL you could get an average of three characters per line of code to get a 6 Kb file in 2 K LOC.
- Really like the looks of it, but minifying the code to achieve the “400 lines” marketing gimmick is a huge turn-off.
It’s also a security nightmare, and ensures it remains 100% vibe coded. Would rather have a readable source with an honest line count.
by ricardobeat - I'm not even sure why it stopped at 500 line limit. If it's just a shell script then why not make it one line?by petcat
- I think it's fine that it's minified, code-golf style, but yes I agree that this would be much more convincing and useful with an unminified source.by sudb
- Agreed. It would be one thing if it was a regular bash project that got minified via a script or something, since at least you could tell what it's doing.
This is just spaghetti. Maybe it's spaghetti that runs, but code of this quality does not engender confidence.
by StableAlkyne