TL;DR
This paper introduces Real-Time Reasoning Gym, a benchmark where environments evolve independently of an agent's "thinking" time. To solve this, the authors propose AgileThinker, a dual-thread architecture that balances deep planning with rapid reaction. By allowing a fast reactive thread to "peek" at the partial outputs of a slow planning thread, AgileThinker consistently outperforms traditional single-paradigm agents in dynamic, high-pressure scenarios.
What Problem Does This Paper Address?
Most current Large Language Model (LLM) benchmarks are "turn-based": the world freezes while the model generates a response. In reality, the world is messy and moving. If an autonomous car takes ten seconds to "reason" about a hazard, the hazard has already passed—or caused a collision.
The authors identify a fundamental trade-off in agent design:
- Reactive Agents: These are fast but shallow. They use small token budgets to ensure timely responses but often fall into "greedy" traps because they lack long-term foresight.
- Planning Agents: These are deep but slow. They can perform complex reasoning (like Chain-of-Thought), but by the time they finish "thinking," the environment state they were reasoning about is obsolete.
The challenge is to build agents that can perform real-time reasoning—making logical judgments that are also timely enough to be useful in an evolving environment.
Methods: The AgileThinker Architecture
The authors propose AgileThinker, an architecture inspired by dual-process theory (the "System 1" and "System 2" of human cognition).
Unlike prior methods that run these systems in sequence, AgileThinker runs them in parallel threads:
- The Planning Thread ($\mathcal{P}$): An LLM that continuously generates long-horizon reasoning traces and action plans based on a "frozen" snapshot of the environment.
- The Reactive Thread ($\mathcal{R}$): A faster LLM that must produce an action within a strict time budget. Crucially, this thread has access to the partial, streaming output of the Planning Thread.
By referencing the planner’s ongoing "thoughts," the reactive thread can make informed, strategic decisions without waiting for the planner to finish its entire computation.
Datasets: Real-Time Reasoning Gym
The authors introduce the Real-Time Reasoning Gym, featuring three classic games adapted for real-time constraints:
- Freeway: Navigating a character across a busy highway (focuses on avoiding dynamic hazards).
- Snake: Collecting food that disappears over time (focuses on seizing transient opportunities).
- Overcooked: A two-player cooperative game (focuses on coordinating with a dynamic partner).
In this gym, the environment state updates at a fixed rate. If the agent hasn't produced an action by the deadline, a "default" action is executed. To ensure results are reproducible regardless of hardware, the authors use token count as a proxy for time.
Key Insights and Results
- The "Stale Data" Trap: Planning agents fail not because they are "dumb," but because they are oblivious. While they spend thousands of tokens reasoning about a move, the environment has already changed, making their final plan useless.
- The Power of Peeking: The reactive thread doesn't need a completed plan to improve. Even seeing the first few steps of a planner's logic allows the reactive thread to pivot its immediate strategy.
The authors evaluated agents across varying levels of cognitive load (task difficulty) and time pressure (tokens allowed per environment step):
- Superior Performance: AgileThinker consistently outperformed all baselines. In medium-difficulty settings, it showed up to a +35% improvement over the best single-paradigm method.
- Robustness: As time pressure increased (moving from 32k tokens/step down to 4k), the performance of planning agents plummeted, while AgileThinker remained relatively stable.
- Real-World Validation: The token-based simulation correlates almost perfectly ($R^2 = 0.9986$) with actual wall-clock time using the DeepSeek API, proving the framework's practical relevance.
Limitations and Future Work
- Model Dependency: AgileThinker currently relies on open-source models because they provide transparent, streamable reasoning traces. Proprietary models that hide their "thinking" process are harder to integrate.
- Coordination Overhead: The optimal "budget" for the reactive thread to peek at the planner varies by environment and currently requires empirical tuning.
- Future Directions: The authors suggest training "urgency-aware" LLMs that can natively adjust their reasoning depth based on environmental feedback, potentially merging the two threads into a single, more flexible system.
Summary updated