<!--
SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0
-->

# 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](../integrate-frameworks/about.md) instead.

## Guides

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

- [Adding Scopes and Marks](adding-scopes-and-marks.md) shows how to create ownership boundaries and checkpoint events before adding call instrumentation.
- [Instrument a Tool Call](instrument-tool-call.md) shows the smallest managed tool wrapper with event validation.
- [Instrument an LLM Call](instrument-llm-call.md) shows the smallest managed model-provider wrapper with event validation.
- [Add Middleware](advanced-guide.md) shows how to add guardrails, request intercepts, execution intercepts, and scope-local behavior.
- [Code Examples](code-examples.md) collects direct API examples for tools, LLMs, streaming calls, scopes, and partial middleware helpers.

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.
