arXiv(opens in a new tab)cs.CLOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.06100

From Traces to Agentic Worlds: Agentic Language World Models for Interactive Environment Simulation

Quanyu Long, Xiao Chen, Jianda Chen, Haozhen Zhang, Qisheng Hu, Jianzhu Bao, Wenya Wang

Quanyu Long 1^{1}, Xiao Chen 2^{2}, Jianda Chen 1^{1}, Haozhen Zhang 1^{1}, Qisheng Hu 1^{1}, Jianzhu Bao 1^{1} and Wenya Wang 1^{1}

1^{1}Nanyang Technological University, 2^{2}The Hong Kong Polytechnic University

Code: https://github.com/ruyue0001/trace2env

Realistic environment replicas are increasingly valuable for training and evaluating LLM agents, yet the original systems may be inaccessible or impractical to reproduce. We explore agentic language world modeling: rather than rebuilding an executable environment, a world model agent serves as the environment for a task agent and supports faithful and stateful simulation. We instantiate this paradigm with Trace2Env, a learning-free framework for settings where the original system is unavailable but historical interaction traces remain accessible. Trace2Env reconstructs these traces into a reusable environment worldbook containing environment schemas, grounded evidence, and induced behavioral knowledge. At runtime, the world model agent actively consults the worldbook together with persistent episodic state to infer each action's observation and lasting state effects. Across nine environments, Trace2Env improves both next-observation fidelity and long-horizon interaction consistency over conventional prompt-based language world models. In multi-turn interaction, task agent actions generated against Trace2Env remain valid more often when replayed in the real environment, indicating that its simulated dynamics better preserve the consequences of earlier actions across successive turns. These results establish agentic language world modeling as an alternative direction for building realistic environment replicas without reconstructing the original executable system.

1. Introduction

Interactive agents rely on environments that respond to their actions and preserve their consequences over time. Realistic replicas of such environments are increasingly valuable for training, evaluating, and testing agents without repeatedly interacting with the original systems. However, reproducing a terminal, software workspace, or enterprise internal system may require unavailable code, data, or infrastructure. Historical interactions, by contrast, often remain accessible: they record actions, observations, failures, and the consequences of earlier actions. This raises an opportunity to recover reusable environment knowledge directly from traces, even when the original environment itself cannot be reproduced.

Recent work shows that trajectories can be distilled into reusable skills and structured knowledge (Ma et al., 2026; Ni et al., 2026; Tang et al., 2026), while Terminal-Universe reconstructs executable terminal workspaces from agent trajectories (Wu et al., 2026). However, faithfully rebuilding a complex environment may still require implementation details and dependencies that are absent from the traces. Rather than reconstructing the original system through reverse engineering, we consider an alternative: recover a behavioral specification of the environment from these traces and use a language world model to simulate how the environment would respond to new

Corresponding author(s): quanyu001@e.ntu.edu.sg; wangwy@ntu.edu.sg

Figure

Figure 1 | From interaction traces to an agent-operated simulated environment. Trace2Env reconstructs traces into a reusable environment worldbook containing schemas, grounded evidence, and induced behavioral knowledge. During simulation, a task agent supplies actions, while a world model agent actively consults the worldbook together with the current episode state and episodic memory to infer their consequences and predict the resulting observations.

actions. Language world models (LWMs) (Li et al., 2026; Zuo et al., 2026) cast this simulation as next-observation prediction: given a textual description of the environment, the interaction history, and a task agent's action, a LWM predicts the observation that the real environment would return.

However, faithful simulation requires long-horizon state continuity, since an action may change the environment in ways that become relevant only many turns later. For example, deleting report.txt may produce no informative output, yet a later cat report.txt should return a missing-file error (Figure 1). Merely revisiting past observations need not reveal this latent consequence; the simulator must infer the state change when it occurs and preserve it for subsequent interactions. In the conventional prompting formulation, environment knowledge and interaction history are supplied together as context for prediction, placing heterogeneous knowledge and long-horizon state into a flattened prompt. This makes simple prompting poorly suited to reliable multi-turn simulation, where the simulated environment must respond consistently across successive task agent actions and preserve the consequences of earlier interactions.

To address these issues, we propose an agentic language world model that treats environment simulation itself as an agentic task. Instead of asking a language model to infer the next observation from a fixed prompt, we equip a dedicated world model agent with externalized environment knowledge that it can inspect as needed. This perspective motivates two questions:

Can one agent serve as the environment for another? And can existing traces alone provide what that agent needs to know?

The task agent decides what action to take, while a separate world model agent determines how the simulated environment responds (Figure 1). Crucially, the world model agent has no direct access to the original environment. Instead, it actively seeks trace-derived environment knowledge relevant to the current interaction, combines it with the current episode state and memory, and reasons over these resources before producing the environment's response.

We instantiate this idea with Trace2Env, a learning-free framework that converts historical interaction traces into a structured worldbook and lets an agentic LWM operate it. Offline, Trace2Env preserves concrete behavioral evidence while inducing reusable environment knowledge into schemas, grounded evidence, and induced behavioral abstractions. Schemas define the action interface and the kinds of state the simulator can represent; grounded evidence preserves observed transitions and detailed demonstrations; induced knowledge captures recurring rules, response contracts, invariants and constraints. The resulting worldbook is not an executable reconstruction of the original system, but a trace-grounded behavioral resource that the simulator can inspect at different levels of abstraction. At runtime, the world model agent actively consults this worldbook together with explicit episode state and episodic memory. For each task agent action, it proposes both the resulting observation and the state changes that should persist, while a shared harness checks and commits the transition. This separation allows the same worldbook to support multiple simulated episodes and runtime backbones, while each episode preserves the consequences of its own interaction history.

We evaluate Trace2Env on nine environments under two complementary settings: single-step next-observation fidelity and multi-turn interaction consistency. For next-observation prediction, we measure whether the simulated response matches the real environment in format, factuality, consistency, realism, and overall quality. We observe that Trace2Env improves all five dimensions over conventional LWM prompting. For multi-turn interaction, we test whether a task agent's behavior inside the simulated environment remains valid when replayed in the real environment. We find that Trace2Env preserves real-environment behavior by reconstructing a worldbook from traces and carrying state consequences forward through persistent state and episodic memory.

Taken together, we explore agentic language world modeling as a new direction for supporting faithful and consistent simulated interaction. By allowing a world model agent to actively reason over reconstructed worldbook and persistent episode state, this paradigm offers a path toward realistic environment replicas without reconstructing the original executable system.

References (19)