scikit-agent
A scientific Python toolkit for agent-based economic modeling: build models from modular blocks, solve them with deep learning or classical numerical methods, and simulate.
📖 Documentation · Quickstart · Examples · API Reference
Quick example
import skagent as ska
from skagent.models.consumer import cons_problem, calibration
# `cons_problem` is a prebuilt consumption-saving model. Supply a decision
# rule for the control `c` and simulate a population of agents forward.
simulator = ska.MonteCarloSimulator(
calibration=calibration,
block=cons_problem,
dr={"c": lambda m: 0.9 * m},
initial={"k": 1.0},
sample_count=1000,
T_sim=50,
seed=42,
)
simulator.initialize_sim()
history = simulator.simulate()
The Quickstart goes further, solving the model for an optimal policy instead of hand-coding a rule.
scikit-agent is a scientific Python toolkit for agent-based economic modeling and multi-agent systems design. It provides a unified interface for creating, analyzing, solving, and simulating models using neural, symbolic, and numerical techniques.
Our goal is for scikit-agent to be for computational social science what
scikit-learn is for machine learning.
Key Features
- 🧱 Modular modeling system. Construct multi-agent environments from composable blocks of structural equations.
- ⚡ Solution algorithms. Solve models with deep-learning methods (following Maliar, Maliar, and Winant, 2021), value backwards induction, and reinforcement learning via Stable-Baselines3.
- 📊 Simulation tools. Generate synthetic data and run policy experiments with a Monte Carlo engine.
- 🐍 Built on Scientific Python and PyTorch for easy integration with the wider Python ecosystem.
Installation
uv add scikit-agent
Or, outside a uv project, uv pip install scikit-agent (or plain
pip install scikit-agent).
For a development installation (uv required):
git clone https://github.com/scikit-agent/scikit-agent.git
cd scikit-agent
uv sync --extra test --extra docs
See the documentation for the user guide, a gallery of runnable examples, and the full API reference.
Metadata
Release files for scikit-agent 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| scikit_agent-0.2.0.tar.gz | 484.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scikit_agent-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 684.2 kB
Release files / scikit_agent-0.2.0.tar.gz
| Download URL | scikit_agent-0.2.0.tar.gz |
|---|---|
| Size | 484.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7d6f5de7b5f076334031bd66a7a7c00844187143aa9e9d102fc4ac842237113c
|
|
BLAKE2b-256 checksum How to use checksums |
5714efb3a2a186cdcb634ec5d60e19b05759122a4f6d1d0e9837241e875e4b45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 30, 2026.
Transparency logRelease files / scikit_agent-0.2.0-py3-none-any.whl
| Download URL | scikit_agent-0.2.0-py3-none-any.whl |
|---|---|
| Size | 199.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30f7d6e7be229ef1ec2226095585c72a2e473383d70eb9d7958dae0fa0146cf0
|
|
BLAKE2b-256 checksum How to use checksums |
faa03d5e1bd038d6d6f30d173c6701d8f291e93c947a7d0a984b0c9d4d5bcd13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 30, 2026.
Transparency log