Events#
This page explains the lifecycle events emitted by scopes, tools, LLM calls, middleware, and subscribers.
What Events Represent#
Events are the runtime record of what happened. NeMo Flow uses Agent
Trajectory Observability Format (ATOF) 0.1 as the canonical event format for
scopes, managed execution helpers, manual lifecycle APIs, subscribers, and
exporters.
Event Kinds#
ATOF has two event kinds.
scope#
Emitted when lifecycle work starts or ends. scope_category is start or
end, and category identifies the kind of work, such as agent, function,
tool, llm, retriever, embedder, reranker, guardrail, evaluator,
custom, or unknown.
mark#
Emitted for named runtime checkpoints that are not full start/end lifecycle pairs.
Semantic Meaning#
These sections describe how event shapes and relationships should be interpreted by consumers.
Start and End Pairing#
Start and end scope events for the same lifecycle pair by UUID. That pairing lets subscribers compute durations, reconstruct call boundaries, and preserve nesting in downstream systems.
Input and Output Payloads#
ATOF uses one data field. For scope events, data is the semantic input on
scope_category == "start" and the semantic output on
scope_category == "end".
Category Profiles#
Category-specific fields live under category_profile. NeMo Flow uses
model_name for LLM events, tool_call_id for tool events, and subtype for
custom-category events. Unknown profile fields are preserved so newer
producers can interoperate with older consumers.
Annotated Request and Response Data#
LLM codecs can enrich LLM events with runtime-only annotated request and response data. These annotations are available to in-process subscribers and exporters, but they are not serialized into the ATOF wire event.
How Events Are Produced#
Scope APIs emit scope start and end events and can also emit named mark
events. Managed tool and LLM helpers emit scope events with category set to
tool or llm. Conditional-execution rejections and explicit mark points let
the runtime record important state transitions even when there is no full nested
callback to wrap.