Skip to main content
Foundation is an open-source Python framework for building flexible, modular, and composable environments that model socio-economic behaviors and dynamics in a society with both agents and governments. It is the simulation engine underlying the AI Economist research project from Salesforce Research. Foundation exposes a Gym-compatible API—reset and step—so any multi-agent RL library can drive the simulation without modification.

The AI Economist research

Foundation was created to support research into AI-driven economic policy design. The framework has been used in three published papers:

Architecture overview

The simulation lives in ai_economist/foundation/ and is organized into five cooperating layers: All classes are accessed through registries:

Gym-style API

Every Scenario instance exposes the standard two-method loop:
obs, rew, and done are dictionaries keyed by agent index (and "p" for the planner). This makes Foundation easy to integrate with RLlib, WarpDrive, or any other multi-agent training framework.

Included scenarios

Four scenarios ship with the package:

Installation

Install Foundation via pip or from source, and verify your setup.

Quickstart

Create your first environment, run a reset/step loop, and inspect observations.

GitHub

Browse the source code, file issues, and read the contribution guide.

Slack community

Join the AI Economist Slack to discuss research and get help.

License and ethics

Foundation is released under the BSD-3-Clause License. The authors have published Simulation Cards that cover the intended use and ethical review of the framework and its COVID-19 extension.