📈 GH Trending Explorer 🎲 Surprise me

← all repos

ruyue0001 / trace2env

git clone https://github.com/ruyue0001/trace2env.git

Agentic Language World Models

+8
stars, 24h · #4,040
+~58
stars, 7 days · #3,486
+105
stars, 30 days · #6,770
105
★ total · +58% this week
19
forks · 0 open issues

Star history (as recorded here)

2026-10-20 · 80 ★ 2026-10-23 · 105 ★
LanguagePython
LicenseApache-2.0
Created2026-10-04 (18d ago)
Last push6d ago
Watchers10
OwnerUser

Links

README excerpt
From Traces to Agentic Worlds: Agentic Language World Models for Interactive Environment Simulation 
 Build world model agents that serve as environments for other agents. 
## 🧩 Trace2Env Overview
- **Trace2Env** is a training-free framework for **agentic world modeling**, designed for faithful, stateful, and long-horizon simulation of textual environments.
- Environments built with Trace2Env can be used to train agents without the real system, test agents in safe and reproducible sandboxes, build stateful mocks for tools and APIs, or reconstruct unavailable, private, or legacy environments.
- Trace2Env does not recover the original executable system. Instead, it automatically reconstructs a model of the environment dynamics from observed action–observation trajectories.
- Trace2Env is not tied to a particular environment domain. The paper evaluates it on terminals, software repositories, Android and web apps, enterprise services, and text games. The same framework can be applied to other text-interactive systems, including internal enterprise tools, ticketing workflows, cloud and DevOps consoles, API and MCP backends, and other textual worlds.
 🕹️ A Terminal simulated entirely by a world model agent. 
 ▶ Try the live playground → 
Specifically, Trace2Env works in two phases:
1. **Offline reconstruction.** Past trajectories are processed and organized into a **worldbook** containing environment schemas, transition rules, constraints, invariants, observation contracts, grounded evidence, and demonstrations. Check out what a worldbook looks like here.
2. **Agentic simulation.** A **world model agent** actively calls tools to inspect the worldbook, together with the maintained episode state and episodic memory, and infers the next observation together with the state changes that should persist. A shared runtime harness verifies the proposal against the schemas, rules, and invariants and commits the accepted changes, so the consequences of a task agent's action carry into later turns.
### ✨ Highlights
- **Build from tens of traces.** Worldbook construction needs only recorded interactions, not access to the original executable environment, its source code, dependencies, or infrastructure.
- **Agentic world modeling.** The world model agent actively consults the knowledge needed for each action instead of relying on a single flattened environment prompt.
- **Stateful, long-horizon simulation.** Verified state changes persist across turns, allowing the simulated environment to preserve the consequences of earlier actions throughout an interaction.
- **Evaluated as a world model.** Trace2Env supports both next-observation prediction (Qwen-AgentWorld) and successive interaction with the world model to evaluate its long-horizon consistency.
## 📰 News
- 🏆 **[2026-10]** Trace2Env (gpt-5.6-sol) ranks first on the AgentWorldBench leaderboard
 on Papers with Code with an overall score of **63.40** across all seven domains (MCP, Search, Terminal, SWE, Android,