pymdp offers a suite of robust, tested, and modular routines for simulating active inference agents equipped with partially-observable Markov Decision Process (POMDP) generative models. Mathematically, a POMDP comprises a joint distribution over observations o, hidden states s, control states u and hyperparameters : P (o, s, u, ). This joint distribution further factorizes into a set of categorical and Dirichlet distributions: the likelihoods and priors of the generative model. With pymdp, one can build a generative model using a set of prior and likelihood distributions, initialize an agent, and then link it to an external environment to run active inference processes -all in a few lines of code. The Agent and Env (environment) APIs of pymdp are built according to the standardized framework of OpenAIGym commonly used in reinforcement learning, where an agent and environment object recursively exchange observations and actions over time