Skip to main content

Extropy

CI PyPI Python License

Predictive intelligence through agent-based population simulation.

Website · Announcement · CLI Reference · Architecture


Extropy creates synthetic populations grounded in real-world distributions, connects them in social networks, and simulates how they respond to events — each agent reasoning individually via LLM.

Simulate anything: Policy changes. Pricing decisions. Product launches. Crisis response. Any scenario where humans form opinions, make decisions, and influence each other.

Development Notice

[!CAUTION] "Extropy is still in active development and behavior may change between versions." For reliable execution and triage, we strongly recommend running Extropy through an agentic harness (for example: Codex or Claude Code) rather than manual ad-hoc CLI usage. Simulation can be expensive at scale (especially high-fidelity, multi-timestep runs). Start with small runs first; we recommend beginning at around 500 agents before scaling up.

Install

pip install extropy-run
export OPENAI_API_KEY=sk-...
# or: ANTHROPIC_API_KEY=... / AZURE_API_KEY=... + AZURE_ENDPOINT=...

Requires Python 3.11+. uv recommended.

Quick Start

# Create study folder and build population spec
extropy spec "Austin TX commuters" -o congestion-tax -y
cd congestion-tax

# Create scenario with events and outcomes
extropy scenario "Response to $15/day congestion tax" -o congestion-tax -y
extropy persona -s congestion-tax -y

# Sample agents and generate network
extropy sample -s congestion-tax -n 500 --seed 42
extropy network -s congestion-tax --seed 42

# Run simulation
extropy simulate -s congestion-tax --seed 42

# View results
extropy results
extropy results segment income

How It Works

  1. Population — LLM discovers attributes, researches real-world distributions, samples agents
  2. Network — Builds structural + similarity edges; edge types affect information flow
  3. Two-pass reasoning — Agent role-plays reaction, then classifier extracts outcomes
  4. Propagation — Opinions spread through network; agents update after hearing from peers

Features

Feature Description
Population
Any geography US, Japan, India, Brazil — define attributes with your distributions
Real grounding LLM researches actual demographics, cites sources
Household mode Correlated partners, NPC dependents, assortative mating
Agent focus Primary adult, couples, or full families as reasoning agents
Network
Structural edges Partner, household, coworker, neighbor, congregation, school parent
Similarity edges Acquaintances and online contacts from attribute similarity
Small-world Calibrated clustering coefficient and path lengths
Simulation
Two-pass reasoning Role-play first, classify second — reduces schema anchoring in outcome extraction
Conversations Agents talk to each other; both update state independently
Memory Persistent memory traces with fidelity-based prompt trimming
Conviction Affects sharing probability and flip resistance
THINK vs SAY Internal monologue separate from public statement
Timeline events New information injected at specified timesteps
Outcomes
Categorical Known decision space (buy/wait/skip)
Boolean Binary decisions (will share, will switch)
Float Intensity measures (sentiment, likelihood)
Open-ended Free text — discover categories post-hoc

Development

git clone https://github.com/exaforge/extropy.git && cd extropy
pip install -e ".[dev]"
pytest

License

MIT

Metadata

Release files for extropy-run 0.4.0

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

Source distribution (sdist)

Source distribution for extropy-run 0.4.0
File Size Uploaded
extropy_run-0.4.0.tar.gz 2.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for extropy-run 0.4.0
File Interpreter ABI Platform
extropy_run-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.5 MB

Release files / extropy_run-0.4.0.tar.gz

Download URL extropy_run-0.4.0.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
34231d7829b316141aac8d165f8f7ca48933d42390db6a3f97b47529d3429101
BLAKE2b-256 checksum
How to use checksums
58201c65688c915666faae935a4b9403c3cb4a9eefc0775d9b4f3b763039067e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 24, 2026.

Transparency log

Release files / extropy_run-0.4.0-py3-none-any.whl

Download URL extropy_run-0.4.0-py3-none-any.whl
Size 413.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8f0cb65354a0b21e985c8a7f73a91066ceafe5dfd17dc03a1dad6a129b3e0ee2
BLAKE2b-256 checksum
How to use checksums
7faf304cc0586efc55d6ab4585e0aa63ade75922491bcaaf5705386d615db68e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

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