TrafficClaw: Breaking the Silos of Urban Traffic Control with Unified LLM Agents
TrafficClaw: Generalizable Urban Traffic Control via Unified Physical Environment Modeling
TrafficClaw is a generalizable urban traffic control framework that utilizes an LLM-based agent operating within a unified physical environment. It integrates heterogeneous subsystems (signals, freeways, transit, taxis) into a shared dynamical system, achieving superior performance across various tasks compared to SOTA models like Gemini-3.1-Pro.
TL;DR
TrafficClaw is a groundbreaking framework that treats a city's various transportation modes—buses, taxis, subways, and traffic lights—as a single, interconnected physical system. By using an LLM agent equipped with executable reasoning and procedural memory, it moves past traditional "siloed" optimization to achieve a truly coordinated urban mobility strategy.
The Problem: A City is Not a Set of Isolated Tasks
Traditional Intelligent Transportation Systems (ITS) treat the city like a collection of independent puzzles. You have one algorithm for signal timing, another for bus schedules, and a third for ramp metering.
However, in the real world:
- If you change a bus schedule, you change the arrival patterns at intersections.
- If you optimize a freeway ramp, you potentially spill traffic back onto city streets.
Existing RL and Optimization methods require massive "reward engineering" for every new task and fail to generalize when moved from one city (e.g., Manhattan) to another (e.g., Queens).
Methodology: The "Physical" LLM Agent
TrafficClaw introduces three core innovations to solve the coupling problem:
1. Unified Physical Environment
Instead of separate simulations, TrafficClaw integrates all subsystems into a shared environment. This allows the agent to see how a "local" intervention (like changing a green light duration) propagates across the entire network.
2. Executable Spatiotemporal Reasoning
The agent doesn't just "predict" actions; it writes Python code to analyze the environment.
- : Analyzes network topology.
- : Extracts dynamic congestion patterns.
- : Estimates how one subsystem impacts another.

3. Procedural Spatiotemporal Memory (PSM)
This is the "secret sauce." The agent maintains a PSM that distills successful coordination strategies and failure modes from past episodes. It learns, for example, that "Aggressive bus scheduling during morning rush increases fuel consumption but is necessary for service reliability."
Experiments: Efficiency Through Cooperation
The authors tested TrafficClaw in high-fidelity SUMO simulations of Manhattan and Queens.
Key Result: System-Level Gains
When coordinating Bus Scheduling and Signal Control together, TrafficClaw achieved a "Pareto-superior" result. Specialized models often improved one metric while destroying another (e.g., reducing wait time but skyrocketing fuel use). TrafficClaw found the middle ground by understanding the physical coupling.

| Method | Bus-Signal (Travel Time) | Highway-Signal (Travel Time) |
|---|---|---|
| Classic Method | 486.65s | 462.73s |
| TrafficClaw | 459.87s | 451.85s |
Zero-Shot Generalization
One of the most impressive feats was TrafficClaw's ability to handle unseen tasks like Subway Scheduling and Ramp Metering without explicit training on those specific configurations, proving that its "reasoning" is truly generalizable.
Critical Insight: Why Agentic RL for Traffic?
The paper utilizes Group Relative Policy Optimization (GRPO). Unlike standard RL, which can be unstable in complex environments, GRPO allows the LLM to learn from a group of potential trajectories, rewarding the agent not just for speed, but for coordination quality. Using an "LLM-as-a-judge" to reward "system-level coherence" bridges the gap between raw data metrics and logical transportation engineering.
Conclusion
TrafficClaw proves that we don't need a 200B parameter model to solve traffic if we have a smart architecture. By giving a smaller 8B model the tools to write its own analysis and a memory to store its "wisdom," we can manage the complex, coupled dynamics of a modern metropolis more effectively than ever before.
Future Outlook: The next step is moving this from the SUMO simulator to real-world Digital Twins, where the "executable reasoning" can interface with actual municipal IoT sensors.
