Unofficial Hacker News companion — get notified on comment replies, and more.

A Visual Guide to Agent Harnesses (opens external site)

451 points by mariuz 2 days ago | newsletter.maartengrootendorst.com | 80 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (11)

  1. Pi’s strengths is making changes beyond MCP. You can have the harness behave exactly like you’d prefer. It’s incredibly satisfying to think “I wish it would do x!” And then have it do x.
    Replies (2)
    1. I am using PI. Do you have an inspiring example?
      Replies (2)
      1. I recently noticed that claude code tui has a button at the top of the screen to go to the last user message instead of having to scroll back through all the output to find it. I just prompted pi that I wanted this feature and it wrote an extension for me and I only had to `/reload`. Not super complicated, but maybe inspiring all the same.
      2. I have a lot of qol little things like a /quiet that only output chat output and hides all tool use/thinking so it is easier to go back and read what was outputted. Made a little pinboard so I can have it put whatever on screen and it doesn’t scroll away. Made a sub-process that runs a fast agent to search through my context files and generate instructions and inject them into the system prompt but only if I asked it to do something - this alone solved almost all my “first attempt at certain mcp or commands get an error” issues.
    2. People like to say this about pi but it’s only really extensible in a handful of ways. If you want to go beyond that then either you’re completely rewriting core parts of it or you’re stuck with what they’re doing.
      Replies (2)
      1. What is an example of what you can't do in pi
        Replies (2)
        1. Low level TUI behavior changes (important for accessibility). E.g. disabling status line refreshes to reduce screen reader output spam when the harness is working, replace the menu component for all menus with one that uses a hardware cursor instead of Unicode and colors for highlighting, replace the rendering system with one that is character based and not line based (so that screen readers don't re-read the whole line on every single keystroke in the prompt field).
        2. The other commenter has some examples but just off the top of my head when I was working with I had stuff like the find and grep tools being hardcoded to shell out to their own binary with no way to really intercept them, also a bunch of APIs are just kind of limited (for example you can get the first message in a session but not the last for whatever reason). You can't override the default commands, a bunch of stuff just does things exactly how pi does it and is not flexible at all (e.g. there is a MIME sniffer but it needs a file on disk, not bytes). Basically if you push it hard you will constantly run into issues where the interfaces that are provided are clearly not being tested–the core design is quite good but it's not being extended and I am sure all their feedback is just people slopping so I doubt they really listen to it much.
          Replies (1)
          1. This was my experience with pi.dev.

            Minimalist branding with anti-minimalist philosophy where you first had to accept permanent damage from the default tools you have to work around.

            The pi durable thing does not try to fix that either, instead suggesting you should override the hard wired tools (I didn't get into the details how exactly that worked), which is an inherently illogical concept that only makes sense if you cannot disable the tools. If you had to opt into tools, then you wouldn't even need to override them, you could just swap them out with a version provided by an extension.

      2. Yeah, I wish we had a Shadcn-style composable harness (Pi is configurable but not composable).

        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)
        1. Yes, I think they just made it too early. Their "pi durable" thing which is new kind of fixes it but they haven't cleaned up pi to use it yet :(