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},
agent_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, solving, and simulating economic models using modern computational methods — including deep learning — alongside more traditional 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.
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 scikit_agent-0.1.0.tar.gz.
File metadata
- Download URL: scikit_agent-0.1.0.tar.gz
- Upload date:
- Size: 308.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50d96caffcf36a29e49ed0dd0d5126409769e41168e2613af0e44957d6f4c3b7
|
|
| MD5 |
0fad7b60fe34e38d9bffed19ff9b5d59
|
|
| BLAKE2b-256 |
3aa536d0527037d2fcaf4367ded1debca804918ef7d479df5dce279e431434be
|
Provenance
The following attestation bundles were made for scikit_agent-0.1.0.tar.gz:
Publisher:
cd.yml on scikit-agent/scikit-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scikit_agent-0.1.0.tar.gz -
Subject digest:
50d96caffcf36a29e49ed0dd0d5126409769e41168e2613af0e44957d6f4c3b7 - Sigstore transparency entry: 2439354397
- Sigstore integration time:
-
Permalink:
scikit-agent/scikit-agent@fc5facfe1f28eab09f75b105b8a96a8678eee293 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/scikit-agent
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@fc5facfe1f28eab09f75b105b8a96a8678eee293 -
Trigger Event:
release
-
Statement type:
File details
Details for the file scikit_agent-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scikit_agent-0.1.0-py3-none-any.whl
- Upload date:
- Size: 137.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89d0cd394e3df7b9f60d806f84dbe9021c75668d4c1004f7832e17039a592bc6
|
|
| MD5 |
2c5c9da6c8cae1316844b934efed6116
|
|
| BLAKE2b-256 |
04d17946e16fd0a1ebe609f3e334ae477bc4559471b7f2e24d275b576685549e
|
Provenance
The following attestation bundles were made for scikit_agent-0.1.0-py3-none-any.whl:
Publisher:
cd.yml on scikit-agent/scikit-agent
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scikit_agent-0.1.0-py3-none-any.whl -
Subject digest:
89d0cd394e3df7b9f60d806f84dbe9021c75668d4c1004f7832e17039a592bc6 - Sigstore transparency entry: 2439354467
- Sigstore integration time:
-
Permalink:
scikit-agent/scikit-agent@fc5facfe1f28eab09f75b105b8a96a8678eee293 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/scikit-agent
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
cd.yml@fc5facfe1f28eab09f75b105b8a96a8678eee293 -
Trigger Event:
release
-
Statement type: