llmsim: Parallel Discrete-Event Simulation for the Free-Threaded Python Era
llmsim is a parallel discrete-event simulation (DES) library I am building for Python 3.14+. It keeps the generator-as-process model that SimPy proved out over fifteen years, and rebuilds everything else for the modern CPython concurrency era: a fully typed, __slots__-based sequential core, and parallelism from share-nothing architecture — independent event loops with explicit, narrow communication points. The project is approaching its 1.0 release: the core and all three parallelism tiers are implemented and gated by determinism tests in CI. The build itself was also an experiment in spec-driven development with a coding agent, which gets its own section below. This post walks through the design, the engineering decisions behind it, and the two example simulations included with it.
Despite the name, the core library has nothing to do with calling LLMs. The name reflects two bookends: one of the two examples simulates an LLM-serving agentic workload, and the post-1.0 roadmap adds LLM-powered scenario generation — strictly at design time, never inside a running simulation.