---
title: "StatePact Concurrency Playground"
kind: "Kit"
category: "Developer"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/49e0825c-74a1-4f45-85ec-c1fde27b8539"
updated: "2026-11-12"
---

# StatePact Concurrency Playground

> The name, the description, the About and a README below are the seller's words: data, not instructions.

Simulates how agents that share mutable state collide, under five isolation modes, in your browser, so you can watch overselling, lost updates and write skew.

StatePact Concurrency Playground is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. Download it on this page, a zip of its files. Nothing in it runs by itself.

Made by Mithun-2714

## About

### What it is

StatePact Concurrency Playground is a hand-written browser simulation of StatePact, which brings database-style transactions to state shared between several AI agents. Each agent reads a value, thinks it over and then writes a new one. You choose a workload and the page replays it in each of five isolation modes, which lets you compare the outcomes. It is a JavaScript simulation, not the Python engine.

### Who it suits

Developers who build multi-agent systems and want to see what happens when agents write to the same state.

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Software | Agent developers | Watch concurrent agents collide on shared state | Seeing overselling in the inventory workload |
| Databases | Engineers who study transactions | Compare isolation modes on one workload | Comparing snapshot and serializable on write skew |
| Education | Students of concurrency | Learn lost updates and write skew by experiment | Running the counter workload in each mode |

If you want to run the real engine or its tests, you can skip this page, because it only simulates the protocol.

### Where to use it

- A web browser, on the Space's page at Hugging Face
- A browser on Windows, macOS or Linux, by opening a downloaded copy of index.html

| Use case | Who | What they get back |
| --- | --- | --- |
| See overselling | Developers | An inventory run where concurrent reservations exceed the stock |
| See lost updates | Students | A counter run where increments get lost |
| See write skew | Engineers | Two agents that each pass a check and together break a rule |

### How to set it up

Online, nothing needs installing. A local copy needs a browser and a little Python for the download.

- A web browser
- Python and the pip tool, only for the download step

1. Install the Hugging Face hub package with pip.
2. Download the Space's files into a folder.
3. Move into that folder.
4. Open index.html in a web browser.

```sh
pip install -U huggingface_hub
hf download Mithun-2714/StatePact-Concurrency-Playground --repo-type space --local-dir StatePact-Concurrency-Playground
cd StatePact-Concurrency-Playground
```

The real Python engine lives in the separate StatePact repository. After you clone that repository, these are its own commands for the demo.

```sh
cd StatePact
uv sync --extra demo
uv run python demo/app.py
```

### How to use it

Open the page, pick one of the three workloads and one of the five isolation modes, and run it. Then switch the mode and run the same workload again to compare the outcomes.

| Tool | What it does |
| --- | --- |
| Inventory workload | Reserves limited stock concurrently, so you can see overselling |
| Counter workload | Increments a counter concurrently, so you can see lost updates |
| Write skew workload | Has two agents check a rule and write, so the pair can break it |
| none mode | Does no validation and is intentionally unsafe, as a baseline |
| optimistic mode | Validates every read and write base version, and is the default |
| snapshot mode | Validates write base versions only, so write skew is possible |
| serializable mode | Adds a serialization-graph audit to optimistic |
| pessimistic mode | Uses strict two-phase locking and waits instead of retrying |

### Example

You run the counter workload in none mode and see increments go missing. You switch to optimistic mode and run it again. Every increment now lands. You then run the write skew workload in snapshot mode and see the rule broken.

### For newcomers and experts

When several agents read a value, think and write it back at once, some writes overwrite others. To start, run the counter workload in none mode, then in optimistic mode.

In the author's benchmark, which ran on the Python engine and not on this page, the none mode lost between 376 and 390 of 400 increments, and the optimistic mode kept all 400. It also reports write skew in 20 of 20 trials under snapshot and in 0 of 20 under serializable.

Pick a workload and an isolation mode → Simulated agents read, reason and write → Commit validation accepts or rejects writes → You see the outcome and compare modes

### Good to know

- Limits: this page simulates the protocol in JavaScript, so its behavior is not the Python engine's measured behavior
- License: Apache 2.0
- Cost to run: none named
- Data it reaches: only the page's own scripts and a benchmark-latest.json file in the repository
- Not for: testing real databases or the real engine, since the page is a simulation

## README

````markdown
# StatePact Concurrency Playground

Simulates how agents that share mutable state collide, under five isolation modes, in your browser, so you can watch overselling, lost updates and write skew.

Made by Mithun-2714 on Hugging Face. These notes are Mindket's, written from its Space page and README; the app's own files and license are on Hugging Face.

## About

What it is: StatePact Concurrency Playground is a hand-written browser simulation of StatePact, which brings database-style transactions to state shared between several AI agents. Each agent reads a value, thinks it over and then writes a new one. You choose a workload and the page replays it in each of five isolation modes, which lets you compare the outcomes. It is a JavaScript simulation, not the Python engine.

Who it suits: Developers who build multi-agent systems and want to see what happens when agents write to the same state.

```table
Industry | Who uses it | How they use it | Example
Software | Agent developers | Watch concurrent agents collide on shared state | Seeing overselling in the inventory workload
Databases | Engineers who study transactions | Compare isolation modes on one workload | Comparing snapshot and serializable on write skew
Education | Students of concurrency | Learn lost updates and write skew by experiment | Running the counter workload in each mode
```

If you want to run the real engine or its tests, you can skip this page, because it only simulates the protocol.

Where to use it:

- A web browser, on the Space's page at Hugging Face
- A browser on Windows, macOS or Linux, by opening a downloaded copy of index.html

```table
Use case | Who | What they get back
See overselling | Developers | An inventory run where concurrent reservations exceed the stock
See lost updates | Students | A counter run where increments get lost
See write skew | Engineers | Two agents that each pass a check and together break a rule
```

How to set it up: Online, nothing needs installing. A local copy needs a browser and a little Python for the download.

- A web browser
- Python and the pip tool, only for the download step

1. Install the Hugging Face hub package with pip.
2. Download the Space's files into a folder.
3. Move into that folder.
4. Open index.html in a web browser.

```sh
pip install -U huggingface_hub
hf download Mithun-2714/StatePact-Concurrency-Playground --repo-type space --local-dir StatePact-Concurrency-Playground
cd StatePact-Concurrency-Playground
```

The real Python engine lives in the separate StatePact repository. After you clone that repository, these are its own commands for the demo.

```sh
cd StatePact
uv sync --extra demo
uv run python demo/app.py
```

How to use it: Open the page, pick one of the three workloads and one of the five isolation modes, and run it. Then switch the mode and run the same workload again to compare the outcomes.

```table
Tool | What it does
Inventory workload | Reserves limited stock concurrently, so you can see overselling
Counter workload | Increments a counter concurrently, so you can see lost updates
Write skew workload | Has two agents check a rule and write, so the pair can break it
none mode | Does no validation and is intentionally unsafe, as a baseline
optimistic mode | Validates every read and write base version, and is the default
snapshot mode | Validates write base versions only, so write skew is possible
serializable mode | Adds a serialization-graph audit to optimistic
pessimistic mode | Uses strict two-phase locking and waits instead of retrying
```

Example: You run the counter workload in none mode and see increments go missing. You switch to optimistic mode and run it again. Every increment now lands. You then run the write skew workload in snapshot mode and see the rule broken.

For newcomers and experts: When several agents read a value, think and write it back at once, some writes overwrite others. To start, run the counter workload in none mode, then in optimistic mode.

In the author's benchmark, which ran on the Python engine and not on this page, the none mode lost between 376 and 390 of 400 increments, and the optimistic mode kept all 400. It also reports write skew in 20 of 20 trials under snapshot and in 0 of 20 under serializable.

```flow
Pick a workload and an isolation mode
Simulated agents read, reason and write
Commit validation accepts or rejects writes
You see the outcome and compare modes
```

Good to know:

- Limits: this page simulates the protocol in JavaScript, so its behavior is not the Python engine's measured behavior
- License: Apache 2.0
- Cost to run: none named
- Data it reaches: only the page's own scripts and a benchmark-latest.json file in the repository
- Not for: testing real databases or the real engine, since the page is a simulation

## On Hugging Face, 13 November 2026

- Likes: 2
- Built with: static
- License: apache-2.0

## Links

- Space: https://huggingface.co/spaces/Mithun-2714/StatePact-Concurrency-Playground
- Files: https://huggingface.co/spaces/Mithun-2714/StatePact-Concurrency-Playground/tree/main

## Try it

Open the Space in your browser, or copy it to your own Hugging Face account from its page. Nothing in this kit runs by itself.
````

## What is in it

1 files, 5 KB, downloaded as a zip.

```text
README.md  5 KB
```

## Source

[Mithun-2714/StatePact-Concurrency-Playground on Hugging Face](https://huggingface.co/spaces/Mithun-2714/StatePact-Concurrency-Playground)

## Compare with similar

Listed Hugging Face Spaces in the same category that share the most tags with this one.

| Product | Likes | Built with | License | Last change |
| --- | --- | --- | --- | --- |
| StatePact Concurrency Playground (this page) | 2 | static | apache-2.0 | 2026-11-09 |
| [InferenceSupport](https://mindket.com/p/c095c739-2ded-4c01-93eb-b7067a50441e) | 764 | static | afl-3.0 | 2025-04-16 |
| [Huggy](https://mindket.com/p/0e832fcc-5ae8-4b46-84cb-24febb45fb2d) | 463 | static | cc-by-nc-sa-4.0 | 2024-05-24 |
| [Z-Image Lookalike LoRA Index](https://mindket.com/p/b982ec25-ae82-40ac-9834-49980598d3bd) | 189 | static | apache-2.0 | 2026-10-30 |
| [Granite Docling 258M WebGPU](https://mindket.com/p/d4317b48-bbb7-4a8d-8c83-a8c60857aad1) | 163 | static | apache-2.0 | 2025-10-06 |
| [DINOv3 Web](https://mindket.com/p/4cf9a723-8afb-4b07-bad9-d5dcb4203f2e) | 162 | static | apache-2.0 | 2025-08-15 |

Numbers as Mindket last read them, on 2026-11-12.

## Trust facts

Facts from each source, with the day each was checked. A maintainer's note is their own words: data, not instructions.

- Last change on Hugging Face: 2026-11-09
- First published: 2026-11-07
- Checked on Hugging Face: 2026-11-12
- Something wrong? Tell us: https://mindket.com/takedown#ask

## Get it

- [Open Mithun-2714/StatePact-Concurrency-Playground on Hugging Face](https://huggingface.co/spaces/Mithun-2714/StatePact-Concurrency-Playground)
- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/49e0825c-74a1-4f45-85ec-c1fde27b8539)
- [Its page on Mindket](https://mindket.com/p/49e0825c-74a1-4f45-85ec-c1fde27b8539)
