Core Concepts
Warpmetrics models your AI agent workflows as a hierarchy of primitives. Understanding these concepts will help you get the most out of the platform.
The hierarchy
Every agent execution is modeled as a tree. Runs contain groups and calls. Groups contain calls and other groups. Outcomes can be attached at any level. Acts connect one run to the next.
Run
├── Group (planning phase)
│ ├── Call (gpt-4o)
│ └── Call (gpt-4o)
├── Group (execution phase)
│ ├── Group (sub-task)
│ │ └── Call (gpt-4o-mini)
│ └── Call (gpt-4o)
├── Outcome ("failed")
└── Act ("retry")
└── Run (follow-up attempt)Concepts
The top-level unit of work. One run per agent execution — a support ticket, a code review, a data pipeline job.
Logical phases within a run. Organize calls into steps like planning, execution, and review. Supports nesting.
Individual LLM API invocations. Automatically captured with full context: messages, response, tokens, cost, latency.
Named results on any entity. The bridge between 'the agent ran' and 'it worked.' Drives success rate tracking.
Actions taken after outcomes. Connect retries, refinements, and iterations into traceable chains across runs.
Quick reference
run(label, opts?)Create a top-level runwm_run_group(target, label, opts?)Create a group inside a run or groupwm_grp_call(target, response, opts?)Link an LLM call to a run or group—outcome(target, name, opts?)Record a result on any entitywm_oc_act(outcome, name, opts?)Record an action after an outcomewm_act_ref(target)Get the tracking ID for any entity—flush()Manually send pending events—