ERF Agentic Workflow¶
NOTE: This section is a work in progress and will be continually updated as appropriate.
AMReX-Agent is an agentic AI workflow for amrex-based simulation codes. Since ERF is based upon the AMReX library, one may utilize the AMReX-Agent software to automate ERF simulations and postprocess results. Here, we provide a brief overview of how to utilize the AMReX-Agent code but refer the interested readers to the ERF agent demo for more details.
Basic Set up¶
Clone the
AMReX-Agentsoftware
git clone --recursive https://github.com/AMReX-Codes/amrex-agent.git
cd amrex-agent
git checkout 6e77ca3
Set up your API key
export CBORG_API_KEY=<your_key_name>
Clone
ERFand export the path (recommended to add export to .bashrc)
git clone https://github.com/erf-model/ERF.git --recursive
export ERF_REPO_PATH=<path_to_ERF>
Set up the environment
conda env create -f environment.yaml
conda activate amrex-agent-dev
Build ERF schemas and indices
bash demo/setup_demo_database.sh --code erf --force-rebuild
Prompt the
AMReX-Agent. Example here requests a local simulation that runs a 2D squall line with 4 ranks and plots the cloud water
python amrex_agent.py --run_ntasks 4 --indexing-strategy simple --inputs-file-strategy llm_compare \
--json --prompt "Run a 2D squall line simulation with Kessler microphysics, open x boundaries, \
and HO outflow aloft. Run the simulation for 10000 steps and visualize the cloud water."