589 points · by tosh · 3mo ago · 181 comments
We originally started with building a CLI tool so our LLMs could more easily interact with our platform. I cannot recommend enough the value of having an internal CLI. It’s both fun to build and extremely useful for agents.
We paired this with skills initially, but found that the way folks built skills was often too prescriptive and limited to the authors own specific function in the company. A 2k line long skill suffers from the same gaps as we do, if an agent is just following a laundry list it’s less likely to reason about the request it’s doing.
So we instead asked ourselves: what if we just _let_ the agent reason about the work to be done and only provided the tools + guardrails to gather context and perform accounting work?
Turns out frontier models are GOOD at what they do, they outperformed our highly prescriptive skills and were able to work across a larger set of tasks even without instruction on how to do those tasks.
It’s a breath of fresh air from the decade of CRUD I’ve worked on, harness engineering is very neat.
1. Guardrails - deterministic, social intelligence, team alignment & accountability 2. Learn by doing 3. make it stupid easy for the agent to research and access data 4. DRY
Research supports this. Try picking up some ideas from my harness: https://github.com/rush86999/atom
Multi-agent / org (core/agent_radio/, core/fleet_orchestration/): - Stanford Virtual Biotech — bioRxiv 2026.02.23.707551, Zou Lab — https://www.biorxiv.org/content/10.64898/2026.02.23.707551v1 — 37k agents, CSO->scientists->reviewer->re-delegation, Merck external validation of B7-H3 design. Basis for VFS + hierarchy. - Debate or Vote (Choi & Li) — NeurIPS 2025 — https://arxiv.org/abs/2508.17536 — MAD gains = majority vote, not debate (why we didn't build debate)
Sandbox / eval: - DABstep — arXiv:2506.23719 — https://arxiv.org/abs/2506.23719 — 450 real Adyen tasks, justifies code-interpreter + sandbox isolation - Spotlighting — Microsoft Research — https://arxiv.org/abs/2403.14720 — provenance delimiters cut injection ASR 50% -> <2%
Governance: - OWASP Top 10 for Agentic Applications 2026 — globally peer-reviewed by 100+ experts, Dec 2025 — https://genai.owasp.org/resource/owasp-top-10-for-agentic-ap... — HIGH. Atom maps 1:1 (Goal Hijack -> match-confidence + oracle, Tool Misuse -> sandbox whitelist/caps, Privilege Abuse -> capability bindings, Memory Poisoning -> verified-episode graduation, etc.) docs/marketing/RESEARCH_NOTES.md:130 - NIST AI Agent Standards Initiative — Feb 17 2026, NIST CAISI — https://www.nist.gov/artificial-intelligence/ai-agent-standa... + RFI summary May 2026 https://www.nist.gov/publications/summary-analysis-responses... — HIGH (US gov standard). Defines the 4 enterprise minimums Atom implements: identification, authorization, access delegation, logging. - Stanford Virtual Biotech — bioRxiv 2026.02.23.707551 — https://www.biorxiv.org/content/10.64898/2026.02.23.707551v1 — CSO -> 4 divisions -> 8 scientists -> reviewer -> re-delegation, no debate, no SFT — HIGH (Stanford Zou lab + Merck external validation). Basis for Atom's fleet hierarchy core/agent_radio/ and why maturity is routing not security. - Spotlighting — Microsoft Research — https://arxiv.org/abs/2403.14720 — HIGH — provenance delimiters <provenance type="tool_output"> cut indirect injection ASR 50% -> <2%, used in core/provenance.py:10 - IntentGuard — https://arxiv.org/abs/2512.00966 + OpenReview — HIGH — intent tracing ASR 100% -> 8.5% on AgentDojo/Mind2Web, basis for sandbox egress allowlist + core/sandbox_tripwire.py
As you say frontier models are very good at figuring things out. Being too prescriptive is counterproductive, it over-constrains the model, it fills the context with conflicting instructions, it reduces the ability of the agent to respond to novel situations (and really in real life most situations are going to be novel). If you want to follow a process or a checklist you probably shouldn't use an LLM, or you should use it for some sub-tasks in the checklist/process but something more deterministic to work through the list.
I like to externalize tasks as markdown files with checklists, they are still planned by agents but I can pass the plan around to judge agents and fix some errors before implementing.
I also have the coding agents comment on each closed checklist item, so the same file becomes a log of what happened. This goes to the implementation judge. I can also switch agents anytime, or resume a task days later no problem.
I am avoiding internally provided tools for todo lists and planning because they do not leave the same artifact trail which makes judging with separate agents easy.
Hm, but thats ok right? I mean some people like to code with LLM and other people like to let LLM code for them.. no?
Not always. In my case LLM goes to grafana mcp, pulls metrics/traces/cpu profiles. Figures out what is slow and proposes a solution.
I do this constantly.
As the upstream comment points you, you don't need to specify. Sota models are that good. And by being overprescriptive you can accidentally shut off branches that they would've taken, downgrading the quality of their work.
Definitely not true and like everyone else is saying, shows how people still underestimate these models.
I have been working on a simple vite + react app lately and commonly ask Gemini/Antigravity to just "improve speeds", "x is running slow, check it out" and have no complaints.
The models can build micro-benchmarks with a level of rigor that few could muster for a new feature.
I agree that if the issue is architectural they will struggle to understand that scope.
Meanwhile they are very good at implementating an explicit algorithm that you feed it to them.
Generally you want to include objective/repeatable outputs as citations.
An example would be, if you invest in an awesome layered test rig (browser test, fuzz/property tests, very well reviewed unit/integration tests, etc.) then you should be able to add features by just reading the acceptance test and scanning unit tests.
How do you handle security?
Both “internally” against e.g. data loss, I’m assuming via limiting the harness, and “externally”, i.e. stuff like prompt injection risks?
If you want outlier performance from these models it is best to just ask in the most high level prompt of the most minimal harness and let them loose.
Any extra information reduces their performance.
However, as often as these models output masterpieces, they also produce utter garbage so our current choice is for them to have a process to follow that can be reviewed by humans and LLMs.
The native app I'm building on top, which I hope people who are less technical (or not technical at all) will use, is even more interesting because it's not just supposed to shell out to the CLI for everything and needs its own state.
It seems to be art at the moment.
Could you give an example of an accounting guardrail you created?
Usually I’m returning TSV as a default format and I add a `help-all` subcommand to list every available command at once when needed. Another thing that helps is adding just-in-time context-sensitive hints, such as: user has just run a list query with at least one result. Add a one-liner to the response explaining the command shape for getting the detail view of the first response.
In terms of skill files, I like to have my CLI generate them dynamically at runtime by walking their own current command tree and then feeding that through a text template.
Examples from a public project: https://github.com/radiusmethod/gitlab-kiosk/blob/main/skill...
As for an example: if our agent wants to book a journal entry to cash accounts for a client, it MUST provide receipt and directly link the transaction from the clients bank feed, if it attempts to do so without the requisite information we deny the tool call and ask the agent to escalate back to the client for proof of receipt.
Often times this results in the agent not doing the work and instead sending a message back to the client asking for proof of the transaction.
For humans on our platform there may be valid situations where we’d want to allow this, but for our agent this is a hard guardrail thus why it’s not just standard validation for any JE posting on our platform.
if our agent wants to book a journal entry to cash accounts for a client, it MUST provide receipt and directly link the transaction from the clients bank feed
And that rule is encoded in the CLI?I find your description intriguing but I'd like to see it to make sure I understand it.
I will however say that this page alone does a pretty good job of illustrating what an agent harness might look like: https://docs.agno.com/tools/overview
* System prompt
* Tool calls
* Model definition
Everything else (guards / etc) can just exist as code abstractions between the agent layer and the tool layer.
In my own opinion, a CLI tool is going to be much more familiar ground for engineers -- I wouldn't expect the 200+ engineers at my company to all have read and understood the paradigms of the MCP protocol but I _would_ expect all of us to have a strong understanding of CLI tools and what a good/bad tool is.
When I say handoff, I mean:
* handoff from a terminal CLI to webui (on a phone)?
* handoff from one team member, to another?
* handoff from one communication modality, like writing a prompt in a TUI, to email?
* handoff from one model to another, or one provider (openrouter)( to another (llama.cpp)
Does such a thing exist?I used to think that a PR would be a good place to centralize all this. Who cares what IDE, or developer, or location. But, now I feel like an agent harness might contain that better.
Why do I want handoff? I keep losing context of where my harness is running. Sometimes I am inside an isolated VM. Sometimes I'm on my laptop, sometimes I'm on my home machine with the big GPU for local models. If I could spin up a harness that could identify itself inside my tailscale network, then I could probably have a single web UI which allows me to keep all that context straight.
I'm tempted to experiment with Pi to configure such a thing. But, perhaps there are patterns out there already with a harness I have not considered.
Not sure how others do it, but opencode stores sessions in a sqlite db and you can extract them and share them as needed.
https://opencode.ai/docs/cli/#export
Pro-tip: Building your own extremely minimal harness takes about 15m and is both fun and enlightening. Agents are unsurprisingly quite good at it, but ask them to walk you through it step by step.
Let's assume handoff happens when one "agent" finishes its work on one task, i.e. "submit a PR".
At that point you want to exit the agent/clear context etc (any context the next actor needs should be in the handoff artifact).
And the orchestrator calls the next agent with the artifact.
Claude can do this with subagents. If you want to get more serious, I'd look at "durable workflows" and check out what the pi people have to say: https://earendil-works.github.io/absurd/ https://earendil-works.github.io/absurd/patterns/pi-ai-agent...
you should also look at dbos https://www.dbos.dev/
And then do a search for these terms on HN and get some idea of their shortcomings vs a 'real' orchestration tool like Airflow or Dagster
Open core is here: https://github.com/gofixpoint/amika
We're designing it like a meta-harness actually. The goal is to let users put any agent(s) (Claude, Codex, Pi, OpenCode) on a sandbox on any computer (local, K8S pod, cloud VPS, sandbox provider, etc.)
And then be able to interact with the agent(s) from anywhere: terminal, phone, web, or load them into the Codex, Claude, or Cursor apps
Yapped a bit about this "multi-surface" agents idea last week: https://x.com/dbmikus/status/2087993214246469639
Under the hood, I think of part of our tech like mashing together Tailscale and Firecracker.
The edges are rough right now, but if you kick the tires, I appreciate any feedback! (my email is dylan@amika.dev)
And besides what we're building, there are cool projects like Amp Orbs, YC's QM harness, etc.
1. Means running somewhere that is not your computer. I just use my personal server for this.
2. Should probably be done in the repo. Just add the context file in a dedicated sub directory. At this point I think these kinds of artefacts are part of the SE process, and fair to check into source control.
3. Can be done by letting the TUI write/draft emails via MCP.
4. Can be done with something like OpenCode or PiCode, which just allows you to switch in their TUI interface. Beware though, context has to be re-ingested, so it costs a couple of cents.
But again, in the end context is just a file. By switching models, you are paying the price of not having any context cached, but for manual steps that's usually not super relevant. Just be careful about adding these kinds of things to automated workflows, as a cost like 25c can add up when agents run amok.
On a longer term, I think "assistant" style harnesses might help here, like vellum.ai. I no longer use that, but I asked it to create an ACP proxy through iroh (basically tailscale but on the application layer), and it managed to control claude on another device of mine. A friend did similar stuff with tailscale.
I have started writing a hobby harness with a web interface where I would like to support this "ACP proxy" mode natively, and also to make the models aware of different devices in some way and "move" work between them.
I've been playing with pi and the remote webui extension. I don't love it; it has a lot of chrome that obscures what I want to do. I just want a simple way to review the progress so far, and keep tweaking with minimal setup. Then, jump back into tmux when I'm back on my computer.
Thanks for your comments.
And Pi is the best harness because of the amazing extension system. You can build extensions that turn Pi into a stock trader, software factory, anything. I tried switching to another harness but none have extension functionality as good as Pi.
Even if there is a new harness or agent project, I tell Pi to dig into the codebase and then make me an extension that brings that functionality into Pi. I did it with Prime Intellect’s and Deepseek’s harnesses and those are built on Pi.
Don't get ahead of yourself. Harnesses are not exactly rocket science and will be a commodity.
The real value providers here are the hardware, then the LLM as a distant second, and at a much larger distance the harness.
Labs are now post-training models with Harness so that Harness now gets absorbed into the weights.
Would you rather hire an engineer that can adopt to your org's prefered tooling, or hire an engineer that can only perform well with their own favorite tools? It's the same thing.
Solar goes all the way up => power is commodity.
Some hyperscaler goes bankrupt => hardware is commodity.
Models get real good => output is a commodity, no profitable problems to solve anymore.
Open source models get good => models are commodity.
I really though this comment was a satire ...
I’m thinking of how in cyberpunk, people are replacing their cybernetic enhancements all the time. You could alternatively bioengineer your own body towards the desired outcomes, but that’s more constrained by the trajectory your body has already taken, whereas the promise of cybernetic parts is that they are more independently replaceable. (Probably an illusion in practice, but I’m talking about the fictional ideal.)
As another analogy, monolithic software tends to quickly become hard to change significantly, whereas a plugin architecture tends to be more flexible and modular, and people can share and combine their various plugins.
They probably used an LLM to come up with this bizarre metaphor.
- They can already reason better than many humans and are still improving all the time
- Harnesses are improving all the time
- We're already exploring things like long term memory, long term goals, and other things that humans have which LLMs traditionally lack
- An AI agent can read and reason about every piece of AI research ever published, including looking for insights that humans may have missed. A team of humans could never do this even if they dedicated their whole lives to it.
- They can design and execute experiments on a mass scale to determine what does and doesn't work
- Large AI labs have more than sufficient resources and motivation to throw at the problem, and are in fact doing this.
And no I came up with the metaphor all on my own, send me the chat of you getting the LLM to come up with it. Why not argue based on merit instead of strawman and ad hominem attacks?
You can never tell if the goomba opinion of the forum will agree we have reached AGI (seen that happen on a few threads lately) or will readily call that a ludicrous proposition.
This entire forum is infested with shameless hype chasers and biological linkedin bots.
The words "once that settles" are doing historic levels of work here.
No human on earth has a clear idea whether model technology will settle tomorrow or 100 years from now.
There's every reason to expect architectural breakthroughs will keep being discovered and causing nuclear blasts of forward progress.
I do agree that harnesses are going to extend AI capabilities a lot in the next year, but after reading Pi's page I don't see anything that makes it particularly special in terms of functionality, other than being more provider-agnostic.
Many of my harnesses eventually turn into customized UIs around the chat interface.
The harness facilitates the work animal doing work for you.
Not climbing harnesses to keep you safe.
1. You can use the '/new-tool' and tell what kind of tool you want (including whether it should be task-scoped, workspace-scoped, or global), the model builds it, the harness runs validation and other tests until the tool is ready
2. The model decides that in such and such task, it would be helpful to have a tool like this, it can build a task-scoped tool.
In either scenario, the tool catalog is rebuilt, and the new tool is instantly available in the next turn.
What I can see is a world where we end up with a Chromium-shaped harness, a fully featured standard implementation everyone builds against, because doing every single thing yourself would be crazy.
The antithesis to Pi, if you will.
Also, having only a "standard implementation" makes no sense for a harness. A standard implementation would need to try to be as good as possible at all things. But you'd often want a specialised harness designed for exactly your use case.
Some standard solution will emerge, which will be amplified by models being trained specifically to work with it.
The thing that makes everyone build against Chromium is because web browsers are very hard and it is well supported by dev tools like Electron and Playwright.
Harnesses are so easy compared to a web browser, I'm curious what in this world you see that would make building your own harness seem crazy, because I don't see it.
looking at the website. i can't really tell if they have benchmarks and measuremnts on how all that improves capablities over just using regular agent withtout all that
I primarily like how it manages sessions, and how agents can easily reference other sessions.
Don't understand what people see in them.
So if you do want to use it, use the Codex sub. Once you install it, run Pi and /login and you’ll get login with ChatGPT. From there, Pi can tweak it’s settings if you ask. Check out their extensions (or ask Pi) and that will take you most of the way there.
What hiccups were you having?
Not out of the box, but you can add agent sdk. I'm not sure how great the results will be though.
also i think its hard to build general harnesses if they were trained on specific harness architecture.
There’s evidence of harnesses making a smaller, weaker model perform better than SOTA and some benchmarks ban harnesses because it becomes too easy.
harness = chassis, model = engine, fuel = tokens, agent = car
I’m curious what y’all might think and whether that analogy carries more explanatory power
I guess you could say that tokens = hay, and agent = horse and cart, from there? Not sure how useful the hay part is but you could observe from the second that there are many different things you could harness a horse to (also a plough, or a coach, or just a saddle) based on your goal.
Saying the harness is like a car's chassis doesn't work as well for me because the chassis isn't as configurable as a climbing harness for as little work.
Getting deeper into the climbing analogy you can even swap out the harnesses themselves for wildly different climbs. Like using Claude Code with a bunch of agents for medical software (climbing K2 where that extra padding comes in super handy) and pi.dev with a local model for a respectable web project (sport route where you'll be back in a few hours and it's safe to be a little more exposed).
I'm glad your article made HN, and thank you for pi!
I've been building coding harnesses since 2021 and believed in their value for a long time. Harnesses matter a lot, look at what claude did for Anthropic.
Well kind of, I wouldn't be surprised to see that some things marketed as agents are actually good old deterministic software.
It truly proves like there's a handful of thought leaders on Twitter that everybody follows blindly and start to copy down to the lexicon and parrot everywhere else.
The principles by which LLMs functions haven't changed in the last four years. It is still a next-word-predictor, a statistical parrot, if you will. But if you don't understand the mechanisms behind it, you cannot be faulted for thinking this is something much more. Most of it, is pretty devious marketing.
As an example, no LLM model does anything that can be considered "reasoning", or "intelligent" in the traditional sense, but these words are used extensively. "High reasoning model" is a pricing tier. The article in question has an anthropomorphized term in every single sentence. I'll pick a paragraph at random and highlight the cases. If both parties understand the mechanisms, these words are fine, and we do that all that time. The issue is when one sides is mislead to believe that these systems can be relied on in a way that they should not be, leading to people getting hurt.
> > The *translation layer* is what *allows* a *harness* to *work* with different AI models. In some cases, a *harness may decide* to *use* different models within the same *agentic loop*, because different AI *models may excel* at different tasks. The *translation layer* is also a crucial aspect of *harnesses* because they *deliver control* to the end user. It means that someone can take their *AI harness* and use it with a model from Anthropic, or OpenAI, or explore one of the open weight AI models that often deliver great value-for-money (measured by cost-per-task).
The underlying logic isn't remotely as mysterious or mystic as the language makes it seem. A different paragraph:
> > Tools are a set of *capabilities*, written in code, that the model can *“call”*. The *harness describes* the tools and also *provides* the software that is the tool itself. Examples of these tools might include a web search tool, a tool that *allows the model* to write and execute software code, or a tool that *allows the model* to *compose* an email. Critically, the *harness usually* does not *dictate* when and how the *AI* model should *use* the tool. Instead, it simply *makes* the tools available, *describes* them clearly, and *allows* the *AI* model itself to *decide* when and how *it should use* them
the harness is what you take with you on a trip/task
whatever you take with you is not free (system prompt, tools, skills …)
some models are really good even if you bring almost no skills, tools or system prompt
the harness is the complement to the model
the better the model the more minimal the harness can be
harnesses like pi [0] and smol [1]are on the more minimal end of things
Anyway I've been building my own harness on top of pi- www.freepi.ai (it's based on Pi, but now I have an OpenAI compatible endpoint so I'm thinking of it more like free-api :-) ). Basically ad+training supported so I can offer completely free inference. It's really important to me that we don't have harnesses and intelligence trapped in a "have and have not" world. If we don't all have access to intelligence we will end up in a dark place.
Thats again where the visual of Steven Hawking and the wheelchair really stand out in my mind. It's not enough to have the raw intelligence, we need a really good wheelchair too.
What others are describing is the BA skill of capturing good _business_ requirements ie. specifying outcomes and qualities rather than methods.
We should be clear about who’s being the BA, the architect and the developer here. At one end, a human vibe coder is acting as BA and the AI as architect, designer and engineer. At the other end, the human is a senior dev closely instructing a AI junior dev. All approaches are valid depending on what you need and the AI tools available (eg. SOTA model vs small self-hosted open-weights model).
Right now every tool is shipping some kind of AI agent, but I can’t help but feel that AI agents in large companies will eventually be some kind of internal app with internal MCPs, CLIs, APIs etc.
There might be different harnesses for different use cases that different people have different levels of access to.
This would make sense for the platform/infrastructure engineers who can build a modular harness that a person or team can get access to.
You could have agents team members use locally that have memory enabled for personalization and then agents that anyone can use to ask questions about company context, which wouldn’t personalize things.
It's a build and test system, which makes it easy to test and run all supported platform and config options, and app/lib features and regressions. Like a CI. Basically a CI is the best harness.
The agent is just a feedback loop between the model and the harness. Since the feedback loop must be fast, a real CI is too costly, and only serves as end verification. So a good harness enables fast tests for features per arch. With proper cleanup and parallelization.
It’s private and I charge for it and I am always looking at the list of skills and agents people create (I’ve never copied anyone else’s stuff) and so far I like mine better.
It makes me roughly 20x faster at building systems and Claude itself closes gaps in my knowledge like networking and cloud devops.
If you’re serious about producing quality code, it’s my belief that a strong harness is the best way.
There are articles about it from Fowler and Redhat.
the real problem: is there a general framework to allow llm with limited context size to approach problems, just like a capable newbie integrated into a chaotic code base? how does it work?
I think it's an epistemic problem, and my fork of pi: pie (github.com/wangii/pie)
I've been working with different setups in parallel for months (openclaw, pi, cursor per project harnesses and codex) and, even though using the same model most of the time, I can clearly see how the behave in very different ways deppending on the setup.
As a language model, language is our way to communicate and build everything around the models, which makes my younger self (who loved writing stories) very very happy :)
- Codex / VSCode Github Copilot Plugin
- ChatGPT Web application
- Code I wrote to send/process REST API requests to an Antropic / OpenAI API endpoint
FYI, the pic is Royal Robbins (https://en.wikipedia.org/wiki/Royal_Robbins), who was kind of a hero to some of my climbing buddies back in the 70's.
My approach is a llama-server wrapped in a locked down systemd service and a goose client/harness with a from-scratch apparmor profile behind a filtered network interface.
Getting this running was alot of work and is certainly not perfect but with qwen3.8 and expected price hikes, i think it might be worth it.
https://github.com/aaif-goose/goose
Full disclosure: I work at the LF, but not the AAIF.