Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/salesforce/ai-economist/llms.txt

Use this file to discover all available pages before exploring further.

Foundation requires Python 3.7 or later. No GPU is needed to run the simulation; a GPU is only required if you plan to accelerate RL training with WarpDrive.

Install via pip

The quickest way to install Foundation is from PyPI:
pip install ai-economist
This installs version 1.7.1 along with all required dependencies (NumPy, SciPy, Pandas, Matplotlib, and others listed in requirements.txt).

Install from source

Installing from source lets you edit the framework code and run the included tutorials.
1

Clone the repository

git clone https://github.com/salesforce/ai-economist
2

Create and activate a conda environment

conda create --name ai-economist python=3.7 --yes
conda activate ai-economist
Add the following alias to your ~/.bashrc or ~/.bash_profile for quick access:
alias aiecon="conda activate ai-economist; cd <local path to ai-economist>"
Then run aiecon once to activate the environment and change to the project directory.
3

Install the package

Choose one of the two approaches:
cd ai-economist
pip install -e .
The editable install (-e .) is recommended because it keeps the installed package in sync with any source edits you make.
4

Verify the installation

conda activate ai-economist
python -c "import ai_economist"
No output means the import succeeded. If you see an ImportError, double-check that the conda environment is active and that the install step completed without errors.

Optional: GPU-accelerated training with WarpDrive

Foundation integrates with WarpDrive, a high-throughput multi-agent RL framework that runs thousands of environment rollouts in parallel on a single GPU. To enable WarpDrive support, install the extra package:
pip install rl-warp-drive
WarpDrive requires a CUDA-capable GPU. It is not needed to run or explore Foundation simulations—only for large-scale GPU training.

Dependencies

The key runtime dependencies installed by pip install ai-economist are:
PackageVersionPurpose
numpy1.21.0Array operations throughout the simulation
scipy1.6.3Statistical distributions and signal processing
pandas1.2.4Dataset handling (COVID-19 data)
matplotlib3.2.1Visualization utilities
pyyaml5.4.1Configuration file parsing
All pinned versions are in requirements.txt.

Build docs developers (and LLMs) love