Skip to main content
Back

HKUST's TrafficClaw Teaches AI to Control an Entire City at Once

TrafficClaw is the first LLM agent framework to control traffic signals, freeways, transit, and taxis together as one coupled physical system

Pro

  • First unified LLM agent for city-scale traffic: TrafficClaw controls signals, freeways, transit, and taxis as one coupled system, not in isolation.
  • Two-tier memory architecture: An episode cache (ESCC) handles within-episode reasoning; a Procedural Spatiotemporal Memory (PSM) persists strategies across episodes.
  • Multi-stage training: Supervised learning on diverse trajectories followed by agentic RL with system-level reward signals enables cross-subsystem coordination.
  • Benchmarked on NYC: Tested across Manhattan and Queens in SUMO simulator across six tasks; held-out tasks (ramp metering, subway scheduling) used to measure generalization.
  • Outperforms specialized baselines: Beats SUMO-MCP, DeepSeek-V3.2, and o4-mini on joint multi-subsystem performance metrics.
  • Open source: Full code available at github.com/usail-hkust/TrafficClaw; works with pluggable LLM backends.

Every city is a machine with interdependent parts. Change a traffic signal in Manhattan and you shift freeway on-ramp pressure. Reroute a bus line and taxi demand spikes elsewhere. Yet almost every AI system built for urban traffic treats each of these subsystems in isolation, as if the city were a collection of independent puzzles rather than one tightly wound clock. A new paper from HKUST proposes TrafficClaw, a framework that breaks that assumption entirely.

The isolation problem that nobody solved

Urban traffic control spans heterogeneous subsystems including traffic signals, freeways, public transit, and taxi services, yet existing optimization-based, reinforcement learning, and emerging LLM-based approaches are largely designed for isolated tasks, limiting both cross-task generalization and the ability to capture coupled physical dynamics across subsystems. This is not a minor gap. LLM-based traffic agents such as TrafficGPT and SUMO-MCP achieve strong results in traffic signal control, which aligns with their specialized design, but their performance degrades when extended to tasks in other subsystems like bus scheduling or taxi dispatching, indicating limited cross-task generalization. This highlights a key limitation of task-specific designs: strong local optimality does not translate to system-level effectiveness.

Unlike loosely coupled digital environments, urban mobility emerges from the interaction of multiple traffic subsystems and mobility demand fluctuations that share physical infrastructure and spatiotemporal constraints. That coupling is exactly what makes this problem hard for standard RL or prompt-based LLM agents: an action taken at one node ripples through the rest of the network in ways that are difficult to model without a shared environment.

One environment to rule them all

The authors argue that effective system-level control requires a unified physical environment in which subsystems share infrastructure, mobility demand, and spatiotemporal constraints, allowing local interventions to propagate through the network. To this end, they propose TrafficClaw, a framework for general urban traffic control built upon a unified runtime environment.