A Visual Guide to Agent Harnesses (opens external site)
View full thread · View on Hacker News
To get push notifications on iPhone or iPad, add Hack and Chat to your Home Screen: tap Share → Add to Home Screen, then open the installed app and enable push in Settings.
View full thread · View on Hacker News
The harness choice can actually have a massive impact on the performance of the LLM. Not just the context burnt on the system prompt but the prompt and tools themselves can considerably change how much a task costs and the chance of success. Pi is basically never first for any individual model, but its usually top 3 because of how minimal it is.
Replies (6)
Replies (2)
I have made one extension called globalstats which iterates over all the sessions and costs up everything across various agents (with locals being negative price of the most common used cloud option, sort of money saved) and I have some skills about accessing dev servers and where to find the docker settings and up/down aliases so it can add things.
Replies (2)
It does provide hooks, so tool calls can be intercepted/gated/etc. The first thing I did with pi was have it write an extension that asks for permission for each Bash invocation. I've extended that with a simple Python script which auto-denies known-bad things (e.g. running find on /), auto-allows known-safe things (e.g. non-destructive text processing pipelines), and asks me for anything else.
Its tools can also be switched-out; e.g. I've replaced its read/write/edit tools with alternatives which invoke emacsclient. There's no reason you couldn't replace its tools with sandboxed alternatives, if you wanted.
Replies (1)
Replies (2)
- Emacs buffers remain up to date (rather than the on-disk content changing underneath it).
- I can use ordinary undo, etc. on changes made by pi.
- Various editor conveniences are automatically applied, e.g. auto-formatting of code; showing the contents of compressed files; etc.
- The LLM is given extra metadata, like warnings from linters/compilers/LSP/etc.
- The same tools work for buffers which aren't files (e.g. shells, Web browser, etc.)
Replies (2)
So it's pair programming with the machine in the best sense.
Though I don't understand how read/write works with emacsclient and pi. Care to share?
Continue this thread (1 replies) →
...and 20 features later I realized I just need to download omp.sh
Replies (1)
Replies (2)
Replies (2)
Replies (2)
Replies (2)
Replies (2)
Continue this thread (1 replies) →
Give me a top-level ~1000loc harness.py that just connects the major components together, letting me replace any of them as I see fit. No settings or configurability whatsoever, configuration just means asking the LLM to edit the harness.
Also, I think at this point, it's clear what a harness architecture should be. You should have four components, the UI (TUI, GUI, web, nothing for automated workflows like CI reviews) which runs on the users' actual machine, the "brain" (the LLM itself), the "hands" (the actual tools, running on the machine that the work happens on, which could be a remote server, and the "nerves" (the part which owns the actual loop, skills, transcript store and memory), preferably running on some persistent server that can be accessed through multiple machines.
Many harnesses conflate these to their detriment.
Replies (1)
I still hold the opinion that harness engineering is an important thing to try in the age of Ai - and that there is a lot to still unlock a this layer (which merges prompt, context, tool, workflows, and more from related * engineering)
Also OoenCode go is top, that can be used with pi too of course
I had an interesting circular journey when it comes to plugins. When I started, I went all-in on the everything-is-a-plugin mindset, so every aspect of Juggler is a plugin: the LLM loop strategies, every type of item in a context, their UIs, even helper UIs like file viewers, and loads more things are all extensions.
Everything works great, but over the last year building it, the models grew so capable that those custom plugins I thought I would write just aren't needed. The models just don't need extra tools for specific projects or tasks. I've created loads of great built-in extensions, but these could just as well have been part of the app.
However, plugins were the right choice, if for the wrong reason: harnesses are surprisingly huge beasts, and enforcing plugin APIs ("seams" as I'm sure claude would call them) is a great barrier to prevent slop-creep across the app as these new features are added. So.. I'm very happy with the architecture I built, but not for the reason I expected!