AEWM: Agent-Editing World Model

AEWM is a world model that judges and edits an agent's decisions, rather than predicting tool responses. Built on Qwen3.5-35B-A3B, it combines Action Judge (AJ) and State Revision (SR) to improve long-horizon reasoning and tool use across Search, Terminal, and Software Engineering (SWE). Its inference framework, EditAct, integrates these capabilities into an agent's interaction with the real environment.

Paper (arXiv link forthcoming) AEWM model on Hugging Face Action Judge Benchmark on Hugging Face Code on GitHub

Model Overview

Property Description
Base model Qwen3.5-35B-A3B
Capabilities Action Judge and State Revision in one checkpoint
Domains Search, Terminal, and Software Engineering
Training Cross-domain mid-training followed by supervised fine-tuning
Release format Full model weights in Hugging Face Safetensors format
Inference framework EditAct

This checkpoint serves as the world model, alongside a separate agent that proposes reasoning and actions.

Method: Editing Decisions, Not Simulating Observations

Long-horizon agents can suffer from task-state contamination: unsupported assumptions become accepted facts, outdated plans persist, and partial progress is mistaken for completion. Subsequent actions may appear locally reasonable while reinforcing an incorrect understanding of the task.

AEWM addresses this problem by modeling how an agent's reasoning and actions shape task progress. Given the observed history and a candidate decision, it judges the decision's contribution and, when necessary, supplies a revised reasoning-action continuation.

Action Judge

AJ classifies a proposed decision into one of three action types:

  • Critical: directly advances the task toward completion.
  • Exploratory: gathers relevant information or tests a plausible approach without yet making decisive progress.
  • Noisy: is redundant, irrelevant, or misleading in the current task context.

This judgment determines whether to retain the proposal or intervene. At inference time, AJ uses only information available before the candidate action is executed.

State Revision and EditAct

For a noisy decision, SR produces revised reasoning and action from the same observed history. It directly edits the continuation that enters the agent's execution loop, rather than merely adding a critique or asking the agent to try again.

EditAct runs four steps:

  1. Propose: the agent generates its next reasoning and action.
  2. Judge: AEWM classifies the proposal using the current task history.
  3. Edit: retain critical or exploratory decisions; revise noisy ones.
  4. Execute: run the selected action with real tools, then append the selected continuation and actual feedback to history.

AEWM training and the EditAct inference framework

Method overview from the paper: learning Action Judge and State Revision, integrating them into EditAct, and transferring guided behavior back into an agent through AEWM-RFT.

Training

AEWM is trained in two stages. Mid-training uses approximately 52B tokens of cross-domain agent trajectories, AJ supervision, and SR supervision. Supervised fine-tuning uses 120K curated examples: 60K AJ and 60K SR examples, with 40K examples per domain.

AJ supervision labels decisions using trajectory evidence and consistency checks. SR supervision pairs agent proposals with corrected reasoning-action continuations from the same history. Quality filtering checks annotation consistency and revision quality. The resulting checkpoint supports both judgment and revision across different tool interfaces.

AEWM-RFT is a separate use of the method: an agent is fine-tuned on verified EditAct trajectories to internalize useful editing behavior. The model in this repository is AEWM itself, used for online judgment and revision.

Evaluation Highlights

Action Judge Benchmark

The AEWM Action Judge Benchmark contains 3,000 annotated decisions, with 1,000 each from Search, Terminal, and SWE. It evaluates decision classification before execution, reporting accuracy and macro-F1.

Action Judge macro-F1 across Search, Terminal, SWE, and Overall

AEWM achieves 70.5% overall macro-F1, exceeding the strongest compared baseline, DeepSeek-V4-Pro (59.9%), by 10.6 percentage points. Its macro-F1 scores are 60.9% on Search, 72.1% on Terminal, and 77.8% on SWE. Overall metrics pool all 3,000 decisions.

End-to-End Agent Performance

The paper evaluates EditAct with Qwen3.5-4B, Qwen3.5-9B, and Qwen3.5-35B-A3B on BrowseComp, DeepSearchQA, Terminal-Bench 2.0, SWE-bench Pro, Doc2Repo, and NL2Repo.

backbone ReAct Strongest baseline average EditAct Gain over strongest baseline
Qwen3.5-4B 28.5 35.1 41.8 +6.7
Qwen3.5-9B 34.5 38.9 44.1 +5.2
Qwen3.5-35B-A3B 42.2 45.6 48.8 +3.2

Paper results: mean score (%) across the six benchmarks. The strongest baseline is selected by its six-benchmark average among ReAct, step-level Best@3, and trajectory-level Best@3. Gains are absolute percentage points.

Using the Model

Serve this checkpoint with a backend that supports Qwen3.5 reasoning and native tool calls, then connect it to the EditAct framework. The agent and AEWM use separate OpenAI-compatible endpoints. Set the world-model endpoint as follows, matching WM_MODEL to the name configured by your serving backend:

export WM_MODEL="RUC-AIBOX/AEWM"
export WM_BASE_URL="http://localhost:30001/v1"
export WM_API_KEY="EMPTY"

EMPTY is only for an endpoint without authentication. Configure the agent and tools separately, following the repository's quick start. Use the provided domain-specific AJ/SR prompts and preserve reasoning and tool-call fields; a generic chat prompt is not equivalent to the evaluated workflow.

The framework provides editact_for_search, editact_terminal, and editact_for_swe scaffolds. Search requires search and webpage-reading services; Terminal and SWE require an execution sandbox. The standalone Action Judge evaluator instead classifies recorded decisions without executing tools.

Downloads last month
190
Safetensors
Model size
35B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for RUC-AIBOX/AEWM

Finetuned
(169)
this model

Collection including RUC-AIBOX/AEWM