About#

Use this section when you own an application, agent harness, or workflow and can route tool and LLM calls through NeMo Flow directly.

Direct instrumentation puts NeMo Flow at the boundaries where work happens. Scopes define request and agent ownership, managed execution helpers wrap tool and LLM calls, middleware applies policy and transformation, and subscribers receive lifecycle events. This path gives the runtime a complete view of agent work while keeping the application callback result unchanged.

Start Here When#

Use this guide when you need to:

  • Trace nested agent work across tools and model calls

  • Redact or normalize event payloads before export

  • Block unsafe or invalid calls before execution

  • Wrap calls with timing, routing, retries, or fallback behavior

  • Isolate request-specific middleware and subscribers

If the tool or LLM boundary is owned by a framework, use Integrate into Frameworks instead.

Guides#

These guides show how to instrument applications with scopes, tool calls, LLM calls, middleware, and direct API examples.

Start with scopes and marks, then instrument the call boundaries your application owns. Add one middleware behavior at a time after the tool or LLM wrapper is emitting the expected lifecycle events.

For production usage, keep tool names stable, keep payloads JSON-compatible, use sanitize guardrails for sensitive fields, and prefer scope-local middleware when behavior should apply to one request, tenant, or experiment.