Welcome to pymdp's documentation!¶
pymdp is a Python package for simulating Active Inference agents in
discrete-state Markov Decision Process environments. For background and
motivation, see the companion JOSS paper:
pymdp: A Python library for active inference in discrete state spaces.
This documentation focuses on the JAX backend (the default backend since the 1.0.0 release), which supports:
- accelerator-friendly execution (CPU/GPU/TPU) and JIT compilation
- differentiable workflows via autodiff
- scalable batched simulations and model-fitting workflows (for example, with NumPyro or pybefit)

Start here¶
- Installation
- Quickstart (JAX)
- NumPy/legacy to JAX migration guide
- Using rollout() for compiled active inference loops
- PymdpEnv and custom environments
- Thinking in generative models in
pymdp - Notebook gallery
API reference¶
Legacy docs¶
Legacy/NumPy material is preserved under an archive path: