Every AI agent is just patches to one JSON loop, argues engineer
Harness Engineering 101: The LLM is the brain, the harness is the body
A 16-chapter book by Isuru Wijesiri builds an AI agent from first principles, starting from the fact that an LLM API is stateless: each turn you resend the whole conversation as a JSON array. The "harness" is the program that builds and protects that array, and every pattern the field calls an agent is a patch to that loop, each added because something concrete broke. A ~300-line Python toy agent grows along the way.
Everything the field calls "agents" is a set of patches to that one loop, and each patch exists because something concrete broke.
- voodooEntity
When i wrote my own harness, i didn't rely on what other agents do, but rather sat down and considered how i can solve the issues that i have when using other agents. And tbh, for alot of problems there are rather "simple" fixes - each comes with a cost tho. For me it was accepting to run more inference than "standard" agents but in return solving alot of issues those agents have. And to me having a full autonomous agent that i can task and just come back hours later to a solution is much more worth than just an agent that i need to "prompt jokey" the whole day.
I think its important that people don't just look at whats implemented rn, but rather just try out new things , not just "adjust" the existing ones. Thats how we got better progress, not by trying to build the 1000s variant of context compression but rather reconsider how can context be build to not have this issue (simple example).
- scosman
Harness optimization is essential. Doesn’t matter how smart the model is if the tools you give it are ineffective, or the task is under defined. It needs invent the solution from first principles every time.
We did a harness optimization on Jev. Raw it was no where near as good as deekseek, but optimized it was significantly better and a tiny fraction of the cost. https://kiln.tech/blog/auto_optimizing_jev_with_autoresearch
- libraryofbabel
Instead of reading AI-slop explanations full of creaky metaphors, I'd advise you to just build your own basic coding harness from scratch. You will learn so much:
1) This old but still excellent blog post by Thorsten Ball is a good place to start (old in LLM years... written 18 months ago!): https://ampcode.com/notes/how-to-build-an-agent . It is written by a human, and gets across the core message really well. If you don't enjoy reading Go then just use an LLM to translate the samples into Python code or whatever.
2) Instead of relying on an api key like in the blog post in 1), you might want to use a local model that can do tool calls like Qwen 27B.
3) Use a frontier LLM for self-study and to help you write the harness boilerplace if you want, but ask it to force you to write the interesting bits by hand (e.g. the main loop structure, the tool call functions). Yes, coding by hand is still useful as an educational mechanism to force you to internalize some tricky concept. Be disciplined and don't slip into letting the LLM write the core logic for you.
4) Amaze your friends and colleagues with your newfound understanding of how agents actually work under the hood
5) Go even deeper and get into Inference engineering, LLM architecture internals, etc.
6) Profit. Perhaps? (Or at least enjoy the learning journey.)
- CharlieDigital
Better analogy:
The LLM is the oven, the harness is the kitchen. You prep all your ingredients and put it into the oven (flour, water, salt, sugar). It transforms those inputs into a finished product (cake, loaf of bread).
- PetriCasserole
LLM is to harness as Krang is to his android body.