AI Agent Harness Engineering: What VAKRA Revealed
See how configurable tools, step-by-step execution and answer controls improved an AI agent on VAKRA—without changing its underlying model.

Better AI Agents Without a Better Model: Lessons from VAKRA
An AI agent's performance depends on more than the model running it. The software that picks tools, sequences actions, and formats the result - the agent harness - can be the difference between a system that completes a real task and one that trips over an avoidable detail.
IBM Research tested this idea with CUGA, its open-source enterprise agent, on VAKRA, a benchmark for tool use and multi-step tasks. The model stayed the same: GPT-OSS-120B. What changed was the way the agent worked around it. CUGA's success rate on multihop tasks rose from 19% in an initial sample to 52.8% in the final results, and the updated agent outperformed a LangGraph ReAct reference using the same model across all four VAKRA capabilities.
That's a useful result, but it's not an argument that "configuration beats model" in general. What it does show is something you can act on: teams can often improve reliability by fixing how a model interacts with tools before paying for a different model - or rebuilding the whole system. This article walks through what the benchmark exposed, which harness changes mattered, what the numbers do (and don't) prove, and how to apply the lesson to enterprise automation.
Why an AI agent harness matters
An agent isn't just a language model with a prompt. It's a model inside a system that decides what context it gets, which tools it can call, how it handles tool results, and what it returns to a user or downstream application. That surrounding system is the harness.
This distinction matters when the model isn't strong enough to recover from weak system design. A frontier model might still infer the right tool from a messy catalog or notice that a result needs to be transformed before the next call. An open-weight model running on company infrastructure may be less forgiving. But even the strongest model can make predictable mistakes if the harness gives it ambiguous choices or lets it produce output that another step can't actually use.
The practical question isn't only, "Which model scores higher?" It's also, "Where in the workflow did the failure happen?" If the model picked the wrong API from hundreds of similar options, switching models might help - but reducing the candidate list might help more. If it called multiple dependent tools before it ever checked intermediate results, more reasoning ability won't fix the underlying execution pattern.
The model and the harness have different jobs
The model interprets instructions and chooses actions. The harness shapes those choices and enforces what happens next. In production, that can include:
- Filtering a large tool catalog before the model selects an operation.
- Deciding whether the agent can batch calls or must inspect each result.
- Validating and cleaning the final response before another system uses it.
- Adding policy checks and keeping enough evidence to audit what happened.
These are engineering decisions, not cosmetic prompt tweaks. They affect latency, error rates, operating cost, and whether the workflow runs without someone manually correcting broken output.
Why this is relevant to enterprise AI
Enterprises often choose open-weight models for straightforward reasons: deployment control, data residency, privacy requirements, predictable infrastructure costs, or the ability to run on-premises. The trade-off is that teams may have to do more work around the model to hit a reliability target.
CUGA's VAKRA evaluation is useful because it isolates one part of that problem. IBM Research compared CUGA with a LangGraph ReAct reference agent using GPT-OSS-120B, then improved CUGA's harness without changing the model. It isn't a controlled proof that harness work always beats model upgrades. But it's evidence that harness design can be a big part of the outcome - and that you can often fix those failures directly.
What VAKRA exposed about agent failures
VAKRA evaluates agents across four capabilities: business intelligence APIs, tool selection, multihop tasks, and multihop tasks involving many sources under a policy. That covers more than "can it answer." It also tests whether the agent can find the right operation, use outputs correctly, follow a sequence, and stay within constraints.
The initial CUGA run struggled most with tool selection and multihop tasks. In the sample described by IBM Research, it completed 12% of tool selection tasks and 19% of multihop tasks. The reference agent's corresponding figures were 50.5% and 25.1% in that initial comparison. The later final-results table reports the reference scores as 50.4% and 27.9% - those are from the reported final evaluation, not the same initial sample.
IBM Research's error analysis pointed to three recurring harness problems.
Large tool catalogs make selection a separate problem
If the model has to choose from hundreds of APIs, it may see tools with near-identical names and overlapping schemas. Just dumping the entire catalog into context doesn't guarantee better decisions. It increases the number of plausible choices and makes it easier to pick the wrong operation - or to "make it fit" with an argument that doesn't actually match the tool.
In practice, "Which tool should I use?" needs its own step. A retrieval or shortlisting mechanism can shrink the catalog to a smaller set of candidates before the model makes its choice. That won't fix every confusing API design, but it reduces the decision surface area.
Dependent steps need feedback between calls
CUGA's default code-first mode writes a short Python script that can call multiple tools in sequence. That can be efficient when calls are independent: the agent can plan and execute without pausing after each result.
It's a poor fit when one call determines the input to the next. In the VAKRA example, the task asks for the percentage of female university students in 2016 in the country where Harvard University is located. The first tool returns a record containing {"country_name": "United States of America"}. CUGA passed the whole record to the second tool instead of extracting the country name. Because it had already committed to the chain before checking the intermediate result, the lookup failed.
Correct data is not enough if the answer is unusable
Some runs retrieved relevant data, but returned an answer in the wrong format or claimed more than the data supported. Other runs failed mid-flow and produced no response that the benchmark could score.
This is a familiar production problem. Downstream systems often need a specific value, a particular schema, or an explicit failure state - not a narrative explanation someone has to clean up. That's why answer formatting and grounding should live in the agent design, not only at the end of a successful tool run.
Three configuration changes that improved CUGA
IBM Research turned these lessons into configuration options for CUGA rather than adding VAKRA-specific fixes. The goal was to let teams choose behavior that matches the task, instead of maintaining a separate agent implementation for every workflow.
1. Use native function calling for dependent work
CUGA added native function calling as an alternative to its code-first execution mode. With function calling, the agent makes one tool call, reads the result, and then chooses the next call. That gives it a chance to use the actual output values instead of guessing them in advance.
This fits tasks where each step depends on the previous one - like retrieving a customer record, checking its status, and then updating another system. The trade-off is that pausing between calls can add overhead. For independent operations that can safely run together, code-first execution may still be faster.
2. Shortlist tools before asking the model to choose
A configurable shortlister reduces a large API catalog down to a smaller group of candidates. CUGA supports three built-in approaches:
- LLM: The model selects relevant tools. This is the default and can use contextual descriptions, but it still depends on model calls and selection quality.
- Embedding: Similarity search retrieves candidates without an extra model decision. It can be fast, but similarity isn't the same as understanding intent.
- Hybrid: Similarity search narrows the catalog, then the model makes the final selection. This can balance retrieval speed with contextual judgment, at the cost of a more involved flow.
Teams can also provide their own strategy. The right choice depends on the catalog and the cost of a wrong call. A small, well-named set of APIs might not need shortlisting. A large catalog with overlapping operations probably does.
3. Put final answers through a controlled pipeline
CUGA added a final-answer pipeline for instructions, deterministic cleanup, and retry gates. The goal is to produce an output that matches the required format and stays grounded in what the agent actually saw.
For example, if an application expects only a percentage, a final instruction can tell the model to return just the value. A cleanup function can normalize the output, while validation can trigger a retry or a defined failure response when the result doesn't meet the contract. That reduces manual repair, but it doesn't automatically make unsupported answers "safe." You still need checks that distinguish a well-formatted answer from a correct one.
Choose behavior per workflow, not by habit
These settings can be configured rather than hard-coded into a benchmark-specific branch. A deployment might use code-first execution for independent lookups and function calling for dependent steps, plus shortlisting for a large API catalog and a final-answer function when output format matters.
IBM Research estimated that function calling contributed about 45% of the overall gain, the shortlister 30%, the final-answer pipeline 20%, and smaller changes 5%. Those are estimates: the team didn't isolate each change in a separate experiment. They're still useful as a directional indicator of where improvement came from, not a precise causal breakdown.
What the VAKRA results prove - and what they do not
In the final VAKRA test results, CUGA and the reference agent both used GPT-OSS-120B. CUGA's initial scores for capabilities one and four are estimates; the other first-run figures are reported values.
| VAKRA capability | CUGA, first run | Reference agent | CUGA, updated |
|---|---|---|---|
| Business intelligence APIs | ~20%* | 41.9% | 47.2% |
| Tool selection | 12% | 50.4% | 67.9% |
| Multihop tasks | 19% | 27.9% | 52.8% |
| Multihop, many sources, with policy | ~16%* | 18.7% | 33.4% |
*First-run scores for capabilities one and four are estimates.
Relative to the reference agent, the updated CUGA scored 5.3 percentage points higher on BI APIs, 17.5 points higher on tool selection, 24.9 points higher on multihop tasks, and 14.7 points higher on multihop tasks with many sources and policy constraints. The biggest reported gain was on multihop work, where observing intermediate results directly targets the failure mode.
A stronger harness narrowed the gap; it did not erase it
GPT-5.5 with a ReAct agent scored 50.3%, 72.2%, and 54.7% on the first three capabilities. CUGA with GPT-OSS-120B scored higher only on capability four: 33.4% versus 28.8% for GPT-5.5 with ReAct. Since scores on that policy-constrained capability were low for both systems, it would be a stretch to treat it as proof that the task is "solved."
VAKRA has limits too. The results cover one benchmark, one open-weight model, and single runs. Some first-run values are estimates, and the attribution of gains to individual changes is also estimated. With a different catalog, model, or workload, the balance of benefits could change.
VAKRA checks both correctness and grounding. It replays tool calls and checks whether the tools returned the data used by the reference solution, or asks a judge model whether the answer matches the expected one. It also checks whether tool data supports the answer. For the policy capability, a rule-based check can fail dialogues that violate tool-use policy. Those checks make the benchmark more informative than plain answer matching - but it still doesn't capture every production concern, like latency, operating cost, permissions management, or recovery from external service outages.
How to apply harness engineering in enterprise systems
The transferable takeaway isn't "copy these exact benchmark settings." It's: classify what your agent is doing, figure out where it's failing, and pick harness behavior that addresses that specific failure.
Match the execution mode to the dependency pattern
Map the workflow as a sequence of tool calls. Mark which calls are independent and which depend on outputs from earlier steps.
- If calls are independent and inputs are known, parallel or code-first execution can cut latency.
- If a later call depends on a returned identifier, value, or decision, use an observe-then-act loop.
- If the workflow mixes both patterns, don't assume one execution mode fits every task without testing the trade-off.
This kind of mapping can prevent a common design mistake: optimizing for fewer model turns when the workflow needs reliable state transitions.
Treat the tool catalog as a product surface
Review what the agent can see. Look for duplicate operations, unclear names, inconsistent parameter schemas, and tools that expose more authority than the task actually requires. Shortlisting can help, but it can't indefinitely cover for a confusing catalog.
Measure tool selection separately from end-to-end task success. If selection is poor, inspect whether the issue is retrieval quality, tool descriptions, or overlapping API behavior before assuming you need a different model.
Define output contracts and failure behavior
Spell out what a successful response looks like - and what should happen when the agent can't produce one. A downstream system might need a typed field, a validated value, or a clear failure status. Make those requirements explicit, then test that the final pipeline preserves evidence and doesn't turn uncertainty into a confident-looking answer.
For workflows involving sensitive data or consequential actions, add policy checks at the point where actions are proposed or executed. Output formatting doesn't equal authorization. A correctly formatted tool call can still be the wrong (or disallowed) action.
Make each improvement regression-testable
CUGA's core improvements were merged into its agent and evaluation projects, while the VAKRA-specific integration stayed in a separate adapter. The team also ran regression splits so changes that hurt benchmark performance could be caught before merging.
That separation is operationally useful: keep reusable execution behavior inside the agent, keep benchmark- or system-specific wiring in adapters, and preserve representative tests for both successful and failure cases. For a real business workflow, that means testing not just the ideal path, but also ambiguous tools, missing records, invalid outputs, and policy violations.
A practical sequence is: study representative tasks, connect the relevant tools, choose execution and shortlisting behavior, define output and policy contracts, then run regression tests before deployment. Each new integration still takes work - but the harness work becomes more repeatable rather than starting from scratch every time.
Conclusion: improve the system around the model
VAKRA's most useful lesson is simple: agent reliability is an engineering problem spanning the model, the tools, and the execution flow. CUGA's gains came from reducing tool-choice complexity, letting the agent check intermediate results, and controlling the final answer - not from changing the model.
For teams building enterprise agents, start with failure analysis. If the model can't find the right API, improve how tools are presented. If dependent calls break, change the execution loop. If downstream systems reject the output, define and validate an answer contract. Then test those changes against representative tasks and keep regression checks visible.
A better model might still be the right investment. But before you spend for upgrades, figure out whether your agent is failing because of the model - or because the harness is asking it to work around preventable system design problems.