Traffic simulation is important for transportation optimization and policy making. While existing simulators such as SUMO and MATSim offer fully-featured platforms and utilities, users without too much knowledge about these platforms often face significant challenges when conducting experiments from scratch and applying them to their daily work. To solve this challenge, we propose TrafficSimAgent, an LLM-based agent framework that serves as an expert in experiment design and decision optimization for general-purpose traffic simulation tasks. The framework facilitates execution through cross-level collaboration among expert agents: high-level expert agents comprehend natural language instructions with high flexibility, plan the overall experiment workflow, and invoke corresponding MCP-compatible tools on demand; meanwhile, low-level expert agents select optimal action plans for fundamental elements based on real-time traffic conditions. Extensive experiments across multiple scenarios show that TrafficSimAgent effectively executes simulations under various conditions and consistently produces reasonable outcomes even when user instructions are ambiguous. Besides, the carefully designed expert-level autonomous decision-driven optimization in TrafficSimAgent yields superior performance when compared with other systems and SOTA LLM based methods.
Traffic simulation is of paramount importance as a critical platform for optimizing transportation infrastructure development, refining traffic management policies, and enhancing overall travel efficiency [2,25]. Furthermore, traffic simulation plays a vital role across various interdisciplinary fields [36], such as modeling dynamic human flow in urban planning, or simulating vehicle movement patterns for environmental monitoring and management. Given this significant value, numerous traffic simulation platforms have emerged, each designed for specific formatting and modeling needs, including tools like SUMO [2], MATSim [25], CityFlow [35], and MOSS [36]. These platforms offer diverse tools to address and optimize various traffic-related challenges.
However, the effective use of these existing platforms relies heavily on expert knowledge [14,25,32]. This dependence creates significant barriers for many users, particularly those from interdisciplinary backgrounds, resulting in several key difficulties: preparing simulation data is challenging, intervening in the simulation process is complex, and interpreting and optimizing the simulation results is often difficult. These issues severely limit the practical application of these platforms and hinder the effective optimization of real-world problems.
In recent years, the emergence of Large Language Models, endowed with vast common sense and powerful reasoning and planning capabilities, has made it possible to build automated workflows for complex real-world tasks. This approach has seen rapid development in fields such as WebAgent [12,38] and CodingAgent [18,30], with notable examples like WebArena [38] and SWE-Agent [30]. This success has inspired researchers in the transportation domain, leading to several new works, including TrajAgent [9], ChatSUMO [14], and SUMO-MCP [32]. However, TrajAgent [9] focuses on modeling movement trajectories, such as mobility data generation, and does not directly support traffic simulation. While both ChatSUMO [14] and SUMO-MCP [32] support SUMO-based traffic simulation, they are limited to the automated execution of a fixed set of scenarios and parameters. Crucially, they all lack systematic automatic optimization and feedback capabilities, preventing effective iterative improvement and optimization.
To address the aforementioned challenges, we propose Traf-ficSimAgent, a novel LLM based multi-agent framework for autonomous traffic simulation. Specifically, TrafficSimAgent introduces three core components: first, it defines and abstracts API functions, decoupling them from the underlying traffic simulation platform and packaging them as MCP Functions to support automatic calling by the LLM Agents; second, it features a Task Understanding and Autonomous Planning module that automatically interprets vague natural language instructions, enabling the agent to freely combine underlying functional modules and break away from the fixed workflows, which significantly enhances the generality and adaptability of the automated simulation system to different scenarios; and finally, integrated with the simulation process, it includes a built-in system optimization module that supports both a full-stack automatic optimization driven entirely by LLM and a two-layer optimization logic combining the LLM’s strengths with classical low-level optimization algorithms.
The main contributions of this paper are summarized as follows: • To the best of our knowledge, we are the first to propose an autonomous traffic simulation agent capable of both automatic optimization and scenario generalization.
Data config • We introduce a set of Abstracted API Functions, decoupled from the underlying traffic simulation platform and exposed via the MCP interface, establishing a foundational infrastructure for general-purpose autonomous traffic simulation. • We design a novel Task Understanding and Autonomous Planning module that supports the interpretation of ambiguous natural language instructions and enables multi-scenario generalization, thus allowing the system to adapt to diverse environments. • We propose an Embedded Optimization Module featuring a two-layer optimization system: one based on fully autonomous LLM-driven optimization, and another combining the LLM with classical algorithms. This enables self-optimization of the simulation and performance improvement. • Extensive experiments demonstrate the generalization and stability of our proposed framework across various simulation scenarios. Furthermore, its automatic optimization capability enables automated, iterative performance improvement tailored to specific task requirements.
TrafficSimAgent is designed as a collaborative multi-agent framework that bridges natural language instructions and traffic simulation execution. As shown in Figure1, our framework consists of four core modules working together:
LLM agents act as experiment planners and optimizers. According to the general implementati
This content is AI-processed based on open access ArXiv data.