Predictive intelligence through agent-based population simulation
Project description
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.
Install
pip install extropy-run
export OPENAI_API_KEY=sk-...
Requires Python 3.11+. uv recommended.
Quick Start
STUDY=runs/congestion-tax && DB=$STUDY/study.db && mkdir -p $STUDY
# Build population + network
extropy spec "500 Austin TX commuters" -o $STUDY/base.yaml -y
extropy extend $STUDY/base.yaml -s "Response to $15/day congestion tax" -o $STUDY/population.yaml -y
extropy sample $STUDY/population.yaml --study-db $DB --seed 42
extropy network --study-db $DB -p $STUDY/population.yaml --seed 42
# Run simulation
extropy scenario -p $STUDY/population.yaml --study-db $DB -o $STUDY/scenario.yaml -y
extropy simulate $STUDY/scenario.yaml --study-db $DB -o $STUDY/results --seed 42
# Results
extropy results --study-db $DB
extropy results --study-db $DB --segment income
How It Works
- Population — LLM discovers attributes, researches real-world distributions, samples agents
- Network — Connects agents by similarity; edge types affect information flow
- Two-pass reasoning — Agent role-plays reaction, then classifier extracts outcomes
- 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 — eliminates central tendency bias |
| Conversations | Agents talk to each other; both update state independently |
| Memory | Full reasoning history with emotional trajectory |
| 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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file extropy_run-0.3.0.tar.gz.
File metadata
- Download URL: extropy_run-0.3.0.tar.gz
- Upload date:
- Size: 2.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d88280162ee9ce313ead4d23e3fec514b060c87dc787b3331f9ca1664b79a164
|
|
| MD5 |
eef52f8f9f9c8c3f34fe3b257c70a8a3
|
|
| BLAKE2b-256 |
b83972da569a27831de3310843a7eda591672511b0ed5e3ee12ae1726bb926b3
|
Provenance
The following attestation bundles were made for extropy_run-0.3.0.tar.gz:
Publisher:
publish.yml on exaforge/extropy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
extropy_run-0.3.0.tar.gz -
Subject digest:
d88280162ee9ce313ead4d23e3fec514b060c87dc787b3331f9ca1664b79a164 - Sigstore transparency entry: 954378367
- Sigstore integration time:
-
Permalink:
exaforge/extropy@a92426e6ecf882b7caed2d9baad5c06f5562159b -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/exaforge
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a92426e6ecf882b7caed2d9baad5c06f5562159b -
Trigger Event:
release
-
Statement type:
File details
Details for the file extropy_run-0.3.0-py3-none-any.whl.
File metadata
- Download URL: extropy_run-0.3.0-py3-none-any.whl
- Upload date:
- Size: 347.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18c74c9b88821b0e5c234c542b24e47c97f4eb595064a2e1793902e6c041c531
|
|
| MD5 |
8a2f70aefdde93ca6e35b9d7a0fc18af
|
|
| BLAKE2b-256 |
cd18779fe29e8a8cc73c87ee1fafd3d43150c3d583ac94a657969546d808ed12
|
Provenance
The following attestation bundles were made for extropy_run-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on exaforge/extropy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
extropy_run-0.3.0-py3-none-any.whl -
Subject digest:
18c74c9b88821b0e5c234c542b24e47c97f4eb595064a2e1793902e6c041c531 - Sigstore transparency entry: 954378368
- Sigstore integration time:
-
Permalink:
exaforge/extropy@a92426e6ecf882b7caed2d9baad5c06f5562159b -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/exaforge
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a92426e6ecf882b7caed2d9baad5c06f5562159b -
Trigger Event:
release
-
Statement type: