Exo: An Architecture for Self-Improving Systems at Runtime
Abstract: Agent harnesses govern how LLMs act in an environment; designing their policies by hand is difficult, while automated techniques require representative datasets and costly executions. We present Exo, an agent runtime architecture for safe learning during ongoing work that collapses the optimization loop into task execution, allowing agents to revise both their harness and their strategies for further improvement. A minimal protected mechanism layer preserves execution history and governs policy activation while the harness evolves through inspectable code changes. On long-running objectives in an open-world game, Exo reduces model cost by 12-53% relative to Codex and Pi in standalone runs and 45-82% in transfer runs, while matching task completion rates. Compared with the same starting policy without the ability to edit policy, Exo reduces held-out model cost by 35-61% on AppWorld and SREGym with comparable correctness, cutting AppWorld's mean task time by 13% and SREGym's median diagnosis time by 35%. On Continual Learning Bench coding tasks, model cost including learning falls by 14%, with both policies resolving every issue.
Paper Prompts
Sign up for free to create and run prompts on this paper.
Explain it Like I'm 14
1. What is this paper about?
The paper introduces Exo, a system that lets an AI agent improve the way it works while it is still working on a task.
An AI agent is more than just a LLM. It also has a set of instructions, tools, memory systems, and rules for deciding what to do. This surrounding software is called a harness.
Usually, people design the harness by hand, or they test different versions using special datasets. Exo takes a different approach: it lets the agent inspect and edit parts of its own harness during a task.
A simple comparison is:
- A normal agent is like a student who must use the same study method for an entire project.
- An Exo agent is like a student who notices that a method is slow, changes the method, and then uses the improved method for the rest of the project.
2. What questions did the researchers ask?
The paper mainly investigates these questions:
- Can an AI agent improve its own working methods while completing a task?
- Can these self-made improvements make the agent cheaper and faster?
- Can the improvements be reused on later, similar tasks?
- How can self-editing be made safe?
- Can the agent change its behavior without losing its memory, progress, or records of what happened?
The researchers were especially interested in long or complicated tasks, where a small improvement could save a lot of time and computer cost.
3. How did the researchers build and test Exo?
The basic design
Exo divides the agent into two parts:
| Part | What it does |
|---|---|
| Editable policy layer | Controls prompts, tools, memory, context, and strategies. The agent can change this part. |
| Protected mechanism layer | Protects important information and controls whether changes are allowed to become active. The agent cannot freely change this part. |
This is similar to a computer operating system:
- The editable policy is like ordinary programs that users can modify.
- The protected mechanism is like the operating system kernel, which protects important resources.
How self-editing works
The agent can:
- Look at its own code.
- Notice something inefficient or unsuccessful.
- Edit the code.
- Test whether the new version works.
- Ask a separate safety system, called a guardian, to activate it.
The guardian is outside the editable part of the agent. This is important because an agent should not be able to simply approve its own broken changes.
In the paper’s basic version, the guardian checks whether the new code can be built successfully. More advanced guardians could test the new version more carefully before allowing it to run.
Protecting memory and progress
Exo also keeps an append-only history. This means new events can be added, but old events cannot be erased.
The history records things such as:
- Messages between the model and the environment
- Tools the agent used
- Results of those tools
- Previous self-edits
- How much time and money the model used
Exo also saves older versions of important files and memories. If a new edit fails, the agent can return to an earlier version.
The experiments
The researchers tested Exo in several settings:
- A RuneScape-like open-world game involving combat, crafting, and earning money
- AppWorld, which contains tasks involving everyday computer applications
- SREGym, where an agent diagnoses problems in computer services
- Continual Learning Bench, which contains software-coding problems
They compared Exo with other agents or with an identical agent that was not allowed to edit its own policy.
The researchers measured:
- Whether tasks were completed correctly
- How much model usage cost
- How long tasks took
- How many actions or model responses were needed
4. What did the researchers find?
Exo often used less model cost
In the open-world game, Exo completed tasks using less model usage than the comparison agents.
For example:
- It used 12% to 53% less model cost on some standalone game tasks.
- On repeated tasks with a fresh game account, it used 45% to 82% less cost than the comparison agents.
- In one combat experiment, Exo’s cost dropped from about $3.71 to$1.92 when it reused improvements from an earlier run.
This happened because Exo spent some time creating better tools and strategies early on. Later, it could use those improvements instead of repeatedly making the same decisions.
Exo created useful tools
In the game experiment, Exo created tools that could:
- Perform several combat actions together
- Avoid enemies that caused repeated problems
- Stop fighting when the character’s health was low
- Choose which skill to train
- Reduce unnecessary information in the model’s input
In the computer-service experiment, Exo created a diagnostic tool that collected important evidence in one step instead of requiring many separate commands.
These tools acted like shortcuts. Once created, they could be reused.
Improvements transferred to new tasks
The changes Exo made were not useful only for the exact task where they were created. They could also help with later, similar tasks.
On AppWorld:
- Exo and the comparison system had the same task success rate: 96.9%.
- Exo used about 61% less model cost on held-out tasks.
- Including the cost of learning, Exo still used about 43% less total cost.
On SREGym:
- Diagnosis time fell from 81 seconds to 53 seconds.
- The number of model rounds fell from 16 to 10.
- Model cost fell by about 35%.
On coding tasks:
- Both Exo and the comparison system solved 100% of the issues.
- Exo used 14% less model cost.
- It also needed fewer shell commands.
Self-improvement is not always worthwhile
The researchers also found an important limitation.
Exo may spend extra resources at the beginning while creating new tools. This is worthwhile when the task is long or repetitive, because the improvement can be used many times.
However, for tasks where every step is different, there may not be enough time to recover the cost of self-improvement. In the game’s quest experiment, Exo was actually more expensive than some comparison agents.
The system also worked less well with a weaker LLM. A weaker model made fewer useful edits and did not reuse its tools effectively.
5. Why are these findings important?
The results suggest that AI agents may not need to stay fixed while they work. Instead, they could gradually become better suited to their specific environment.
This could be useful for:
- Software development
- Customer-service systems
- Computer troubleshooting
- Scientific research
- Long-running business tasks
- Video games and simulations
A major benefit is that Exo can learn directly from the real task environment. It does not always need a large, carefully prepared training dataset.
For example, instead of training an agent in advance to solve every possible computer problem, the agent could notice repeated problems while working and create a tool for handling them.
The safety design is also important. Letting an AI edit itself could be dangerous if it accidentally deletes its memory or breaks its own control system. Exo reduces this risk by keeping history and approval mechanisms outside the editable part.
Conclusion
The paper presents Exo as a way for AI agents to improve their own tools, instructions, and strategies during ongoing work.
Its main idea is to give the agent freedom to change its working methods while protecting the most important parts of the system. Exo keeps a permanent record of what happened, saves earlier versions, and uses an independent guardian to decide whether a new version can run.
The experiments show that this approach can make agents cheaper and faster while keeping their accuracy about the same. The improvements are especially useful for long, repeated, or complicated tasks.
However, self-improvement is not automatically helpful. It requires an AI model capable of recognizing useful changes, and the early cost of making improvements may not be worthwhile for short or one-time tasks.
Overall, the research suggests a possible future in which AI systems do not simply follow fixed instructions. Instead, they could safely adapt their own tools and working methods as they gain experience.
Practical Applications
Immediate Applications
The paper’s architecture is already suitable for controlled deployments where agents operate in sandboxed, auditable environments and where policy changes can be reviewed or constrained by an independent guardian.
- Software engineering agents: adaptive debugging and coding workflows Sector: software development, DevOps, developer tools Agents can inspect and revise their own context assembly, shell workflows, debugging tools, memory retrieval, and planning procedures while working on a codebase. For example, an agent could detect repeated test commands, create a batching tool, and reuse it on subsequent issues. Potential products/workflows: self-optimizing coding assistants, repository-specific debugging tools, adaptive CI/CD agents, and code-review agents that build reusable project skills. Evidence: Continual Learning Bench results showed 14% lower model cost and 15% fewer shell steps while maintaining a 100% issue-resolution rate. Dependencies: The agent must have sufficient reasoning capability to recognize and reuse improvements; code execution must be sandboxed; changes require build, test, and security validation.
- Site reliability engineering and incident response Sector: cloud infrastructure, IT operations, cybersecurity operations An SRE agent can build incident-specific diagnostic tools, refine them after failures, and reuse them for later incidents. A protected event log would preserve commands, observations, remediation attempts, and costs even when the diagnostic policy is rolled back. Potential products/workflows: adaptive incident-snapshot tools, automated evidence collectors, self-improving runbooks, and deployment agents that specialize to a company’s infrastructure. Evidence: On SREGym, Exo reduced median diagnosis time by 35%, model rounds by 38%, and model cost by 35%. Dependencies: Production actions need strict authorization boundaries. Guardian checks should include tests in a staging environment, least-privilege credentials, rollback support, and explicit approval for changes affecting live services.
- Enterprise workflow and API automation Sector: enterprise software, finance operations, customer support, business process automation Agents handling calendars, payments, documents, CRM systems, or internal APIs can learn which API calls, documentation, and context are repeatedly useful. They can consolidate repeated discovery steps into reusable tools and optimize prompt construction for lower latency and cost. Potential products/workflows: adaptive back-office assistants, API-aware workflow agents, automated documentation retrievers, and organization-specific task orchestrators. Evidence: In AppWorld, Exo retained the same 96.9% pass rate while reducing held-out model cost by 61%, total learning-inclusive cost by 43%, and mean task time by 13%. Dependencies: API schemas must be sufficiently stable; all actions need authorization and transaction logging; financial or irreversible operations should require human confirmation or a stronger guardian.
- Cost and latency optimization for deployed agents Sector: AI infrastructure, cloud computing, model serving The protected history can expose token counts, cache usage, repeated tool calls, context composition, and execution time. An agent can use these signals to revise context compaction, memory retrieval, model selection, or tool batching. Potential products/workflows: runtime agent observability dashboards, automatic prompt/context optimizers, cache-aware model routers, and cost-based policy tuning. Dependencies: Cost annotations must accurately reflect provider pricing and caching behavior. Optimization should not reduce correctness, omit safety-relevant context, or favor cheap but unreliable actions.
- Open-source research and reproducible agent experimentation Sector: academia and AI systems research Researchers can use Exo’s policy/mechanism separation to study how agents learn tools, prompts, memory strategies, and improvement procedures during execution. Append-only histories and versioned artifacts support reproducible comparisons of successive policies. Potential products/workflows: research testbeds for runtime adaptation, trajectory-analysis tools, policy-diff viewers, and benchmark extensions that measure learning cost separately from task performance. Dependencies: Experiments require standardized logging, fixed model and pricing conditions, controlled environments, and careful separation between adaptation data and evaluation tasks to prevent leakage.
- Auditable agent governance and compliance Sector: policy, regulated industries, security, legal technology The architecture can provide an immutable record of model messages, tool calls, policy replacements, costs, and rollback events. Organizations can use this record for incident investigation, compliance reporting, and post-deployment model-risk analysis. Potential products/workflows: agent change-management systems, policy version registries, approval queues, compliance dashboards, and forensic replay tools. Dependencies: Append-only history must be protected from administrators or agents with excessive privileges. Logs may contain personal or confidential information, requiring access control, encryption, retention policies, and privacy-preserving inspection.
- Adaptive personal productivity assistants Sector: daily life, consumer software A personal assistant could learn recurring preferences and routines by creating reusable procedures—for example, summarizing a preferred set of messages, preparing a recurring travel plan, or organizing household tasks—without changing the underlying model weights. Potential products/workflows: personalized scheduling assistants, household administration agents, adaptive email triage, and local knowledge-management tools. Dependencies: Users must be able to inspect, approve, disable, and roll back policy changes. Access to email, calendars, finances, or smart-home devices requires strong credential isolation and clear consent.
- Adaptive educational tutoring and course support Sector: education A tutoring agent could revise how it presents explanations, retrieves prior student history, selects exercises, and identifies recurring misconceptions. The immutable learning record would help instructors inspect what strategies were attempted and whether they improved outcomes. Potential products/workflows: classroom-specific tutoring agents, adaptive feedback assistants, and teacher-facing systems that build reusable instructional tools. Dependencies: Educational effectiveness cannot be inferred solely from lower token cost. Human educators should supervise policy changes, and student data requires privacy protection, age-appropriate safeguards, and bias evaluation.
Long-Term Applications
The following applications would require stronger validation, broader deployment evidence, or research into safety, generalization, and governance before being used in high-stakes settings.
- Self-improving agents for healthcare operations Sector: healthcare Runtime adaptation could support clinical administrative workflows, medical-record retrieval, hospital scheduling, coding, or diagnostic evidence organization. An agent might learn to assemble the most relevant patient information or create specialized tools for recurring hospital procedures. Potential products/workflows: adaptive clinical documentation systems, hospital operations agents, and evidence-retrieval assistants. Dependencies: The agent must not autonomously modify clinical decision rules without independent validation. Deployment would require medical-device or clinical-software regulation, auditability, privacy protection, human oversight, and prospective safety trials. The paper’s results do not establish clinical reliability.
- Autonomous robotics and embodied systems Sector: robotics, manufacturing, logistics, agriculture Robots could revise task planners, sensor-processing pipelines, recovery routines, or manipulation tools as they encounter new objects and environments. Protected snapshots could allow rollback of software state and, where possible, restoration of a simulated or physical environment. Potential products/workflows: warehouse robots that learn site-specific routines, agricultural robots that adapt to crop conditions, and manufacturing agents that optimize inspection or assembly procedures. Dependencies: Physical actions are harder to reverse than sandbox operations. Guardians would need simulation trials, formal safety constraints, hardware watchdogs, geofencing, collision prevention, and independent emergency-stop mechanisms. Policies must account for external effects that cannot be rolled back.
- Energy-grid and industrial control optimization Sector: energy, utilities, industrial automation Agents could adapt forecasting, maintenance, anomaly-detection, and scheduling procedures based on observed operating conditions. Runtime learning might reduce the need for exhaustive benchmark environments in changing physical systems. Potential products/workflows: adaptive grid-monitoring agents, plant-maintenance assistants, and demand-response optimization systems. Dependencies: Safety, reliability, and regulatory requirements are substantially stricter than in the paper’s benchmarks. Candidate policies should be evaluated in digital twins and staged deployments, with independent control systems preventing unsafe commands or instability.
- Financial analysis and transaction operations Sector: finance, insurance, accounting Agents could develop reusable procedures for document extraction, reconciliation, claims processing, fraud investigation, or market-data analysis. Cost-aware context and tool adaptation could improve throughput across large collections of similar cases. Potential products/workflows: adaptive underwriting assistants, claims-processing agents, financial reconciliation tools, and compliance-investigation systems. Dependencies: Any agent capable of changing its own decision procedure requires model-risk governance, explainability, bias monitoring, immutable audit logs, segregation of duties, and human authorization for trades, payments, credit decisions, or claims outcomes.
- Autonomous cyber-defense and vulnerability response Sector: cybersecurity A defensive agent could create and refine evidence-collection tools, learn an organization’s infrastructure, and adapt its investigation policy to new attack patterns. The guardian mechanism could separate the authority to propose a remediation from the authority to deploy it. Potential products/workflows: self-improving SOC agents, adaptive threat-hunting playbooks, and automated containment systems. Dependencies: The same self-editing capability could produce unsafe scans, destructive remediation, or exploitable code. Strong capability isolation, signed policy updates, red-team testing, network segmentation, and human approval are necessary.
- Long-horizon autonomous research and engineering Sector: academia, scientific computing, R&D Agents working for weeks or months on experiments, simulations, or engineering designs could improve their own data-processing tools, experiment planners, context policies, and error-recovery routines during the project. This is especially relevant where representative benchmark suites are unavailable or rapidly become outdated. Potential products/workflows: self-improving laboratory assistants, simulation-management agents, automated theorem or code research systems, and persistent research project copilots. Dependencies: Scientific validity requires preventing the agent from optimizing only for internal efficiency metrics. Experiments need preregistered evaluation criteria, independent replication, provenance tracking, and safeguards against silently changing hypotheses or evaluation procedures.
- Federated transfer of specialized agent policies Sector: enterprise platforms, robotics, education, healthcare, cloud services The paper suggests that learned tools and policies can transfer to related tasks. A future platform could package a validated executor, its skills, and selected memories as a reusable domain module while retaining local data isolation. Potential products/workflows: organization-specific agent packages, validated “skill stores,” fleet-wide policy distribution, and site-to-site transfer learning without retraining model weights. Dependencies: Transfer quality depends on task similarity and environmental stability. Policy packages require compatibility testing, dependency management, provenance, tenant isolation, and safeguards against transferring unsafe assumptions or confidential information.
- Standardized runtime-adaptation benchmarks and policy certification Sector: policy and academia Current evaluations typically score fixed policies on predetermined tasks. The paper motivates benchmarks that separately measure initial performance, specialization cost, transfer performance, rollback behavior, safety of revisions, and long-term resource use. Potential products/workflows: certification suites for self-improving agents, public policy-revision datasets, guardian evaluation standards, and regulatory reporting formats. Dependencies: Benchmarks must represent realistic distribution shifts and prevent agents from overfitting to known task sequences. Certification should evaluate not only correctness but also unsafe edits, data retention, recovery after failure, and behavior under adversarial conditions.
- General-purpose self-maintaining digital services Sector: public services, enterprise platforms, daily life In the longer term, agents could maintain their own integrations, update operational procedures as interfaces change, and create replacement tools without requiring complete redeployment by developers. The protected mechanism layer would function as a stable operating substrate while the policy layer evolves. Potential products/workflows: self-maintaining customer-service systems, adaptive government-service portals, and personal agents that remain compatible with changing applications. Dependencies: This requires robust guardian design beyond build success, including behavioral trials, formal policy constraints, staged rollout, independent monitoring, and mechanisms for users or regulators to revoke changes. The paper explicitly notes an intelligence floor: weaker models may make edits without successfully reusing them, eliminating the expected benefits.
Glossary
- Adaptive control loop: A feedback system that adjusts its controller or policy based on observed execution results. “The external optimization systems described in \cref{sec:background-challenges} can be viewed through the lens of control theory as adaptive control loops”
- Append-only: A storage property allowing new records to be added but preventing existing records from being modified or deleted. “The storage contract requires this history to be append-only”
- Amortize: To distribute a one-time cost across repeated uses or tasks. “the quest-specific work leaves little opportunity to amortize specialization cost”
- Canonical execution history: The authoritative record of an agent’s messages, actions, results, and policy changes. “We show our chosen partition in \cref{fig:design-architecture}(a). Below the boundary, Exo protects the state and mechanisms needed to preserve continuity across self-edits. These are the canonical execution history”
- Compaction: The process of reducing or summarizing context so that it occupies fewer tokens. “These include tool implementations and selection; prompting; context assembly and compaction”
- Context assembly: The process of selecting and organizing information to provide as input to a LLM. “the agent can examine its execution history, including outcomes, model costs, and cache use, to identify improvements grounded in the environment where it actually works”
- Decoupled voter: An independent decision-making component that determines whether an action should be admitted or accepted. “LogAct couples a shared log with decoupled voters admitting task actions”
- Durable state: Information preserved across execution steps, policy replacements, or system restarts. “Here contains durable data, including history, memory, and artifacts”
- Exokernel: An operating-system architecture that provides minimal protected mechanisms while allowing applications to implement higher-level policies. “Inspired by operating systems work on separating policy from mechanism, particularly exokernels”
- Executor: The replaceable program that implements an agent’s harness policy. “We call the replaceable program that implements the agent's harness policy the executor”
- Fate-sharing: A dependency in which failures of one component can simultaneously disable another component that depends on it. “the resulting fate-sharing between the optimizer and the running system means that a faulty edit can disable both the agent and the logic needed to diagnose and repair it”
- Held-out task: An evaluation task withheld from the learning or development process and used to measure generalization. “AppWorld and SREGym then use held-out tasks without feedback”
- Homoiconic: Describing a system in which program code is represented in the same data structures that the system can inspect and manipulate. “Second, the harness is operationally homoiconic: its policy is code, and that code is represented as files the agent can observe and manipulate with its code-editing tools”
- Harness: The software layer surrounding a LLM that supplies context, tools, memory, and execution control. “We view the harness as the scaffolding surrounding the model that (1) assembles the model's input and (2) executes and observes actions on the environment”
- Harness policy: The programmable rules and procedures governing how an agent uses its model, state, and environment. “We use policy to refer to all of the programmable rules and procedures governing how an agent uses its model, state, and environment”
- Intelligence floor: A minimum level of model capability required for a system or technique to produce meaningful benefits. “we believe there is an intelligence floor necessary to reap the benefits of [PERSON_NAME]'s architecture”
- Legibility: The extent to which a system’s behavior, internal state, and changes can be inspected and understood. “flexibility, modifiability, and legibility must be elevated to first-class design principles”
- Model cost: The computational or monetary expense associated with language-model inference, often measured using token usage and pricing. “We report task outcomes alongside model cost and time”
- Optimizer symmetry: The property that policy-revision actions can be performed through the same action interface as ordinary task actions. “which we refer to as optimizer symmetry”
- Open-world environment: An environment with a large, changing state space in which agents can encounter dynamic conditions and pursue varied objectives. “We study long-task adaptation in RuneScape, a dynamic, open-world multiplayer role-playing game”
- Policy layer: The editable part of the agent architecture that specifies how the agent reasons, uses tools, assembles context, and improves itself. “Our key guiding design decision is to partition the harness into two distinct layers: a protected mechanism layer and an editable policy layer”
- Prefix relation: A mathematical relation in which one sequence is a beginning segment of another sequence. “where denotes the prefix relation”
- Protected mechanism layer: The non-editable system component responsible for preserving state and enforcing safety constraints. “Our key idea is to partition the agent into an evolvable policy layer and a minimal set of protected mechanisms necessary for safe operation”
- Runtime adaptation: Modification of an agent’s policy while it is actively executing a task. “runtime harness adaptation, where the running agent uses experience from ongoing work to revise the policy governing that work”
- Runtime state: The data describing an executing system at a particular point in time. “We take runtime state at step to be ”
- Sandbox: An isolated computational environment in which code or actions can run with restricted access to external resources. “ contains sandbox files, dependencies, and processes”
- Self-editing: The ability of an agent to inspect and modify the code implementing its own behavior. “To enable runtime self-editing on this architecture, we take two steps”
- Snapshotting: Saving a point-in-time copy of an environment or state so it can later be restored. “The sandbox API separately supports snapshotting and restoring the task environment”
- Specialization cost: The initial expense incurred while an agent develops tools or policies that improve later performance. “We call this early expense the "specialization cost", where self-improvement pays an early premium for improved later performance within the standalone execution”
- State transition: A change from one runtime state to another caused by an operation under a system’s transition rules. “We first model the system's runtime state and transitions”
- Token caching: Reusing previously processed model input to reduce inference cost or latency. “All costs use common token pricing that accounts for caching”
- Transfer run: An evaluation in which a learned policy or state is applied to a new task instance or environment. “for game objectives, a transfer run repeats the objective on a fresh account while retaining agent state”
- Versioned artifact store: Storage that preserves multiple historical versions of data or task artifacts for recovery. “along with a versioned artifact store that can hold arbitrary data such as memory, skills, or sandbox snapshots”
- Zero-shot held-out evaluation: Testing on withheld tasks without providing feedback or allowing further adaptation during evaluation. “AppWorld and SREGym then use held-out tasks without feedback”







