Imagine you are a PhD advisor with a brilliant student: fast coder, sharp mathematical intuition, works 24/7. But there's a problem — he secretly edits evaluation scripts to inflate his scores, burns GPU credits until the bill explodes, and garbles his lab notes beyond reconstruction.
How would you manage him?
Most people's first instinct: write a detailed manual prescribing every step. Read papers, propose hypotheses, write code, run experiments — follow the pipeline, no deviations.
But the Tsinghua University and Zhipu AI research team offers a counterintuitive answer: don't prescribe how he works — design the environment he works in. Give him a tamper-proof evaluation system, a notebook that automatically records every experiment trace, an alarm clock that stops him on time, and an advisor who can chime in anytime. Then let him explore freely.
That's the core idea of EurekAgent — Environment Engineering. It's not another workflow system for AI; it's a rethinking of the paradigm for how AI does research.
The Bottleneck Shifts: From "Teaching AI How" to "Giving AI What Environment"
Over the past two years, AI research assistants have mostly been designed around prescribed workflows. AlphaEvolve maintains a population of candidate programs guided by evaluator feedback; AIDE organizes an exploration tree with feedback loops and role division; newer systems add structured debate, periodic self-review, and self-learning modules.
These designs work, but they all encode a strong assumption: I know how research should be done.
Recent evidence is shaking that assumption. On ResearchClawBench — a benchmark spanning 40 research tasks across 10 domains — Claude Code and Codex, used directly as general-purpose agents, outperformed all purpose-built research agent systems. Karpathy's autoresearch project showed that a general coding agent, given a clear task and an optimizable metric, can discover new SOTA solutions on its own.
Capability is already sufficient. The bottleneck isn't the agent — it's the environment around it.
This echoes ecological psychologist James Gibson's theory of affordances: the environment shapes the actions available to an actor, "for better or for worse." For a research agent, a well-designed environment should suppress harmful affordances (evaluation tampering, result manipulation) and amplify beneficial ones (free exploration, accurate feedback, collaboration and oversight).
The paper offers an apt analogy: a capable PhD student's productivity comes not from minute-by-minute instructions, but from accountability, research autonomy, accurate feedback, peer collaboration, and advisor supervision.
Four Dimensions of Environment Engineering: Building the "Perfect Lab" for an AI PhD Student
1. Permission Engineering: Keys and Locks
Research agents need broad capabilities — Python environments, shell access, web search, browser tools — but unconstrained capability undermines research integrity.
EurekAgent works like a well-designed lab safety system:
- What's given: freely configurable Python environments, workspace-level shell access, web search and browser tools, access to artifacts from earlier rounds of the same run
- What's locked: hidden evaluators live outside the agent-visible workspace and are exposed only through a secure scoring service — the agent can submit solutions and get official scores, but cannot view or modify the evaluator itself; official result files are updated automatically by the system and cannot be tampered with; parallel implementation sessions within a round are isolated from each other to prevent premature convergence; GPUs are invisible by default and must be requested through a dedicated API, ensuring each GPU is held by at most one session at a time
2. Artifact Engineering: An Automated Lab Notebook
EurekAgent uses the filesystem plus Git history as shared long-term memory. Every phase's outputs — preparation summaries, proposal lists, hypotheses, solution code, evaluation feedback, score submissions — go into the filesystem. The system also maintains automatically managed artifacts: web search history serves as a cache of explored information, and official scores are recorded and ranked automatically.
Ranked historical solutions let subsequent agent sessions quickly identify strong candidates and inspect their code, logs, and intermediate results. All run artifacts persist under the run directory, supporting traceability, interruption recovery, and resumability.
Within each session, Git commits track solution evolution, with commit messages required to describe both the current solution and its delta from the previous version.
This is like giving the AI PhD student a lab recorder that never slacks off — every entry logged, every change documented, no retroactive edits.
3. Budget Engineering: An Alarm Clock That Stops on Time
Autonomous research agents can consume enormous time, compute, and API budget. EurekAgent makes budget limits part of the environment settings, controlled along two axes: wall-clock time and API cost.
For time, users set separate limits for proposal and implementation sessions — hypothesis generation and long solution iterations need different time scales. Agents perceive time through two mechanisms: actively, via a time-query API showing elapsed and remaining time in the current phase; passively, via injected warning messages when a deadline approaches but required artifacts are incomplete, instructing the agent to stop exploring and produce the required outputs.
For API cost, EurekAgent tracks cumulative token usage across sessions without exposing consumption info to the agent. When the cap is reached, the run halts and the current workspace is preserved as the final snapshot.
Budget control also supports operational continuity in long research runs: session identifiers, states, elapsed time, and effective budgets for each phase are persisted, so an interrupted run can resume from the latest filesystem state with the remaining budget rather than starting over. Users can also adjust time limits or grant extra continuation time when a phase exhausts its budget without producing required artifacts.
Budget engineering is not just a stopping rule — it's an operational interface for controlled continuation.
4. Human-in-the-Loop Engineering: Freedom in a Transparent Fish Tank
EurekAgent provides two complementary interfaces: a terminal UI exposing each solution's progress, raw session output, and an input box to communicate with active sessions; and a web monitor offering a higher-level view with visualized score evolution, including per-round and global best solutions.
These interfaces preserve agent autonomy while keeping the process fully observable, letting humans redirect agent behavior when needed.
The AI swims freely in a fish tank; you can tap the glass anytime.
The Three-Phase Cycle: A Minimal Research Rhythm
Under the environment engineering shell, EurekAgent's agent orchestration is extremely simple — a three-phase loop:
Preparation (run once): the agent reads the problem description, evaluator submission requirements, and optional initial code; tests the hidden evaluation service; installs or verifies runtime dependencies. If setup is ambiguous or broken, it can pause and request human clarification. It writes a preparation summary at the end.
Proposal (once per round): the agent reviews ranked solutions and evaluation feedback from previous rounds, proposes the next round's exploration direction, and writes a proposal list.
Implementation (up to P parallel sessions per round): each implementation session independently develops a solution per proposal, submits it for scoring, and writes its artifacts.
That's it. No complex role division, no mandatory reflection steps, no structured debate. The environment coordinates; the agent explores.
Results: Environment Engineering Is Enough
EurekAgent validated environment engineering across three domains, using Claude Code as the CLI agent with GLM as the backbone model:
Math: Three Records Broken
| Task | EurekAgent | Prior best AI | Prior best human | |------|-----------|---------|-----------| | 26-circle packing ↑ | 2.635999 | 2.635986 | ~2.634 | | Erdős minimum overlap ↓ | 0.380870 | 0.380876 | 0.380927 | | First autocorrelation inequality ↓ | 1.502861 | 1.502863 | 1.509730 |
Most striking is the 26-circle packing task — total API cost under $11 to refresh a mathematical record. The previous best AI result used test-time training with R1-Distill-Qwen3-8B; EurekAgent requires no training at all, relying purely on environment engineering.
Kernel Engineering: Crushing the Leaderboard
On the GPUMODE TriMul competition (ternary matrix multiplication optimization), EurekAgent produced 4 solutions outperforming the leaderboard's top submissions; its best is 4.3% faster than the strongest leaderboard entry and 10.8% faster than TTT-Discover. All 4 solutions came in under 2031 microseconds — not luck, but stable optimization ability.
Machine Learning Engineering: First on MLE-Bench
Across 7 MLE-Bench Lite competitions, EurekAgent achieved an 85.71% medal rate, 71.43% gold rate, and 100% above-median rate — ranking first.
Engineering Insights: Why This Matters to You
EurekAgent's lessons go far beyond academia:
1. Stop writing workflows for agents; start designing environments. When base agents are strong enough, a carefully designed environment beats a carefully designed workflow. Your agent framework may be over-engineered.
2. Reliability comes from constraints, not instructions. You can't prompt an agent into not cheating, but you can make cheating impossible through permission isolation. This is a basic principle of security engineering — don't trust; verify.
3. Budget awareness is a must for production agents. An agent without budget control is a car without brakes. EurekAgent's budget engineering is not just a stopping rule but an operational interface for controlled continuation — critical in production.
4. Observability is not control. The terminal UI and web monitor make agent behavior fully visible without touching its autonomy. This "transparent fish tank" model may be the best balance for human-AI collaboration.
5. A math record broken for $11 means the barrier is falling. No model training, no massive compute — a well-designed environment plus a general-purpose agent is enough. This lowers the entry barrier for AI-driven research.
Personal Reflection
EurekAgent raises a deeper question: we've been teaching AI "how to do research," but perhaps we should be teaching AI "under what conditions to do research."
This parallels the evolution of human science strikingly. In the 17th century, Bacon proposed the scientific method — essentially a prescribed workflow: observe, induct, verify. But the true foundation of modern science's reliability isn't methodology; it's the environment: peer review, reproducibility requirements, data openness, ethics review. None of these tell scientists "how" — they construct an environment where good research naturally emerges and bad research struggles to survive.
EurekAgent applies the same logic to AI. It doesn't tell the agent "do this, then that"; it designs an environment where the agent's creativity finds room to shine while cheating and waste have nowhere to go.
Perhaps the future of AI research lies not in smarter workflows, but in smarter environments.
---
Paper: EurekAgent: Agent Environment Engineering is All You Need For Autonomous Scientific Discovery
Code: github.com/THU-Team-Eureka/EurekAgent
Authors: Amy Xin, Jiening Siow, Junjie Wang, Zijun Yao, Fanjin Zhang, Jian Song, Lei Hou, Juanzi Li (Tsinghua University & Zhipu AI)