Use these examples when you need the direct runtime surfaces behind the application instrumentation guides.
The following table shows which API to use based on your integration need:
Use manual lifecycle calls only when the surrounding code owns the real tool invocation and only exposes reliable start and finish hooks.
If you are replaying events or bridging a framework clock, pass an explicit timestamp to the manual start, end, or mark helpers.
Python accepts timezone-aware datetime values, Node.js and WebAssembly accept Unix microseconds since epoch, Rust accepts DateTime<Utc>, and Go accepts time.Time.
Use managed execution when NeMo Relay should run the full middleware pipeline around the provider call.
Use the streaming helper when subscribers need chunk collection plus one final response payload.
These helpers are useful when framework code cannot use managed execution but still wants a request rewrite or block decision.
Use normal scope helpers first. Reach for explicit stack helpers only when work crosses thread, task, worker, or request boundaries.
The runtime exposes the same registration families for tool and LLM calls:
Every family also has a scope-local surface:
nemo_relay.scope_local.register_*scopeRegister*scope_register_* functions under
nemo_relay::api::registry; subscriber scope registration under
nemo_relay::api::subscriberUse Add Middleware for an end-to-end policy example and API Reference for symbol-level details.