Project Description
AgentSim is an agent-based, event-driven simulation framework built in Java to serve as the simulation engine behind a cloud-native simulation platform. Its purpose is to run large-scale scenarios, such as energy-system planning, operations, and optimization, while keeping simulations repeatable, observable, extensible, and controllable across different time semantics (real-time, accelerated, discrete time, and continuous time).
AgentSim provides two complementary capabilities:
- A full simulation runtime (agents, event scheduling, messaging, observability, plugins, snapshot/restore).
- Software-in-the-Loop (SiL) utilities that make external software “simulation-ready” by injecting a simulation-controlled clock and complementary scheduler, so the same control logic can run in wall clock time or simulation time without software rewrites.


Limitations of Today’s Agent-based Simulation Engines
- Simulation-readiness gap: Real-world software often couples tightly to wall-clock time (e.g.
System.currentTimeMillis(),Thread.sleep, built-in schedulers). AgentSim decouples time from the OS by enabling injected clocks/schedulers and simulation-controlled time providers. - Reproducibility gap: Optimization and validation require deterministic replay. AgentSim supports deterministic ordering, controlled RNG with export/import, and snapshot/restore of runtime state. Snapshotting also enables scenario branching at points of interest in the simulation to examine alternative simulation configurations.
- Integration gap: Complex simulations need structured interaction and observability. AgentSim provides a hierarchical message bus for state publishing, runtime metrics, and plugins.
- AI gap: Well-known simulation engines does not yet provide modern AI features and integrations such as LLM support and MCP tooling to assist in simulation development.
The Current Features of AgentSim
- Large-scale scenario simulation with thousands of interacting agents and events.
- Optimization-friendly execution, supporting parameter analysis, Monte Carlo runs, and reproducible baselines.
- Flexible time control to support:
- near real-time ‘digital-twin’ execution,
- accelerated “fast-forward” simulation,
- deterministic, stepwise discrete simulation,
- continuous simulation to allow integration with continuous engines.
- Cloud-native integration via message-based state streaming.
- Extensibility through a plugin-based architecture.
- Observability of the runtime- and agent state.
- Operational robustness with scheduled start, pause/resume/stop and snapshot/resume for long-running jobs.


Future Goals
AgentSim’s long-term direction is to enable the development of a full simulation application platform that makes it easier to build, reuse, and deploy simulation apps for people without specialized technical skills in these areas.
This vision is driven by the following strategic development of the AgentSim cloud platform:
1) Develop agent-based simulation apps from high-level specifications
Goal: Enable developers to create complete simulation applications from a high-level specification (guided by architecture principles), using an agentic code assistant to generate the app scaffolding, component reuse, wiring and integration with external systems.
Provided value:
- Lowers the barrier between simulation model development and deployment.
- Standardizes architecture across simulation apps (consistent patterns for messaging, plugins, observability, time control).
- Rapid iteration: “spec → runnable simulation → validate → refine”.
2) Marketplace for reusable, versioned simulation assets
Goal: Establish a marketplace of reusable building blocks: agents, plugins, connectors, and protocols, that can be shared across simulation developers to enable reuse across simulation apps.
Provided value:
- Build new simulation models by composing validated components:
- select assets (and versions) via agentic programming/prompting,
- integrate them into a new simulation app.
- Improves quality and speed by reusing validated models and connectors.
- Encourages an ecosystem: domain experts publish assets; others assemble solutions.
3) Integration with external simulators (co-simulation)
Goal: Integrate with well-known external simulators, e.g. computer network simulators (NS-3) and power grid simulators (PowSyBl) to support scenarios at various abstraction levels.
Provided value:
- Combine agent-based behavior (DERs, markets, consumers, aggregators) with grid constraints (power flow, contingencies, limits). A grid adapter plugin encapsulates grid simulator execution and exposes it via a protocol. AgentSim orchestrates multi-agent decisions, invokes grid solves at defined step phases, and feeds results back to agents
- Run studies like congestion management, flexibility dispatch, resilience, and planning with behavioral feedback loops.