Harness Engineering Through Configuration: Lessons from VAKRA for CUGA
Harness Engineering Through Configuration: Lessons from VAKRA for CUGA Published December 1, 2026 TL;DR: CUGA was evaluated on the benchmark with . Instead of changing the model...
By AI Engineering Team
Harness Engineering Through Configuration: Lessons from VAKRA for CUGA
Published December 1, 2026
TL;DR: CUGA was evaluated on the VAKRA benchmark with GPT-OSS-120B. Instead of changing the model, the evaluation focused on improving the agent harness: tool selection, multi-step execution, and final-answer generation. These changes were implemented as reusable configuration options rather than benchmark-specific patches. CUGA now outperforms a LangGraph ReAct agent using the same model across all four VAKRA capabilities. On multihop tasks, its success rate rose from 19% to 52.8%. The improvements are open source, while VAKRA-specific integration remains in a separate adapter.
Why the harness matters for open-weight models
An agent consists of both a model and a harness. The harness determines what the model sees, how it invokes tools, and how it produces its final answer. Frontier models can be more tolerant of weak harnesses, but open-weight models in the 100B range often require more careful orchestration. Enterprises may also need open-weight models for cost, privacy, or on-premises deployment reasons.
The evaluation asked how much of the performance gap could be reduced while keeping the model unchanged. VAKRA provided a way to measure that effect.
The starting point
VAKRA evaluates enterprise agents across four capabilities:
- Business intelligence (BI) APIs
- Tool Selection tasks
- Multihop tasks
- Multihop tasks across many sources under policy
For a controlled comparison, CUGA was measured against a reference LangGraph ReAct agent using the same GPT-OSS-120B model.
In its initial configuration, CUGA solved 12% of sampled Tool Selection tasks and 19% of multihop tasks. The reference agent solved 50.5% and 25.1%, respectively. Analysis of the failures indicated problems in the harness rather than in the model itself.
What VAKRA revealed
Large tool catalogs make selection difficult
VAKRA provides a large catalog of APIs, many with similar names and schemas. Including the entire catalog in the prompt can cause the model to choose the wrong tool or invent arguments. Tool selection therefore needs a separate filtering step before the model receives the relevant catalog entries.
Code-first execution can commit too early
CUGA's default execution mode generates a short Python script that calls several tools in sequence. This works when steps are independent. Multihop tasks are different: each step depends on the output of the previous one. A script written in advance can therefore use incorrect values.
These tasks require the agent to inspect each result before deciding which tool to call next.
One VAKRA training task asks: "In the nation where Harvard University is located, what is the percentage of female university students in 2016?" Solving it requires two sequential calls. The first identifies the university's country, and the second retrieves the percentage for that country and year.
In code-first mode, CUGA called both tools without examining the intermediate result. The first tool returned:
{"country_name": "United States of America"}
CUGA passed the complete record to the second tool instead of extracting the country_name value, so the lookup failed.
Answers must be grounded in observed data
Some runs found the correct data but returned it in the wrong format or produced an answer that the data did not support. When a run failed partway through, the agent sometimes returned no output that could be scored.
Three new configuration points
Each lesson from VAKRA became a setting that can be used by CUGA deployments.
1. Native function calling
CUGA now supports native function calling alongside code-first execution. The agent makes one tool call, examines the result, and then chooses the next call. This mode is intended for tasks that involve a sequence of dependent API interactions and produced the largest improvement on multihop tasks.
2. A configurable shortlister
The shortlister reduces the full tool catalog to a smaller group of candidates before the model selects a tool. Its strategy is configurable for each deployment. Three built-in strategies are available:
llm: the model selects the tools, and is the defaultembedding: a fast similarity search that does not require a model callhybrid: similarity search shortens the list, then the model selects from it
Deployments can also provide a custom strategy.
3. A final-answer pipeline
A controlled final-answer step applies a strict output format, deterministic cleanup, and retry gates. This allows the agent to produce a scoreable answer even when execution fails before completion.
A representative configuration is:
## CUGA settings for the three configuration points:
## cuga-agent: src/cuga/settings.toml
[advanced_features]
cuga_lite_execution_mode = "function_calling" # default: "codeact" (code-first)
cuga_lite_step_discipline = "one_tool_per_step" # default: "off"
[shortlister]
strategy = "embedding" # default: "llm"; also "hybrid", or your own class
top_k = 128 # number of tools retained by similarity search
[final_answer]
instructions = "Answer with the value only." # expected answer format
function = "my_package.clean_answer" # function that cleans the answer text
The estimated contribution to the overall gain was approximately 45% from function calling, 30% from the shortlister, 20% from the final-answer pipeline, and 5% from smaller changes.
Why this matters for enterprise automation
CUGA is designed for enterprise automation, where agents work across business systems. VAKRA's tasks reflect several common enterprise problems:
| What VAKRA tests | Enterprise automation problem | CUGA setting |
|---|---|---|
| Hundreds of APIs with similar names and schemas | Enterprise systems expose large API catalogs, often with multiple versions of the same operation. | Configurable shortlister |
| Multihop tasks, where each step uses the previous output | A business process reads a record, makes a decision, and writes to another system. | Native function calling |
| An answer that a scorer must read | A downstream system or person must accept the output without manual cleanup. | Final-answer pipeline |
| Multihop tasks across many sources under policy | Automation must follow written rules governing data and actions. | All three settings together |
Capability 4 most closely resembles complex enterprise work because it combines multiple sources, multiple steps, and policy requirements. It is also the capability where CUGA with GPT-OSS-120B scores higher than GPT-5.5 with a ReAct agent: 33.4% compared with 28.8%. Scores for capability 4 remain low, so the problem is not solved.
Because each improvement is exposed as a setting, an enterprise team does not need to build a separate harness for every workflow. The same deployment can use code-first execution for independent steps and function calling for dependent chains.
Results
The final results on the VAKRA test set are shown below. CUGA and the reference agent both use GPT-OSS-120B.
| Capability | CUGA, first run | Reference agent | CUGA, now |
|---|---|---|---|
| 1. BI APIs | ~20%* | 41.9% | 47.2% |
| 2. Tool Selection | 12% | 50.4% | 67.9% |
| 3. Multihop | 19% | 27.9% | 52.8% |
| 4. Multihop, many sources, with policy | ~16%* | 18.7% | 33.4% |
* The first-run scores for capabilities 1 and 4 are estimates.
Compared with the LangGraph ReAct reference agent, the largest improvement was on multihop tasks, at 24.9 percentage points. Tool Selection improved by 17.5 points, and multihop tasks under policy improved by 14.7 points. BI APIs showed the smallest gain, at 5.3 points.
What the numbers do not show
The results are limited to one benchmark and one model.
Frontier models still perform better on most capabilities
GPT-5.5 with a ReAct agent scores 50.3%, 72.2%, and 54.7% on capabilities 1 through 3. CUGA with GPT-OSS-120B scores higher only on capability 4, at 33.4% compared with 28.8%.
The improved harness reduced the gap between an open-weight model and the frontier model, but did not eliminate it.
Some figures are estimates
The first-run scores for capabilities 1 and 4 are estimates, so the corresponding gains are approximate. The estimated contribution of each configuration point is also approximate because the three changes were not tested independently.
How VAKRA scores a task
VAKRA reruns the agent's tool calls and checks two requirements. First, the answer must be correct. This means either that the tool calls returned all the data used by the reference solution, or that a judge model, GPT-OSS-120B at temperature 0, determined that the answer matched the expected answer.
Second, the answer must be grounded. The judge model checks whether the tool data supports the response. For capability 4, a rule-based check also fails dialogues in which the agent violates a tool-use policy. Each score reported here comes from a single run.
Configuration rather than benchmark-specific code
The core of CUGA contains no VAKRA-specific code. The improvements were merged into cuga-agent and cuga-eval through 15 pull requests. The three configuration points are represented by pull requests #777 for function calling, #664 for the shortlister, and #707 for the final-answer pipeline. VAKRA-specific components remain in an open adapter within cuga-eval.
This approach treats the work as harness engineering through configuration. A new benchmark or deployment can begin with the same settings rather than requiring a new harness. Each benchmark still needs setup work, but the process becomes repeatable: study the tasks, connect the tools, configure the agent, adapt what does not fit, and iterate.
To preserve the gains, CUGA pull requests run against benchmark regression splits. A change that reduces performance on VAKRA fails before it is merged.