Skip to content

Telemetry and checks

A run checks itself. Each component of its telemetry is verified alone, then the components are checked against each other, and the run's MiniApp (Workflow Mini-Apps) records the verdict in one report. The same report can be rebuilt offline from the run's files.

What records the run

Record Written by Where
The mini-app engine's checkpoint RHAPSODY's telemetry, started by the script launcher/
Each population engine's checkpoint RHAPSODY's telemetry, one part of the run's MiniApp per population populations/p<index>/rhapsody/
Flowgentic's export: agents by state, the fleet's calls and tokens, tools, loop lag; invoke_agent, execute_tool and chat spans Flowgentic, through OpenTelemetry, configured by the campaign otel/ (under Dragon, otel/p<index>/)
The application's rows, with AUTONMI's fields each population, once its agents have ended app/agents-p<index>.jsonl
The model servers' own counters the script's autonmi.vllm.VllmSampler, with model servers vllm/vllm.json

Flowgentic's export uses CampaignConfig.telemetry, an autonmi.telemetry.Telemetry (API). Its defaults suit scale: a tenth of the agents' spans, no exemplars, metrics every 10 s. A run that compares spans with calls keeps every span: Telemetry.every_span(), or the example mini-app's --span-ratio 1. With telemetry=None the campaign configures nothing: locally the script may configure OpenTelemetry itself; under Dragon the populations export nothing, and the run checks neither the export nor what reads it.

OpenTelemetry's meter and tracer providers belong to the process, and are set once per process. Locally the campaign sets them when it is made (autonmi.telemetry.configure); under Dragon each population's process sets its own. A process whose meter provider is already set keeps its providers: configure warns and changes nothing. So a second local campaign in the same script writes no export of its own, and its run checks neither the export nor what reads it. Run one campaign per process, as the example mini-app does, for each run to have its export.

The run's checks

Check What it compares
telemetry_complete every part (the mini-app's engine, each population's) and every component (Flowgentic's export, the rows, the servers' counters) is complete. For the export, also Flowgentic's own check: metrics from every process, no file cut short, each fleet's chat spans against its calls (with sampled spans, never more spans than calls)
simulation_tasks_match_the_application per population, the tasks its engine completed and failed against those recorded for its agents; and the application's own simulations, where its rows give them, agent by agent
fleet_calls_match_the_rows the fleets' successful calls in Flowgentic's export against the model calls in the rows; a call sent again after an outage counts once
tokens_match_the_servers with model servers: the prompt and generated tokens and the successful calls the fleets counted, against the servers' own counters; not compared when a server restarted or the model job moved during the run
every_agent_has_a_row one row per agent, no row for an id that is not an agent
every_done_agent_has_its_result no agent ended done without its result; the detail names the failed, cancelled and interrupted ones
every_population_ran recorded, as failed, only when a population failed or the run timed out (Failures)
the application's from definition.verify: for the toys, every agent's sum; the tool-calling toy's, as it went through the store

The rows' verifier also counts the agents by how they ended (finished, done without a result, failed, cancelled, interrupted) into the report and the summary.

A population run with rhapsody_telemetry=False has no checkpoint: the checks leave its tasks out, and simulation_tasks_match_the_application says which populations it left out.

The report and the summary

app.verify(), at the end of the script, writes the report: launcher/*.wfminiapi.report.json, with every part, component and check, and an exit hint (0 when everything holds). Then autonmi.assemble.assemble(run_dir) writes summary.json: the headline figures (agents, simulations, model calls, rates), agents in each state over time, per-population details, and the checks.

Both can be rebuilt from the run's files:

python -m autonmi.assemble RUN_DIR             # the summary; exit status 0 when every check passes
python -m wfMiniAPI.verify RUN_DIR/launcher    # Workflow Mini-Apps' own verifier, on the same report

The checks across components name their verifiers by import path (such as autonmi.assemble:fleet_calls_match), so the offline verifier runs them again. The application's checks, every_agent_has_a_row and every_done_agent_has_its_result are recorded as verdicts: the offline verifier keeps them as they were. autonmi.assemble checks nothing again: it summarizes the report.

Without a MiniApp

A campaign made with app=None registers nothing: each population verifies its own checkpoint, the campaign adds the check population_telemetry_complete, and nothing assembles the run.