Skip to content

Commit 7c39341

Browse files
committed
docs: update documentation
Signed-off-by: Will Killian <wkillian@nvidia.com>
1 parent e3bfe6c commit 7c39341

32 files changed

Lines changed: 280 additions & 527 deletions

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ repos:
7575
- --accept
7676
- '200..=299,403,429'
7777
- --exclude
78+
- '^https?://(localhost|127\.0\.0\.1|\[::1\])(:[0-9]+)?(/.*)?$'
79+
- --exclude
7880
- '^https://www\.npmjs\.com/package/nemo-relay-(node|wasm)$'
7981
- --exclude
8082
- '^https://github\.com/NVIDIA/NeMo-Relay(?:/.*)?$'

docs/about/concepts/index.mdx

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,37 +9,65 @@ SPDX-License-Identifier: Apache-2.0 */}
99

1010
Use these pages to understand the NeMo Relay runtime model before applying it in a use-case workflow.
1111

12-
<Cards>
13-
:gutter: 3
14-
15-
<Card title="Scopes" href="/scopes">
12+
<CardGroup cols={3}>
13+
<Card
14+
title="Scopes"
15+
icon="regular object-group"
16+
iconPosition="left"
17+
href="/about-nemo-relay/concepts/scopes"
18+
>
1619

1720
Ownership boundaries for agent runs, requests, workflows, tools, LLM calls, and nested runtime work.
1821
</Card>
1922

20-
<Card title="Middleware" href="/middleware">
23+
<Card
24+
title="Middleware"
25+
icon="regular filters"
26+
iconPosition="left"
27+
href="/about-nemo-relay/concepts/middleware"
28+
>
2129

2230
Guardrails and intercepts that sanitize, transform, block, or wrap tool and LLM execution.
2331
</Card>
2432

25-
<Card title="Plugins" href="/plugins">
33+
<Card
34+
title="Plugins"
35+
icon="regular puzzle-piece"
36+
iconPosition="left"
37+
href="/about-nemo-relay/concepts/plugins"
38+
>
2639

2740
Configuration-driven bundles that install reusable middleware, subscribers, and adaptive behavior.
2841
</Card>
2942

30-
<Card title="Events" href="/events">
43+
<Card
44+
title="Events"
45+
icon="regular waveform-lines"
46+
iconPosition="left"
47+
href="/about-nemo-relay/concepts/events"
48+
>
3149

3250
Canonical lifecycle records for scopes, tool calls, LLM calls, marks, subscribers, and exporters.
3351
</Card>
3452

35-
<Card title="Subscribers" href="/subscribers">
53+
<Card
54+
title="Subscribers"
55+
icon="regular tower-broadcast"
56+
iconPosition="left"
57+
href="/about-nemo-relay/concepts/subscribers"
58+
>
3659

3760
Consumers for lifecycle events, including logs, traces, trajectories, analytics, and diagnostics.
3861
</Card>
3962

40-
<Card title="Framework Integrations" href="/framework-integrations">
63+
<Card
64+
title="Framework Integrations"
65+
icon="regular diagram-project"
66+
iconPosition="left"
67+
href="/about-nemo-relay/concepts/framework-integrations"
68+
>
4169

4270
Integration patterns for frameworks that own invocation boundaries, scheduling, retries, or provider payloads.
4371
</Card>
4472

45-
</Cards>
73+
</CardGroup>

docs/build-plugins/code-examples.mdx

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@ This page collects concrete examples for the surrounding guide area.
1414
Use an LLM request intercept when a plugin needs to inject tenant or routing metadata into every provider request.
1515

1616
<Tabs>
17-
:sync-group: language
18-
19-
<Tab title="Python">
20-
:sync: python
21-
17+
<Tab title="Python" language="python">
2218
```python
2319
import nemo_relay
2420

@@ -43,9 +39,7 @@ nemo_relay.plugin.register("header-plugin", HeaderPlugin())
4339
```
4440
</Tab>
4541

46-
<Tab title="Node.js">
47-
:sync: node
48-
42+
<Tab title="Node.js" language="node">
4943
```ts
5044
import * as plugin from 'nemo-relay-node/plugin';
5145

@@ -92,11 +86,7 @@ This pattern is useful for:
9286
Use a subscriber-oriented plugin when the component should watch the full lifecycle rather than rewrite requests.
9387

9488
<Tabs>
95-
:sync-group: language
96-
97-
<Tab title="Python">
98-
:sync: python
99-
89+
<Tab title="Python" language="python">
10090
```python
10191
import nemo_relay
10292

@@ -122,9 +112,7 @@ nemo_relay.plugin.register("openinference-export", OpenInferencePlugin())
122112
```
123113
</Tab>
124114

125-
<Tab title="Node.js">
126-
:sync: node
127-
115+
<Tab title="Node.js" language="node">
128116
```ts
129117
import * as plugin from 'nemo-relay-node/plugin';
130118

docs/build-plugins/register-behavior.mdx

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ Use the plugin APIs in this order:
3737
6. Clear active config during teardown when needed.
3838

3939
<Tabs>
40-
:sync-group: language
41-
42-
<Tab title="Python">
43-
:sync: python
44-
40+
<Tab title="Python" language="python">
4541
```python
4642
import nemo_relay
4743

@@ -61,9 +57,7 @@ nemo_relay.plugin.clear()
6157

6258
</Tab>
6359

64-
<Tab title="Node.js">
65-
:sync: node
66-
60+
<Tab title="Node.js" language="node">
6761
```ts
6862
import * as plugin from 'nemo-relay-node/plugin';
6963

@@ -84,9 +78,7 @@ plugin.clear();
8478

8579
</Tab>
8680

87-
<Tab title="Rust">
88-
:sync: rust
89-
81+
<Tab title="Rust" language="rust">
9082
```rust
9183
use nemo_relay::plugin::{
9284
clear_plugin_configuration, initialize_plugins, list_plugin_kinds, validate_plugin_config,
@@ -114,11 +106,7 @@ clear_plugin_configuration()?;
114106
The same model applies in every binding: validate component-local config, then install middleware through the component-scoped registration context.
115107

116108
<Tabs>
117-
:sync-group: language
118-
119-
<Tab title="Python">
120-
:sync: python
121-
109+
<Tab title="Python" language="python">
122110
```python
123111
import nemo_relay
124112

@@ -144,9 +132,7 @@ nemo_relay.plugin.register("header-plugin", HeaderPlugin())
144132

145133
</Tab>
146134

147-
<Tab title="Node.js">
148-
:sync: node
149-
135+
<Tab title="Node.js" language="node">
150136
```ts
151137
import * as plugin from 'nemo-relay-node/plugin';
152138

@@ -180,9 +166,7 @@ plugin.register('header-plugin', headerPlugin);
180166

181167
</Tab>
182168

183-
<Tab title="Rust">
184-
:sync: rust
185-
169+
<Tab title="Rust" language="rust">
186170
```rust
187171
use nemo_relay::plugin::{
188172
register_plugin, ConfigDiagnostic, DiagnosticLevel, Plugin, PluginRegistrationContext,

docs/build-plugins/validate-configuration.mdx

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ Each component has:
2626
Disabled components are still validated. This lets operators detect config problems before enabling a component in a later rollout.
2727

2828
<Tabs>
29-
:sync-group: language
30-
31-
<Tab title="Python">
32-
:sync: python
33-
29+
<Tab title="Python" language="python">
3430
```python
3531
from nemo_relay.plugin import ComponentSpec, ConfigPolicy, PluginConfig
3632

@@ -52,9 +48,7 @@ config = PluginConfig(
5248
```
5349
</Tab>
5450

55-
<Tab title="Node.js">
56-
:sync: node
57-
51+
<Tab title="Node.js" language="node">
5852
```ts
5953
import type { PluginConfig } from 'nemo-relay-node/plugin';
6054

@@ -76,9 +70,7 @@ const config: PluginConfig = {
7670
```
7771
</Tab>
7872

79-
<Tab title="Rust">
80-
:sync: rust
81-
73+
<Tab title="Rust" language="rust">
8274
```rust
8375
use nemo_relay::plugin::{ConfigPolicy, PluginComponentSpec, PluginConfig};
8476

@@ -135,11 +127,7 @@ Prefer stable diagnostic codes over prose-only messages. The message can improve
135127
Use the validation API before initialization and fail deployment if the report contains errors.
136128

137129
<Tabs>
138-
:sync-group: language
139-
140-
<Tab title="Python">
141-
:sync: python
142-
130+
<Tab title="Python" language="python">
143131
```python
144132
import nemo_relay
145133

@@ -150,9 +138,7 @@ if has_errors:
150138
```
151139
</Tab>
152140

153-
<Tab title="Node.js">
154-
:sync: node
155-
141+
<Tab title="Node.js" language="node">
156142
```ts
157143
import * as plugin from 'nemo-relay-node/plugin';
158144

@@ -164,9 +150,7 @@ if (hasErrors) {
164150
```
165151
</Tab>
166152

167-
<Tab title="Rust">
168-
:sync: rust
169-
153+
<Tab title="Rust" language="rust">
170154
```rust
171155
use nemo_relay::plugin::validate_plugin_config;
172156

docs/getting-started/agent-runtime-primer.mdx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,16 @@ The core runtime model has five parts:
4545

4646
The simplest mental model is:
4747

48-
```text
49-
app or framework boundary
50-
-> NeMo Relay scope
51-
-> managed tool or LLM call
52-
-> middleware
53-
-> lifecycle event
54-
-> subscriber or exporter
48+
```mermaid
49+
flowchart LR
50+
boundary["App or framework boundary"]
51+
scope["NeMo Relay scope"]
52+
call["Managed tool or LLM call"]
53+
middleware["Middleware"]
54+
event["Lifecycle event"]
55+
sink["Subscriber or exporter"]
56+
57+
boundary --> scope --> call --> middleware --> event --> sink
5558
```
5659

5760
## What NeMo Relay Does Not Replace

docs/instrument-applications/adding-scopes-and-marks.mdx

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,7 @@ Follow this sequence to keep framework work attached to the expected runtime con
4747
The examples below create one `agent-run` scope and emit two marks.
4848

4949
<Tabs>
50-
:sync-group: language
51-
52-
<Tab title="Python">
53-
:sync: python
54-
50+
<Tab title="Python" language="python">
5551
```python
5652
import nemo_relay
5753

@@ -73,9 +69,7 @@ finally:
7369
```
7470
</Tab>
7571

76-
<Tab title="Node.js">
77-
:sync: node
78-
72+
<Tab title="Node.js" language="node">
7973
```js
8074
const {
8175
ScopeType,
@@ -116,9 +110,7 @@ main().catch((error) => {
116110
```
117111
</Tab>
118112

119-
<Tab title="Rust">
120-
:sync: rust
121-
113+
<Tab title="Rust" language="rust">
122114
```rust
123115
use nemo_relay::api::scope::{
124116
self, EmitMarkEventParams, PopScopeParams, PushScopeParams, ScopeAttributes, ScopeType,

docs/instrument-applications/advanced-guide.mdx

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,7 @@ This example adds three behaviors around a `search` tool:
4545
- Measure execution duration.
4646

4747
<Tabs>
48-
:sync-group: language
49-
50-
<Tab title="Python">
51-
:sync: python
52-
48+
<Tab title="Python" language="python">
5349
```python
5450
import time
5551

@@ -80,9 +76,7 @@ nemo_relay.intercepts.register_tool_execution("search.measure", 30, measure_tool
8076
```
8177
</Tab>
8278

83-
<Tab title="Node.js">
84-
:sync: node
85-
79+
<Tab title="Node.js" language="node">
8680
```js
8781
const {
8882
registerToolConditionalExecutionGuardrail,
@@ -112,9 +106,7 @@ registerToolExecutionIntercept("search.measure", 30, async (args, next) => {
112106
```
113107
</Tab>
114108

115-
<Tab title="Rust">
116-
:sync: rust
117-
109+
<Tab title="Rust" language="rust">
118110
```rust
119111
use nemo_relay::api::registry::{
120112
register_tool_conditional_execution_guardrail,

0 commit comments

Comments
 (0)