r/LocalLLaMA • u/chemist_slime • Oct 18 '26
Resources Google Open Sources Harness2 for Self Improving AI Agents
Google just released Harness2 as open source. It turns any AI harness into a system that improves itself over time.
A harness is everything around the model. System prompt, tools, memory, skills, and subagents. Normally a person designs it once and the agent uses that fixed setup for every new task.
With Harness2 the agent itself refines the harness for each task. It proposes changes, runs a few candidate versions, and picks a better one by comparing how they perform. No correct answers or graders are needed. The model weights stay the same.
What it learns on one task carries over to the next. After finishing a task it saves the improved harness and useful lessons so future edits start smarter instead of from scratch.
Google tested it with Gemini 3.5 Flash and GLM-5 on legal, office, and professional work benchmarks. Even one round of edits beat the original harnesses. More rounds pushed scores higher.
369
u/CoolConfusion434 Oct 18 '26
To paraphrase Mr Krabs: I got a bad feeling in the pit of me context.
All that "self-refinement" has to go somewhere, and that will be right into context. I'm sure it won't be an issue to the 1M context of cloud guys but us locals might be squeezed a little.
Other than that, glad to see another open-source harness, especially from giants like Google.
32
u/NineThreeTilNow Oct 19 '26
All that "self-refinement" has to go somewhere, and that will be right into context.
It runs parallel agents for this purpose. So really the self refinement comes from examining the tasks, seeing where the harness fell short, and then improving on the harness.
Did it need a new tool call? A better explanation of the tool call? Etc.
That will mildly bloat context but harnesses do this already. It's trying to find how it can improve the harness.
Will it increase total context? Probably, but not substantially over the existing harness.
110
u/FaceDeer Oct 19 '26
It'd be changing the context, but not necessarily growing the context. Indeed, I expect part of its mandate would be to trim redundant or unnecessary stuff from it.
37
36
u/typical-predditor Oct 19 '26
I still don't trust LLMs to understand what is redundant or unnecessary. Or even what is, ahem, load bearing and necessary.
27
u/_madar_ Oct 19 '26
You're exactly right to challenge me on that!
5
u/TimeTravellingToad Oct 20 '26
Ah, I see the issue now! Let me rewrite the entire module from scratch for you.
16
1
u/FaceDeer Oct 19 '26
Then there's no need to use this tool if you don't want to. I'm just pointing out that it's not necessarily only adding to context as it "learns."
1
u/ExpressTiger6226 Oct 23 '26
You hit on a massive bottleneck. Recursive self-refinement frameworks like Harness2 spend an incredible amount of context overhead just figuring out what is redundant or load-bearing within a page or system state.
If you leave that trimming logic to an expensive LLM cycle, you are burning tokens to save tokens, and you constantly risk context drift. We’ve found that handling this deterministically at the parser layer stripping raw DOM/HTML trees down into a 1:1 interaction graph before the model ever sees it cuts context bloat by 70-90% out of the box. Moving the pruning logic from the model's context back to a local, zero-LLM infrastructure layer is the only way these recursive agents scale without breaking the bank.
8
u/tossit97531 Oct 19 '26
I don't understand how this is any different than any other harness when you give an agent access to source, and I don't know why you wouldn't do that. I bolted on a whole persistent-session web UI on top of a harness core and ditched the stock CLI interface. I don't know how far I've strayed from upstream because I don't care, it's far more useful than upstream will ever be now (especially since the project kind of died).
6
u/PathIntelligent7082 Oct 19 '26
It isn’t an agent harness like Hermes, OpenCode, or Codex. It’s a tool that automatically improves a harness while the model weights stay fixed.
6
0
5
u/catinterpreter Oct 19 '26
It doesn't take much to stash the odd sentence on an SSD that encapsulates some key, formative insight. Very few words can have an immense impact.
3
2
u/TheEverydayMortal Oct 23 '26
Do you have a process set up so your context gets trimmed from time to time? I have mine set up so that context that is no longer current gets put into, like, archives. And then I have a cap on my context.
1
u/CoolConfusion434 Oct 23 '26
I do! 😀 But that's for my own self-made harness.
In my case, I "collapse" things like raw tool responses as they're (mostly) redundant to what the model already processed and summarized. This collapsing (optionally) happens only on the next user turn so the model sees full tool output and CoT in context during their turn.
Most other harnesses keep everything in context (CoT, tool responses) and compact only when it's x percentage full (ie: 80%).
Other than Pi, with its default basic tooling, every other harness I've tried chunks off a significant part of your context space with a mile-long system prompt and full-text description of every included tool. You might not need a "turkey-sandwich-maker-2000" tool but there it is, along with its gloriously poetic full description. All of that takes context space away so you start your project already loaded.
3
u/philmarcracken Oct 19 '26
if its useful in that sense, couldn't we go down in model quality to gain back context, and end up at the same or better results?
1
0
u/MindCrusader Oct 19 '26
Given their poor implementation of Google harnesses versus Claude Code or Codex, I have no high hope
72
u/acoolglassofwater Oct 18 '26
Could someone with high LLM expertise (not just trust-me-bro) explain the significance of this? I get the general idea, but the comment section is always highly opinionated on self-improving agents. Is this release just a nothing-burger or does it represent something interesting and significant?
72
u/itsmebenji69 Oct 19 '26 edited Oct 19 '26
I’d say it’s mid interesting
The harness can limit the agent in tasks. So perpetually modifying the harness to make it better suited to a task is useful, it removes that ceiling (if harness was limiting the task, it won’t anymore after a few rounds of improvement).
The obvious problem is that better suited to task A may degrade performance in task B. Basically over fitting.
Simple example: task A is to compute x+y and task B is to compute x times y.
Harness version one just gives you x and y, and the llm has to do the calculation. After a few rounds of improvement on task A, the harness only gives the model x+y, and the llm just reads that result. But now it doesn’t know x and y. So it will be great at adding them, perfect even, it will be right every time. Because it will know the accurate result directly. For task A alone, this is a great harness, it ensures that the model will never be wrong about the result of x+y or hallucinate or whatever.
But now on task b, if you want to know x*y, say that’s 2 times 3, the harness will only show the model 5 (2+3, x+y), so it will miserably fail at giving you the multiplication result. It simply won’t be able to know what x and y were, so it won’t know what to do with the result of the A optimized harness. It will just see 5, and from that it can’t infer what x and y are, or infer what x times y is.
And vice versa if you start optimizing on task b
18
u/Big-Farmer-2192 Oct 19 '26
I have a question. If the model is so overfit. Wouldn't it be way cheaper to just have a software that can do basically the same thing?
11
u/itsmebenji69 Oct 19 '26
Yes at some point if the harness is doing ALL the work and the model is useless, then yes absolutely.
Although it was a very simplified example here, in practice the task will be more complex
4
u/No_Afternoon_4260 llama.cpp Oct 19 '26
That can be one of the goals of a harness, automate in a cheap and replicable way everything that can be automated in a programmable matter and keep the llm to discover new task and do those that needs let's call it "semantic work"
3
u/art_dragon Oct 19 '26
But overall it sounds like it increases the flexibility and capability of the LLM + Harness, just that it needs more time to adjust to each task?
2
u/itsmebenji69 Oct 19 '26
It does remove the ceiling that the harness itself can introduce. But reducing the ceiling for a task can raise it for another. So mixed opinion. Probably useful, but has to be properly adjusted and use anti overfit measures (like validation testing)
2
u/active2fa Oct 20 '26
What about turning self learning into a skill of sorts or just a skill for task a. Ie highly optimized for repetitive tasks?
3
u/itsmebenji69 Oct 20 '26
Yes it could probably do this. The tradeoff then would be growing context. Too many skills = accuracy of skill usage goes down. But you do have some good margin before that happens
1
u/Acceptable-Yard7076 Oct 20 '26
Wouldn't that be solved by separating configurations into separate sessions or agents under an orchestrator a bit like Hermes?
2
u/itsmebenji69 Oct 20 '26
Yes someone suggested a similar idea with making skills to use each harness tool in the right situation. That does come with the drawback of trusting the model to correctly identify the task and use the right config, though.
Which will work, but then the question becomes “after how many separate config does the model start getting confused”. Eg if you have 1000 tasks and their config, will the model be able to select the right one ?
5
u/FoxSideOfTheMoon Oct 19 '26
I can find no practical use for this FWIW
3
u/SnooPuppers7882 Oct 21 '26
Benefit is if you want to use a local model coding or a specific task within a larger stack... You basically get it wired up to do specific things it can be good at consistently without screwing up, and then hand off the other things it only gets right randomly to more reliable cloud models
2
u/the-username-is-here Oct 19 '26
Somewhere between trust-me-bro and high LLM expertise here.
I already have in my skills addendum instructing Fable to improve them if there're gotchas and shortfalls. It seems to be the same basic idea, but applied systematically.
Idea is sound, IMO, looks promising.
But devil in the details, as usual - LLM left to its own devices can 'optimize' harness to just report 'task completed' for any prompt.
1
u/Popular-Direction984 Oct 19 '26
Google used their compute to brute force the most addicting vibe coding shell possible which coincidentally works best with their private models.
3
13
Oct 19 '26
[removed] — view removed comment
7
u/visarga Oct 19 '26
so judge it on tasks it never saw.
I think measuring a harness on task level is insufficient, we make projects not tasks. A project spans across weeks and months, and covers many tasks. What matters in a project is keeping the code aligned to user intent, reducing friction and bugs. Solving one well formulated task does not show how it would do across such a large span of time. It's also harder to evaluate projects than tasks.
3
u/epicsquare Oct 19 '26
OptiQ code harness?
17
u/thrownawaymane Oct 19 '26
GitHub repo with 59 stars, no mentions on Google except for this post
hmmmmmm.jpg
3
1
24
u/Paradigmind Oct 19 '26
So if we use this on Hermes we get Inception?
4
u/NANI_RagePasPtit Oct 20 '26
Combine Hermes + Prime Agent + RSSI + Harness2 for self jerking automation
15
39
u/Holiday_Point_603 Oct 18 '26
Interesting that google uses models that are like half a year old to show off their new software lol
54
u/Spara-Extreme Oct 18 '26
Google is a massive company so the team that did this isn’t the team that’s working on Gemini 4
37
7
u/Holiday_Point_603 Oct 19 '26
I am well aware of that. But Gemini 3.5 Flash is not really a recent model and you would expect them to film demonstration videos not half a year prior to release.
1
u/Spara-Extreme Oct 19 '26
Why would you expect that? Its open source software and I doubt they care.
-6
u/Holiday_Point_603 Oct 19 '26
usually because software isnt release ready half a year prior to release
1
27
u/-p-e-w- Oct 19 '26
Research takes time to prepare for publication. These experiments were likely conducted many months ago.
6
5
u/SnooPuppers7882 Oct 21 '26
Been playing with this and it's promising...
Have a 6 multitask corpus to calibrate Qwen 3.8 flash next as a coding worker...you need to know what you can reliably expect it to be able to do, everytime, so a coordinator model with a capabilities lookup index knows exactly how to split up a task assignment between a local model and a cheap, more capable cloud model.
Baseline (10 repeat runs), QFN would fail all tasks 100% of the time except task 5 (20% pass rate), with individual steps within a task (wide array of coding taxonomy chained in different orders and degrees of difficulty) solved around 50-60%.
After 3 loops under the methodology in Google's paper (Harness² is a LOOP orchestration, NOT an actual harness), Task 1 got 10%, task 3 10%, task 4 20%, task 5 100%, an average total steps increased to the 65 to 72% solve range.
Currently in runs of a modified methodology:
For one arm, QFN goes through claude code as the tester, sol 6.1 max reviews as a coach, opus 5.5 high reviews the coach recommendations to check bias gaps before auto-implementation of changes to the harness configuration. Arm 2 does the same except Opus is the coach and sol is the reviewer...tests are clones of the original t1 through t6 tests but with altered variables, files, and sequencing to maintain difficulty but not bias improvements to one benchmark.
Going through 10 runs each with both arms in parallel, then amalgamating the best changes that yielded the best scores, then the final trained setup run 10 times on the original test again.
Should take 2 days roughly for the results, I'll report back with detailed findings.
2
u/Pennidren Oct 23 '26
It has been 2 days. Results?
1
u/SnooPuppers7882 Oct 26 '26
Still in iterations...found judges to be useless, better to just run parallel training with a opus 5.5 coach and sol 6.1 coach on a single test task, break them into subtasks based on coding taxonomy, keep the lessons from each that improve pass rate for a subtask that doesn't regress others, carry them over into the next test task, same rules. So far on the 6 task corpus base uncoached scored 31/90 pass (34%) vs coached at 43/90 pass (48%).
Currently testing rearranging the sequence of subtask chains to see if the harness gates and rules maintain the improvement, but it's gonna take another day to verify.
7
6
u/TemporaryInk Oct 19 '26
That’s great and all, but is anyone going to point out the prolific use of Comic Sans in the graphic? 😂
2
u/uncle_leon Oct 19 '26
Oh, hell no! Were they trolling? lol
2
u/active2fa Oct 20 '26
I don't think this is google artifact. Unless the product manager, legal, marketing were all drunk
11
5
u/David23G1 Oct 19 '26
What the different from other harness e.g herems,openclaw,pi
7
Oct 19 '26
[removed] — view removed comment
4
u/Nothing_from_void Oct 19 '26
it does not mention improving performance over named harnesses. "self improvement" basically already exists in most commercial harnesses, and is the specific reason for hermes being created as an agent harness. openclaw and hermes have written their own bug reports for a while now, which is where it gets dangerous IMO but this is the 3rd open source implementation of an existing concept, from a company that kills its open source projects all the time
3
u/Iory1998 llama.cpp Oct 19 '26
I think what they meant is "Really". What's the real difference behind the marketing jargon? I think that what they meant.
4
u/look Oct 18 '26
From a cursory look, it reminds me of Prime Agent.
1
u/Eresbonitaguey Oct 19 '26
I think the use of REPL was the real interesting part of that project and the self-improvement wasn’t very novel since popular harnesses like Hermes already had a version of it.
7
2
u/partialoffwithrespec Oct 19 '26
This is a good thing. Hot swappable open source harness for testing agent capabilities of new models. Good on them for releasing
3
1
u/ecompanda Oct 20 '26
If you want to try it without keys first, the repo ships a credential free demo (Python 3.12, uv). It ran in about 1.6 s on my Mac and its logged call counts match the documented cost formulas (4k executor rollouts and 3k improver sessions per task for budget k), so you can see what a paid run multiplies into before spending anything. One gotcha: the README's `cp .env.example .env` fails because the file is not in the repo yet. I wrote up the steps here: https://www.jahanzaib.ai/blog/google-harness2-setup-guide
1
u/layarajia Oct 21 '26 edited Oct 21 '26
Interesting that guardrails are one of the editable components. Since early 2025 I've been documenting a long-term human–AI research collaboration, and one pattern kept showing up: the AI was good at revising things inside the scope it was given (a checklist, a standard, a draft). What it didn't do on its own was change the scope itself, or question the method. Those moves came from the human.
So my question for Harness²: when the agent proposes editing its own guardrails, who signs off? Probe-and-compare can tell you a harness scores better. It can't tell you whether that's still the job you wanted done.
(I wrote it up as a case study, if anyone's curious: https://doi.org/10.5281/zenodo.23492060)
1
1
u/ieatdownvotes4food Oct 19 '26
this is more of a concept that applies to all harnesses. all are capable of self-improving towards a specific use case.
1
1
u/notAllBits Oct 19 '26
Harness describes an architecture pattern and amounts to many more purposes for security and compliance than represented here
1
u/Black_Umbreon Oct 19 '26
Those who know, could you tell me if I can effectively use this if I have Qwen 3.8 Flash Next IQ3_XXS with a 512k context window on the Strata engine? With a 5060 Ti 16 GB, 64 GB RAM, and Ryzen 9950 X3D, I get ~80 tokens per second output.
-4
u/bartsimpsonwin Oct 19 '26
Yeah, but it would be very slow. Like if you leave your pc running overnight you'll see results. but 3.8 flash next on iq3_xxs is a waste, that level of quantisation retards the model. Id just use a smaller model on like q6_k_m
1
u/DisastrousAd2612 Oct 19 '26
It's not, i've been using this exact one as a worker for claude and it's been awesome saving alot of tokens for claude
1
u/Mr_blue765 Oct 20 '26
This, I've been using 1 bit coder with strata and its pretty good, beats out anything other llm I can use on my 16gb 32gb ddr5 ram strictly from a coding perspective. worth it.
1
u/Zeeplankton Oct 19 '26
This seems interesting to me but, not incredibly so? I feel like we're converging on similar designs and it's not that complicated every agent is just running python at this point? Can someone explain otherwise?
There is argument for harnesses with different domains but that is sort of solved by mcp. But then the issue is rather taste making since testing that is the hard part.
1
u/ykvlev_a Oct 19 '26
The word "harness" here is doing a lot of work. Prompt, tools, memory, skills, subagents — that's the whole scaffold, and the claim is that the agent can edit all of it and keep what works.
The hard part isn't proposing edits, it's deciding which candidate is better. Models are notoriously bad at judging their own output on tasks where they lack the competence in the first place — that's the whole reason we use external checks. If the comparison is another LLM judging, you've just moved the error one level up and added confidence.
I'd love to see the ablation: same harness, same task, but the "comparison" replaced with a deterministic verifier. If the gains survive that, it's real. If they don't, it's self-consistency dressed up as improvement.
1
u/No-Report-8523 Oct 19 '26
Might be a dumb question but can Claude on the subscription be used with this harness or it's just the API?
1
u/Sensualities Oct 19 '26
Can't wait until my spark/s come in and I can experiment with this stuff!
hopefully this is not over engineered lol
1
1
u/Careless_Love_3213 Oct 19 '26
How do they ensure it stays safe and performance doesn’t just collapse?
0
u/himey72 Oct 18 '26
So Google’s version of OpenClaw / Hermes.
7
u/fifi_galaxy Oct 19 '26
Asked AI few times, but it is not Hermes (as in a harness). It does what Hermes do (self-improvement) for other harness via hooks. So more like plugin/module/framework.
4
u/himey72 Oct 19 '26
Exactly. I’m not saying they stole anyone’s code, but it feels very similar to what is already out there.
4
u/fifi_galaxy Oct 19 '26
Yep, the concept is out there, but the execution is different though. Like recipe and food. You have same basic recipe and 20 versions of pizza.
Overall, I think the idea is an interesting approach though. If they can decompose the system into its parts for people to try, then you can optimize each part to create better self-improvement system for any/specific harness. I guess this is where Google expect the world to do the free work for them. 😆
2
u/BusRevolutionary9893 Oct 19 '26
LoL, no.
8
u/himey72 Oct 19 '26
Care to tell me how it is substantially different than what Hermes is doing?
5
u/Robbbbbbbbb Oct 19 '26
I'm curious about that as well.
Harness² exposes eight editable components around the model: system prompt, guardrails, memory, tool guidance, subagents, skills, scripts, and plugins. They control context construction, the tool interface, delegation, and behavior inside the tool loop.
Feels very much like how Hermes handles skill refinement and associated tool calling.
1
u/HighSeasArchivist Oct 19 '26
I love seeing the big guys going so hard on local llm, even Chinese models. They know we don't have billions of VC dollars like Big AI, but combined we have a lot of buying power. Apple M5/M6, AMD Strix/Gorgon Halo, and Nvidia DGX/RTX Spark can't be ignored.
0
0
u/perelmanych Oct 19 '26 edited Oct 19 '26
While smart models will not benefit from it, dumber models will have to reason task to death. It will be so token inefficient, that you probably will be better off using bigger and slower model with normal harness. It may be good for repetitive tasks, but for that you can use skills that you can load and unload at any moment and call it a day. E.g. I needed a literature survey on academic topic. I asked QFN to make it and it worked for two hours because of timeouts and rate limits and other issues. After work was done I asked QFN to create a skill and now I have literature review ready in 15 minutes. So at best it will have very limited use at worst it is DOA.
0
-5
-3
0
142
Oct 18 '26
[removed] — view removed comment
15
u/Ylsid Oct 19 '26
But not for customers!
1
Oct 19 '26
[removed] — view removed comment
16
u/Ylsid Oct 19 '26
What customer wants to speak to a chatbot for support lol
6
-4
u/ThankGodImBipolar Oct 19 '26
I found ChatGPT was genuinely pretty helpful with answering my questions about how to use the free Codex credits that OpenAI is offering students (bit of a cheap example for obvious reasons, but)
11
2
u/Then-Indication7672 Oct 20 '26
i think it can potentially be good if the harness can optimize parameters and these parameters are project local
-7
u/DigiDecode_ Oct 19 '26
exactly and why release it as a new product, why not built it into antigravity their main agentic product.
3
1
50
Oct 19 '26
[removed] — view removed comment
7
-4
u/DigiDecode_ Oct 19 '26
open sourcing a research tool is always welcome, it is just that everyone is trying to jump on the RSI hype train
If they say this is an internal tool that Google uses to improve antigravity with no human in the loop, then that would be completely different story.3
-8
Oct 18 '26
[removed] — view removed comment
14
u/BusRevolutionary9893 Oct 19 '26
I think you need to REREADME. It says
This is not an officially supported Google product.
Google-affiliated research: Yes.
Officially supported Google product: No.
-1
•
u/WithoutReason1729 Oct 19 '26 edited Oct 22 '26
Your post is getting popular and we just featured it on our Discord! Come check it out!
You've also been given a special flair for your contribution. We appreciate your post!
Stylome classified this post's text as human-written. View analysis
I am a bot and this action was performed automatically.