Skip to content

Commit 44085ed

Browse files
authored
Merge pull request #167 from NVIDIA-NeMo/docs/tour
docs: add NOOA tour & concept guides. Fix small issues in skills.
2 parents f1c0737 + 3014838 commit 44085ed

42 files changed

Lines changed: 1954 additions & 744 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,21 @@ Common typing constructs and framework symbols (`asyncio`, `typing`, strategies,
131131

132132
### Context Blocks
133133

134-
- **Static context blocks for once-computed values.** Use `self.context["key"] = value` for values known at assignment time. These are evaluated once and cached.
135-
- **Dynamic context blocks for runtime values.** Use `self.context.set_dynamic("key", "python_expression")` for values that change during agent execution. The expression is re-evaluated each LLM turn.
134+
- **Fixed context blocks for once-computed values.** Use a literal `Context`
135+
value. Set `prefix=True` when the content is stable enough for the provider's
136+
cacheable prompt prefix; bare values are fixed content in the volatile suffix.
137+
- **Expression context blocks for runtime values.** Use `Context(expr=...)` for
138+
values that change during agent execution. The expression is re-evaluated
139+
each LLM turn.
136140

137141
```python
138-
# Static: set once, never changes
139-
self.context["plan"] = plan.format()
142+
from nooa import Context
140143

141-
# Dynamic: re-evaluated each LLM turn
142-
self.context.set_dynamic("project_state", "self.format_project_state()")
144+
# Fixed: set once, rendered in the cacheable prefix
145+
self.context["plan"] = Context(plan.format(), prefix=True)
146+
147+
# Live: re-evaluated each LLM turn in the volatile suffix
148+
self.context["project_state"] = Context(expr="self.format_project_state()")
143149
```
144150

145151
### Tracing

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828
[![Blog](https://img.shields.io/badge/blog-NVIDIA-76B900?logo=nvidia&logoColor=white)](https://developer.nvidia.com/blog/six-agent-harness-capabilities-for-higher-model-performance/)
2929
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/LICENSE)
3030

31-
**[Quick Start](#quick-start)**  ·  **[Notebook Tutorials](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/notebook_tutorials/README.md)**  ·  **[Examples](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/examples/README.md)**  ·  **[Paper](https://arxiv.org/abs/2607.20709)**  ·  **[Blog](https://developer.nvidia.com/blog/six-agent-harness-capabilities-for-higher-model-performance/)**
31+
**[Docs](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/docs/README.md)**  ·  **[Quick Start](#quick-start)**  ·  **[Notebook Tutorials](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/notebook_tutorials/README.md)**  ·  **[Examples](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/examples/README.md)**  ·  **[Paper](https://arxiv.org/abs/2607.20709)**  ·  **[Blog](https://developer.nvidia.com/blog/six-agent-harness-capabilities-for-higher-model-performance/)**
3232

3333
<br />
3434

3535
</div>
3636

3737

38-
NVIDIA-labs OO Agents (NOOA) is a model-agnostic Python framework designed to support reliable AI agent development. Many agent frameworks represent prompts, tools, callbacks, and workflows as separate abstractions. NOOA offers an alternative object-oriented interface that brings these concepts together in a Python class. NOOA lets developers express an agent’s state, capabilities, prompts, and typed interfaces through a single Python class:
38+
NVIDIA-labs Object Oriented Agents (NOOA) is a model-agnostic Python framework designed to support reliable AI agent development. Many agent frameworks represent prompts, tools, callbacks, and workflows as separate abstractions. NOOA offers an alternative object-oriented interface that brings these concepts together in a Python class. NOOA lets developers express an agent’s state, capabilities, prompts, and typed interfaces through a single Python class:
3939

4040
```python
4141
from nooa import Agent
@@ -64,7 +64,9 @@ class SupportAgent(Agent):
6464
- **Code as action.** The model acts by writing Python in a Jupyter-style REPL with access to `self`, imports, and helpers — Python methods and type annotations supply the callable interfaces, reducing the need to write separate tool-schema definitions.
6565
- **Pythonic and agent-ready.** Typed I/O with auto-retry, live-object arguments passed by reference, and model-callable context and event APIs — designed around agent-oriented Python workflows.
6666

67-
This design supports familiar Python testing, tracing, refactoring, and version-control workflows — **just like the rest of your software**. Read the paper for the design principles and evaluation results: [NVIDIA OO Agents: Native Python Object-Oriented Agents](https://arxiv.org/abs/2607.20709).
67+
This design supports familiar Python testing, tracing, refactoring, and version-control workflows — **just like the rest of your software**. Read [the paper](https://arxiv.org/abs/2607.20709) for the design principles and evaluation results.
68+
69+
Want to see how the pieces compose? Take the [**10-minute tour**](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/docs/tour.md), from one thinking method through tools, typed contracts, deterministic orchestration, and object composition.
6870

6971
## Installation
7072

@@ -183,7 +185,7 @@ Rename `analyze_feedback` to `analyze_feedback_briefly` and the output changes
183185

184186
Prefer a guided notebook path? Start with the [**notebook tutorials**](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/notebook_tutorials/README.md), which walk through the same ideas in Colab-friendly steps, with more notebooks planned.
185187

186-
Ready for more? See [**examples/**](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/examples/README.md) for the full progressive tutorial — structured output, tools, strategies, tracing, context blocks, MCP, and more.
188+
Ready to run something specific? Use the [**examples catalog**](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/examples/README.md) to find quickstarts for structured output, tools, strategies, tracing, context blocks, MCP, and more.
187189

188190
### 3. See what your agent is doing
189191

@@ -197,8 +199,10 @@ If the viewer isn't running, tracing is silently disabled — no configuration n
197199

198200
## Learn more
199201

200-
- **[Notebook tutorials](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/notebook_tutorials/README.md)** — guided Colab-friendly walkthroughs for your first agent, strategy selection, and CodeAct's live-object workflow. More notebooks are planned.
201-
- **[examples/README.md](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/examples/README.md)** — the full progressive tutorial: structured output, tools via `self`, strategies, progressive disclosure with `doc()`, tracing, dynamic prompts, context blocks, summarization, skills, MCP, sandbox, and more.
202+
- **[Documentation](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/docs/README.md)** — human-oriented reading paths, core concepts, architecture, and safety guidance.
203+
- **[Framework tour](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/docs/tour.md)** — a concise conceptual showcase of NOOA's core ideas and Python-first design.
204+
- **[Notebook tutorials](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/notebook_tutorials/README.md)** — the primary hands-on path for your first agent, strategy selection, CodeAct's live-object workflow, and composing subagents. More notebooks are planned.
205+
- **[Examples catalog](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/examples/README.md)** — runnable quickstarts, advanced mechanics, and complete benchmark systems, indexed by capability and setup requirements.
202206
- **[Paper](https://arxiv.org/abs/2607.20709)** — design principles, harness details, capability tests, and SWE-bench Verified / Terminal-Bench 2.0 results.
203207
- **[Blog post](https://developer.nvidia.com/blog/six-agent-harness-capabilities-for-higher-model-performance/)** — Six Agent Harness Capabilities for Higher Model Performance.
204208
- **[AGENTS.md](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/AGENTS.md)** — conventions used inside this repo (helpful when reading the source).
@@ -233,7 +237,7 @@ See [CONTRIBUTING.md](https://github.com/NVIDIA-NeMo/labs-OO-Agents/blob/main/CO
233237

234238
## Citation
235239

236-
If you use NVIDIA-labs OO Agents in your research, please cite:
240+
If you use NVIDIA-labs Object Oriented Agents in your research, please cite:
237241

238242
```bibtex
239243
@techreport{nvidia_oo_agents_2026,

docs/README.md

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
<div align="center">
2+
3+
<picture>
4+
<source
5+
media="(prefers-color-scheme: dark)"
6+
srcset="../assets/nvidia-labs-object-oriented-agents-dark.svg"
7+
>
8+
<source
9+
media="(prefers-color-scheme: light)"
10+
srcset="../assets/nvidia-labs-object-oriented-agents-light.svg"
11+
>
12+
<img
13+
alt="NVIDIA-labs Object Oriented Agents"
14+
src="../assets/nvidia-labs-object-oriented-agents-light.svg"
15+
width="820"
16+
>
17+
</picture>
18+
19+
</div>
20+
21+
# Documentation
22+
23+
NVIDIA-labs Object Oriented Agents (NOOA) is a Python framework in which an
24+
agent is an object and its methods are its capabilities. An asynchronous method
25+
ending in `...` is implemented by an LLM at runtime; a method with a real body
26+
remains ordinary Python.
27+
28+
These pages explain that model for human readers. For detailed instructions
29+
written for coding agents, see the repository's [`skills/`](../skills/README.md)
30+
directory. For code you can run immediately, use the
31+
[`examples/` catalog](../examples/README.md).
32+
33+
## Choose a path
34+
35+
### Understand NOOA in 10 minutes
36+
37+
1. Read the [framework tour](tour.md).
38+
2. If you want the runtime mechanics, skim
39+
[how a method call runs](architecture.md).
40+
41+
### Learn by building
42+
43+
1. Work through the [notebook tutorials](../notebook_tutorials/README.md) in
44+
order.
45+
2. Use the [quickstart catalog](../examples/README.md) for compact,
46+
copy-paste programs.
47+
3. Return here for focused explanations when a design question arises.
48+
49+
### Build a reliable workflow
50+
51+
1. [Orchestration](concepts/orchestration.md)
52+
2. [Tracing](concepts/tracing.md)
53+
3. [Safety](concepts/safety.md)
54+
55+
### Scale beyond one agent
56+
57+
1. [Multi-agent systems](concepts/multi-agent-systems.md)
58+
2. [Architecture](architecture.md)
59+
60+
## Concepts at a glance
61+
62+
| Document | Question it answers |
63+
|---|---|
64+
| [Agents and methods](concepts/agents-and-methods.md) | What is an agent in NOOA, and what does `...` mean? |
65+
| [Strategies](concepts/strategies.md) | When should a method use Predict or CodeAct? |
66+
| [Tools and visibility](concepts/tools-and-visibility.md) | How does generated code discover and call capabilities? |
67+
| [Prompts and context](concepts/prompts-and-context.md) | Where should instructions, inputs, and cross-call information live? |
68+
| [Orchestration](concepts/orchestration.md) | How do I make a workflow deterministic without turning it into one giant prompt? |
69+
| [Multi-agent systems](concepts/multi-agent-systems.md) | When should I use another agent, and what state does it share? |
70+
| [Tracing](concepts/tracing.md) | How do I inspect the complete Python and LLM call tree? |
71+
| [Safety](concepts/safety.md) | What security boundary does NOOA provide, and what must the deployment provide? |
72+
73+
## A note for users of graph and chain frameworks
74+
75+
NOOA does not require a separate graph, chain, or tool-schema representation of
76+
your program. Python remains the control plane:
77+
78+
- Agentic methods contain the fuzzy work delegated to an LLM.
79+
- Regular methods contain deterministic capabilities.
80+
- Regular Python methods and classes orchestrate ordering, branching, retries,
81+
concurrency, and verification.
82+
- Type annotations define the boundary between model output and application
83+
code.
84+
85+
You can still build graphs, routers, supervisors, and worker pools. In NOOA,
86+
they are normally expressed as Python control flow over agent objects rather
87+
than as a second declarative program.
88+
89+
## Documentation conventions
90+
91+
Code blocks in the concept pages are intentionally focused on one idea. Some
92+
use an existing `llm` variable or omit application setup. Follow the linked
93+
quickstart for the complete runnable version.
94+
95+
The concepts describe stable design principles. Exact configuration surfaces,
96+
advanced controls, and framework internals remain in the
97+
[`skills/`](../skills/README.md) reference and source code.
98+
99+
## Other resources
100+
101+
- [Root README](../README.md) — installation, model selection, and the shortest
102+
quick start.
103+
- [Notebook tutorials](../notebook_tutorials/README.md) — guided,
104+
notebook-oriented learning.
105+
- [Examples catalog](../examples/README.md) — standalone quickstarts, advanced
106+
mechanics, and complete systems.
107+
- [Repository conventions](../AGENTS.md) — precise authoring rules used by
108+
contributors and coding agents.

docs/architecture.md

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
# How NOOA runs an agent method
2+
3+
NOOA keeps two kinds of execution in one Python class:
4+
5+
- A method with a real body runs as regular Python.
6+
- An asynchronous method ending in `...` delegates its implementation to an
7+
LLM through a generation strategy.
8+
9+
Agentic methods and asynchronous real-body methods are awaited. Synchronous
10+
helpers are called normally. The caller does not need a separate graph or tool
11+
invocation API: both remain ordinary Python method calls.
12+
13+
## The call path
14+
15+
```mermaid
16+
flowchart TD
17+
A[Python calls an agent method] --> B[Agent method wrapper]
18+
B --> C{Real body or ellipsis?}
19+
C -->|Real body| D[Run ordinary Python]
20+
C -->|Ellipsis| E[Resolve LLM, strategy, and scoped context]
21+
E --> F[Build prompt blocks and event history]
22+
F --> G{Strategy}
23+
G -->|Predict| H[Structured LLM attempt without tools]
24+
G -->|CodeAct| I[Iterative LLM and Python REPL loop]
25+
I --> J[Call visible methods and tools]
26+
J --> I
27+
H --> K[Validate return type]
28+
I --> K
29+
K -->|Invalid| L[Return validation feedback to the strategy]
30+
L --> G
31+
K -->|Valid| M[Return a Python value]
32+
D --> M
33+
B -. records .-> N[Events and nested trace spans]
34+
```
35+
36+
This is not a remote worker abstraction. The agent is a live Python object in
37+
the current process. CodeAct-generated Python can work with its method
38+
arguments as live objects and call the visible API on `self`.
39+
40+
## 1. Class creation identifies agentic methods
41+
42+
`Agent` uses a metaclass to inspect methods when the class is defined. An async
43+
method whose body ends in `...` is wrapped as an agentic method. Other methods
44+
keep their Python implementation and are wrapped only for runtime services such
45+
as tracing.
46+
47+
```python
48+
class Analyst(Agent, llm=llm):
49+
async def classify(self, text: str) -> str:
50+
"""Classify the text."""
51+
... # agentic
52+
53+
def normalize(self, text: str) -> str:
54+
return text.strip().lower() # deterministic
55+
```
56+
57+
No tool registry or graph compiler is needed to connect these methods. The
58+
Python class is the executable definition.
59+
60+
## 2. The runtime resolves the call configuration
61+
62+
For an agentic method, the runtime resolves:
63+
64+
- the LLM client, including call-, method-, instance-, class-, and parent-level
65+
overrides;
66+
- the generation strategy, defaulting to CodeAct;
67+
- method-scoped context and event-history filters;
68+
- truncation and execution settings.
69+
70+
The built-in Predict and CodeAct strategies lock an agent instance while a
71+
generation call is active. This prevents per-instance events, history, and
72+
active generation or tool work from interleaving. CodeAct creates a fresh REPL
73+
session for each agentic call; its local variables persist only across cells
74+
within that call. Use separate agent instances for ordinary parallel fan-out.
75+
76+
## 3. The prompt is assembled from Python structure
77+
78+
The model receives more than the method docstring. The runtime assembles a set
79+
of named blocks:
80+
81+
- the class role and framework instructions;
82+
- strategy instructions;
83+
- `doc(type(self))`, which describes visible methods and annotated fields;
84+
- current visible instance state;
85+
- developer context blocks;
86+
- the event history selected for this call;
87+
- the method name, signature, docstring, and arguments.
88+
89+
Arguments are rendered by the strategy. They do not need to be interpolated
90+
again with `{argument}` in the docstring.
91+
92+
See [Prompts and context](concepts/prompts-and-context.md) for where each kind of
93+
information belongs.
94+
95+
## 4. The strategy implements the ellipsis
96+
97+
`PredictStrategy` makes a structured model attempt and validates the response.
98+
It has no iterative tool loop, but validation failures can trigger additional
99+
provider attempts. It fits classification, extraction, and other tasks that do
100+
not need tools or code execution.
101+
102+
`CodeActStrategy` gives the model two core actions: execute a Python cell and
103+
return a result. Its REPL state persists across cells for the duration of the
104+
method. Generated code can inspect objects with `doc()`, call methods on
105+
`self`, and use tools attached to the agent.
106+
107+
Both strategies enforce the declared return type. Validation errors become
108+
feedback for another attempt instead of leaking an invalid value to the
109+
caller.
110+
111+
## 5. Events preserve the agent's working history
112+
113+
Tasks, model messages, reasoning, generated-code output, errors, feedback, and
114+
summaries are recorded as events. That history supplies the conversational
115+
part of later prompts and can be filtered or summarized.
116+
117+
Context blocks and events serve different purposes:
118+
119+
- Context blocks are named information deliberately inserted into the prompt.
120+
- Events are the chronological record of what happened.
121+
122+
Both belong to one agent instance. A child agent begins with its own context
123+
and history unless the application passes information explicitly.
124+
125+
## 6. Tracing records the complete call tree
126+
127+
Tracing follows Python nesting rather than capturing only an LLM transcript. A
128+
typical trace looks like:
129+
130+
```text
131+
method.run
132+
└── method.research
133+
└── generation
134+
├── litellm.acompletion
135+
├── code_execution
136+
└── method_call.search
137+
```
138+
139+
This makes deterministic orchestration, generated code, nested agent calls,
140+
and external tools visible in one timeline. See [Tracing](concepts/tracing.md).
141+
142+
## What remains ordinary Python
143+
144+
NOOA intentionally leaves application architecture in the language:
145+
146+
- use `if`, `for`, exceptions, and `asyncio` for control flow;
147+
- use Pydantic and validators for local data contracts;
148+
- use tests for deterministic helpers and orchestrators;
149+
- use separate objects when work needs isolated state;
150+
- use operating-system isolation when generated code is allowed to execute.
151+
152+
That boundary is the central design choice: the LLM supplies judgment inside
153+
selected methods, while Python retains control over program structure and
154+
acceptance criteria.
155+
156+
## Continue
157+
158+
- [Agents and methods](concepts/agents-and-methods.md)
159+
- [Strategies](concepts/strategies.md)
160+
- [Orchestration](concepts/orchestration.md)
161+
- [Framework tour](tour.md)

0 commit comments

Comments
 (0)