2026-11-26 15:37 UTC

Bespoke Labs introduces EnvOpt to optimize agent environments

state: seedheat: mediumuncertainty: mediumrelevance: highagent-evaluation environment-optimization agent-efficiencyBespoke Labs

What is this?

Bespoke Labs, in collaboration with researchers from the University of Chicago and UC Berkeley’s Sky Computing Lab, introduced EnvOpt in a Nov. 13, 2026 blog post and linked research paper. It uses a research agent to iteratively reorganize a stationary environment—such as a workspace, database collection or code repository—and potentially add ways to access it, while leaving the target agent’s harness unchanged. The post reports tests across five benchmarks; results and cost figures here are the authors’ claims, not independently verified evidence. The supplied search results also show an arXiv entry dated Nov. 6, 2026, earlier than the blog announcement; the sources do not explain that chronology. Another search result concerns a differently titled EnvOpt paper, so it should not be conflated with this work.

Why it matters

EnvOpt treats the information environment around an agent as an optimization target, alongside the model and harness. Bespoke Labs reports an average 48% lower target-agent cost on unseen tasks across five benchmarks, with similar or higher pass rates, and says environment changes can transfer across models and harnesses. If these results generalize, organizations may be able to make existing agents cheaper and more effective without changing the underlying model. The evidence is a company-authored account of benchmark experiments; real-world adoption and independent replication are not established here.

Current assessment

New: Bespoke Labs’ Nov. 13 announcement presents EnvOpt, an automated method for optimizing stationary environments for a given agent model and harness. A sandboxed research agent runs the target agent on training tasks, analyzes its trajectories, then edits the environment representation or its access tools; the target harness is meant to remain untouched. The post says training tasks need no graders or reference answers, while a separate validation set with verifiers tracks cost and pass rate and held-out tasks are used for testing. Examples include indexing a large workspace, building a database of data-engineering metadata, creating API cheatsheets, and ranking likely relevant source files. The authors report average 48% lower cost across five benchmarks on unseen tasks with higher or similar pass rates; on AutomationBench they report beating Meta-Harness by 9.67 percentage points in pass rate at 15% of its cost. They also report transfer across models and harnesses, and further gains when applying EnvOpt on top of Meta-Harness. These are attributed experimental results, not independent confirmation. The post describes failure modes and caveats: optimization can overfit or introduce bugs, research agents may use unreliable quality proxies or violate instructions, and validation is important. The reported AutomationBench offline optimization cost is about $150, with claimed savings depending on repeated future task volume. Search results include an arXiv listing dated Nov. 6, while the company blog is dated Nov. 13; the supplied sources do not resolve this timeline. No evidence supplied establishes deployment or adoption beyond the reported experiments.

Measured heat

now 0 pts/hpeak 3 pts/hcomments 0/hpeers p10momentum: steady2 platformsage 338h
points/hour across evidence · reading as of 2026-11-27 02:23:58.509736+11:00 · deterministic, not a model opinion

How the heat travelled

11-12 13:00⭐ origin echo-reconstructedBespoke Labs describes EnvOpt as an automated way to optimize how agents access and navigate stationary environments, reporting cost reducti
Bespoke Labs on blog (echo) · attributed from hn.story.50501406
—
11-14 22:01first on hacker news · published · +57.0hEnvOpt: Automated Optimization for Agent Environments
matt_d
—
11-14 22:01amplified on hacker news 👑hn.story.50501406
matt_d
peak 2 · 0 comments · 103% of case engagement
11-14 22:20our radar first saw it · +57.3hdiscovery anchor: hn.story.50501406—
pace: p11 vs 1845 stories at the 336h mark (now 338h old) — behind adobe-max-ai-agents-creative-tools-mcp (0.5x)

Evidence (2) — ⭐ canonical anchor

sourceobjectauthorscorecomments
🟧 hnEnvOpt: Automated Optimization for Agent Environments
Retrieved article excerpt

Open article · Retrieved 2026-11-14T22:21:33.251013+00:00

[<-Blog](https://bespokelabs.ai/blog)

[Nov 13, 2026]

# EnvOpt: Automated Optimization for Agent Environments

An LLM agent's cost and success depend on its model, its harness, and its environment. Agents are often deployed in rich environments shared by many tasks, such as a company's Slack workspace or a complex collection of data sources, documents or tickets. We call these stationary environments. To improve an agent, one can tune the model or edit the harness; we show that changing how information is organized in the environment is a third direction. We introduce EnvOpt, a method for automated end-to-end optimization of stationary environments for any given model and harness, using real or synthetic tasks without needing any graders or reference answers.



## The central idea

An LLM agent’s cost and success rate depend on three things: the model parameters, the harness, and the structure of the environment it interacts with. The first two are actively optimized through parameter tuning and harness optimization, while the environment is often considered immutable. Yet, the same information can be given to an agent in very different forms. For example, a company’s Slack history can either sit behind a remote server and be accessible via MCP or exported in plain text files that can be read and searched with terminal tools like grep. This choice alone can significantly affect how much work the agent needs to perform to solve a task.

Stationary environments refer to environments with large collections of artifacts that remain the same or are similar across many tasks. For example, a banking agent uses the same enterprise platforms and databases for a massive number of queries; many tasks for a company’s Slack assistant depend on the same Slack workspace; feature requests for a toolkit can rely on the same code repository. We aim to optimize how the stationary environments are organized and represented to agents.

Using training tasks without verifiers, we let a coding agent, equipped with access and budget to run a target agent on the stationary environment, optimize the environment representation for the target agent. The optimization target includes what the environment holds (e.g. adding a database to the environment or restructuring it) and ways it is exposed to the target agent (e.g. new API endpoints). The optimized environment is monitored with a validation set with verifiers to track cost and pass rate, and tested on a held-out test set.

## Results

AutomationBench pass rate versus cost, with the figure caption included in the image.

Across five benchmarks covering workspace tasks, data engineering tasks, and software engineering tasks, EnvOpt reduces the cost of the target agent on unseen test sets by an average of 48%, with higher or similar pass rates.

On AutomationBench, EnvOpt outperforms Meta-Harness by 9.67% pass rate with only 15% of its cost.

The environments optimized for the target agents can transfer to other agents, even to those with different harnesses and to models stronger than the one proposing the optimizations.

We applied the environment from EnvOpt on top of Meta-Harness and observe similar cost reductions and 16% improvement in pass rate, outperforming either Meta-Harness or EnvOpt alone.

EnvOpt optimization cost break-even.

EnvOpt costs around USD $150 for an offline optimization of the stationary environment in AutomationBench, and saves cost of running Claude Opus 4.8 by 77.5%, easily saving many times the cost of running EnvOpt. Lines are derived by random sampling actual cost of running the test set tasks.

## Where the cost goes

To illustrate where the cost reduction of EnvOpt comes from, we break down input tokens and output tokens into categories, including different kinds of tool calls, tool execution results (environment feedback), thinking tokens, agent history, etc. We observe that the most significant token cost reduction comes from the environment feedback categories for the input tokens. There are also significant savings on the tool call categories of the output token side.

Breakdown of token savings by category on AutomationBench and Data-Eng-Bench.

Breakdown of token savings by categories on AutomationBench and Data-Eng-Bench. Grey bars show the baseline environment and green bars show the final EnvOpt environment. Most of cost reduction comes from input token savings, mainly tool execution results, such as endpoint lookup on AutomationBench and data inspection on Data-Eng-Bench. Output tokens drop less, around 20% compared to baseline.

## How it works

EnvOpt workflow for iterative optimization of agent environments using disjoint training tasks.

EnvOpt optimizes the environment in multiple steps, with each step using a disjoint set of training tasks without verifiers.

In each step, a research agent is launched in a sandbox and given the original environment as a local directory and the permission to run target agent in another sandbox. The research agent is instructed to run the target agent, analyze the trajectories, and edit the environment as a directory in its filesystem to reduce the cost of the target agent without hurting the pass rate (which the research agent judges on itself by proxies or answer consistency, since no verifier is provided for the training tasks). Notably, we do not allow the research agent to modify the harness of the target agent. We provide disjoint sets for tasks for each step to prevent overfitting.

To prevent the research agent from reward hacking during a training step (such as writing down the answers to the training tasks to lower the cost directly), we hide all the verifiers for the tasks used in training. This also mitigates the scarcity of high quality tasks for some stationary environments, as we can synthesize in-distribution queries (without synthesizing the verifiers) for training (we used synthetic training tasks for Workspace-Bench and Data-Eng-Bench, see paper Appendix). At the end of each step, we run validation queries (with verifiers) to decide if EnvOpt has converged or should continue running.

## What the research agent built

### Converting a similar unseen environment.

We do not require the environments to be exactly the same: slightly different yet highly similar environments can be converted using an automated converter written by the research agent during EnvOpt. For AutomationBench, the converter is a short program that runs at the start of every task. It calls the same API the agent uses to read that task’s data and rewrites the results into one compact text block placed at the top of the agent’s prompt, so the agent skips the search and listing steps and acts directly.

### Making Cheatsheets.

Cheatsheets that store important information for future tasks are created during training. For example, a cheatsheet for AutomationBench stores all the API endpoints the agent needs to create Jira issues, post messages on Slack, record a Xero payment, etc., so it does not need to call api\_search or api\_fetch to get the endpoints.

### Indexing.

For Workspace-Bench, the agent is deployed with massive amount of files simulating an enterprise employee’s computer. The research agent thus builds an indexing map as a single text file, that stores the paths, sizes, and types of all files needed, so the agent can simply search over the indexing file instead of spending tokens and time on the huge filesystem.

### Building Database.

On Data-Eng-Bench, the research agent built an SQLite database that stores the locations of tables, which files each code script writes to, what are the types of information stored in each table, etc. The target agent can quickly locate the information needed without browsing through thousands of files.

### Building Programs that Rank File Priority.

For the Bleve repository, the research agent built a program that takes any bug report and outputs the 8 .go files that are most likely to be impacted based on keyword matching. The target agent can quickly locate the files it potentially needs to investigate to fix the bugs.

### Automated Testing of Edits.

For the Tenacity repository, a validate\_tenacity.py is built to automatically fetch the code change made by the target agent, search for relevant test files, run the tests, and return verdicts. This quickly validates candidate edits with no extra token cost and speeds up the whole bug fix workcycle for the target agent.

## Results

### Transferability.

On AutomationBench, we examine the transferability of the optimized environment across different harnesses and models, with an average cost reduction of 75.7% and generally higher pass rates. Haiku 5.5 with EnvOpt achieves pass rate higher than Opus 4.8 and even close to Opus 5. On Workspace-Bench, we evaluate on Codex with GPT-5.6-Sol and Claude Code with Opus 5, and observe an average 56.7% cost reductions with steady pass rates compared with the baselines. On Data-Eng-Bench, on non-target agents, we observe an average cost reduction of 53.54%.

### Building on Meta-Harness.

EnvOpt can be applied on top of Meta-Harness to further improve agent’s token efficiency and pass rate. Using the optimized harness for Haiku 4.5, EnvOpt can further push the Pareto frontier for Haiku 4.5. When transferring to Opus 5, although Meta-Harness alone does not show gain on pass rate, EnvOpt on top of Meta-Harness still improves the pass rate with much lower cost.

### Ablation: Tool Optimization Only.

During environment optimization, EnvOpt can also optimize ways to access the new environment, including new tools. We study the effectiveness of only using the new tools. We find that tool optimization alone can lead to improvements on both token efficiency and pass rate, but is significantly lower than optimizing both the tools and the environment. Since tool optimization might be covered by harness engineering, this ablation shows that EnvOpt brings significantly more headroom for optimization in addition to harness engineering.

### Software Engineering Tasks.

On Bleve repository, EnvOpt remains close to perfect score using only 56.9% of the completion time of gskill. On the tenacity repository, EnvOpt achieves 8.9% higher pass rate with fewer steps than advisor models. These results show that EnvOpt significantly outperforms other methods to improve agent token efficiency even on software engineering tasks.

Software engineering task results on the Bleve and Tenacity repositories.

Results on two software engineering repositories. Left: on the bleve repository, EnvOpt keeps accuracy close to perfect while using 56.9% of gskill’s completion time. Right: on the tenacity repository, EnvOpt reaches 8.9% higher accuracy than advisor models with fewer steps.

### Training Cost and Time.

We compare the cumulative training cost with the cost saved for running different agents on unseen tasks, assuming there are 1000 such tasks. We show that for frontier agents deployed in large scale, we can easily save more than 10 times of the cost of running EnvOpt.

## Rejected environment optimizations

### Storing too much information in one file leads to more exploration.

For Data-Eng-Bench, the research agent tried to create a big file to store all possible values for all columns in a database. Though this is meant to help the agent retrieve the correct information with less token, putting everything into a big file encouraged the agent to make more tool calls to explore the values, since one tool result reveals to the agent that there is much information it has not explored, which eventually increased the cost.

### Building a search tool that returns too many files causes more reading.

For Workspace-Bench, a search tool was built to help the agent locate the files that it needs to read for the task. Though the tool successfully reduced token cost for searching the needed files, it often included unnecessary files in the search results, which motivated t
matt_d20
🟧 echo.blog ⭐Bespoke Labs describes EnvOpt as an automated way to optimize how agents access and navigate stationary environments, reporting cost reductiBespoke Labs——

Interpretation history

Decision trace