Skip to main content

DPBench

A benchmark for evaluating coordination in multi-agent LLM systems under simultaneous resource contention.

DPBench

arXiv PyPI version Downloads License: MIT

Overview

DPBench adapts the Dining Philosophers problem into a controlled testbed where the action protocol, the communication structure, and the group size each vary independently. Each episode reports four metrics (deadlock rate, throughput, fairness, message-action consistency) with Wilson and t-based 95% confidence intervals. On a single model, the benchmark captures what changes when the protocol changes.

Read the full paper on arXiv.

Installation

pip install dpbench

Optional provider extras for the example experiments:

pip install "dpbench[openai]"
pip install "dpbench[anthropic]"
pip install "dpbench[google]"
pip install "dpbench[xai]"

Quickstart

from dpbench import Benchmark

def my_model(system_prompt: str, user_prompt: str) -> str:
    """Your LLM call here. Returns the agent's response as a string."""
    ...

results = Benchmark.run(
    model_fn=my_model,
    system_prompt="...",
    decision_prompt="...",
    philosophers=5,
    episodes=30,
    mode="simultaneous",
    communication=False,
)

print(f"Deadlock rate: {results['deadlock_rate']:.1%}")
print(f"Throughput:    {results['avg_throughput']:.3f}")
print(f"Fairness:      {results['avg_fairness']:.3f}")

Prompt templates used in the paper are in experiments/prompts/. Full parameter documentation is in the Benchmark.run docstring.

Reproducing the paper experiments

git clone https://github.com/najmulhasan-code/dpbench.git
cd dpbench
pip install -e .

# Provider API keys for the LLMs you want to evaluate
cp .env.example .env

python experiments/scripts/run.py
python experiments/scripts/aggregate.py
python experiments/scripts/generate_figures.py

Experiments are configured by experiments/configs/conditions.yaml and experiments/configs/models.yaml.

Citation

If you use DPBench in your work, please cite:

@misc{hasan2026dpbenchstructuraldeterminantsmultiagent,
      title={DPBench: Structural Determinants of Multi-Agent LLM Coordination Under Simultaneous Resource Contention},
      author={Najmul Hasan and Prashanth BusiReddyGari},
      year={2026},
      eprint={2602.13255},
      archivePrefix={arXiv},
      primaryClass={cs.AI},
      url={https://arxiv.org/abs/2602.13255},
}

License

Licensed under the MIT License.

Metadata

Release files for dpbench 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dpbench 0.2.1
File Size Uploaded
dpbench-0.2.1.tar.gz 28.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dpbench 0.2.1
File Interpreter ABI Platform
dpbench-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 59.5 kB

Release files / dpbench-0.2.1.tar.gz

Download URL dpbench-0.2.1.tar.gz
Size 28.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3687550fdbab32049cd4a2620f65d8a268152feeb792d96076becd679119b382
BLAKE2b-256 checksum
How to use checksums
0db20a654439ffaad0e61f09b36ee63b04dcd458049b932625a4ef29b793336a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.4

Release files / dpbench-0.2.1-py3-none-any.whl

Download URL dpbench-0.2.1-py3-none-any.whl
Size 30.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f306e2f2f5769728bb73a3573c58eee03d750e375a1451dcae225e697b7dcb0b
BLAKE2b-256 checksum
How to use checksums
b1b2d41173734bb19dfeef5c7dd617d00bdb7f4f39a0bb821a55d2171714d471
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page