Client
module nemo_fabric.client
Native Python client for resolving and running NVIDIA NeMo Fabric agents.
class Fabric
Primary Python entrypoint for NeMo Fabric.
Every lifecycle method accepts a complete, typed FabricConfig plus an optional base_dir used to resolve relative paths. Compose variants in Python before calling the SDK. The doctor(), plan(), and run() results are typed, read-only mapping models. start_runtime() returns an active Runtime handle.
Fabric uses the native Rust extension. SDK calls raise FabricNativeUnavailableError when the native extension is not installed.
See the Getting Started overview for runnable single-invocation, typed-config, and multi-turn examples.
method doctor
Diagnose a planned agent without starting its runtime.
Doctor checks the resolved adapter, capability mappings, and declared environment requirements using the native NeMo Fabric core.
Args:
config: Complete typedFabricConfig.base_dir: Base directory for resolving relative paths.
Returns:
A DoctorReport with aggregate status and ordered checks.
Raises:
FabricConfigError: If inputs or native diagnostic output are invalid.FabricNativeUnavailableError: If the native extension is not installed.
method plan
Resolve a complete typed configuration into an immutable execution plan.
Planning resolves the selected adapter and reports optional runtime capabilities such as streaming, updates, and cancellation. Planning does not start the runtime.
Args:
config: Complete typedFabricConfig. Raw mappings are not accepted.base_dir: Base directory for resolving relative paths.
Returns:
A RunPlan containing the canonical config, path context, adapter, and declared runtime capabilities.
Raises:
FabricConfigError: If the config or adapter resolution is invalid.FabricNativeUnavailableError: If the native extension is not installed.
method run
Execute one complete start, invoke, and stop lifecycle.
input and request are mutually exclusive. Omitting both produces an empty text input. Use RunRequest when the invocation needs a caller-owned request ID, context, or overrides. NeMo Fabric attempts to stop a started runtime even when invocation fails.
Args:
config: Complete typedFabricConfig.base_dir: Base directory for resolving relative paths.input: JSON-compatible invocation input.request: Complete validatedRunRequest.
Returns:
The normalized RunResult, including output, artifacts, telemetry references, lifecycle events, and structured error data.
Raises:
FabricConfigError: If input and request are combined, request data is not JSON-compatible, or config resolution fails.FabricNativeUnavailableError: If the native extension is not installed.FabricRuntimeError: If the native runtime lifecycle fails before a normalized result can be returned.
method start_runtime
Start a stateful runtime for one or more ordered invocations.
Each call starts a new logical runtime. Runtime-scoped overrides are recursively merged below invocation-scoped overrides. Set streaming=True with NVIDIA NeMo Relay enabled to provision the SDK-owned ATOF endpoint used by Runtime.invoke_stream().
Args:
config: Complete typedFabricConfig.base_dir: Base directory for resolving relative paths.overrides: JSON-compatible overrides applied to every invocation in the runtime unless superseded by invocation overrides.streaming: Whether to provision NeMo Relay ATOF streaming forRuntime.invoke_stream().
Returns:
An active Runtime. Use it as an asynchronous context manager to guarantee runtime shutdown.
Raises:
FabricConfigError: If inputs or overrides are invalid, or streaming is requested without NeMo Relay enabled.FabricNativeUnavailableError: If the native extension is not installed.FabricRuntimeError: If runtime startup fails.
This file was automatically generated via lazydocs.