Getting started¶
This page installs AUTONMI and runs a campaign on a laptop, with a stub model and no Dragon. You need Python 3.12 or 3.13, uv and git.
Install¶
AUTONMI is on PyPI:
To run the examples and the tests on this page, install from a clone of the repository instead. From its root:
requirements.txt pins these versions, all from PyPI:
| Package | Pinned at | Why |
|---|---|---|
| Flowgentic | 0.7.1 | the agent loop, task tools on AsyncFlow, the runner API, the telemetry reader, and the loop's store calls off the event loop |
| AsyncFlow | 0.8.0 | the joinable shutdown |
| RHAPSODY | 0.8.0 | the native Dragon backend with hosts=, and the telemetry of each engine |
| Workflow Mini-Apps | 0.3.0 | MiniApp for runs of many engines |
opentelemetry-sdk, cloudpickle |
released | the OpenTelemetry export; simulations on spawned processes |
The conformance kit's check of a mini-app script's shape needs Workflow Mini-Apps from a clone, as CI installs it. Without one, that check is skipped:
git clone https://github.com/radical-cybertools/workflow-mini-apps ../workflow-mini-apps
git -C ../workflow-mini-apps checkout v0.3.0
uv pip install --no-deps -e ../workflow-mini-apps
Runs under Dragon need Dragon and RaDEX, which are in neither AUTONMI's dependencies nor the
requirements: install them where you run under Dragon. Dragon is on PyPI (pip install dragonhpc);
AUTONMI was tested with Dragon 0.15. RaDEX is not on PyPI: install it from its source, as
its README says.
A first run¶
A campaign of the conformance kit's toy application, 100 agents in two populations, with its stub
model (docs/examples/toy_campaign.py). Each agent asks the model how many numbers to double, doubles
them as tasks on its population's AsyncFlow engine, and reports their sum:
"""The smallest campaign: the conformance kit's toy application, 100 agents in 2 populations."""
import asyncio
from concurrent.futures import ThreadPoolExecutor
from radical.asyncflow import WorkflowEngine
from rhapsody.backends import ConcurrentExecutionBackend
from autonmi import Campaign, CampaignConfig
from autonmi.conformance.toy import Toy
async def main() -> bool:
"""Run the campaign, and return whether every check passes."""
backend = await ConcurrentExecutionBackend(ThreadPoolExecutor(4))
flow = await WorkflowEngine.create(backend=backend, work_dir="runs/toy") # AsyncFlow's files, in the run
campaign = Campaign(flow, Toy(agents=100), CampaignConfig(run_dir="runs/toy", populations=2))
try:
await campaign.start_services()
await campaign.run()
await campaign.stop_services()
return campaign.check()
finally:
await campaign.close()
await flow.shutdown()
if __name__ == "__main__":
print("checks pass:", asyncio.run(main()))
It takes a second or two and ends with checks pass: True. On a machine without NVIDIA's management
library, RHAPSODY first warns that its GPU metrics are disabled; the run is not affected. The run
directory, runs/toy, holds one run: remove it before you run the script again.
A mini-app¶
The example mini-app runs an application, with the run's report (Workflow Mini-Apps'
MiniApp). Its default application is the kit's tool-calling toy, whose agents
look a number up on an MCP server, double it and the next ones as tasks, and report their sum:
It takes a few seconds and ends with:
[miniapp] checks pass; telemetry complete; runs/miniapp-200-20261125T004240
[miniapp] assembled: 200 agents, 700 simulations, 1300 model calls; checks pass
The exit status is 0 when every check passes and the telemetry is complete. The run directory describes what the run wrote, and the command line the mini-app's options.
Read the run's summary again from its report, and verify the report with Workflow Mini-Apps' verifier:
.venv/bin/python -m autonmi.assemble runs/miniapp-200-20261125T004240
.venv/bin/python -m wfMiniAPI.verify runs/miniapp-200-20261125T004240/launcher
Run the tests¶
As CI runs them. The Dragon tests skip without Dragon:
Next¶
- The mini-app: what a mini-app's script does.
- Write an application: your own agents, checked with the conformance kit.