Skip to content

NVIDIA-labs OO Agents: Native Python Object-Oriented Agents

🕒 Published (v1): 2026-07-22 00:00 UTC · Source: HuggingFace · link

Ask a follow-up

Open an assistant pre-loaded with this paper's context.

💬 Ask ChatGPT✦ Ask Claude

TL;DR

NVIDIA Object-Oriented Agents (NOOA) is a Python agent framework where an agent is a plain Python class: methods with real bodies are deterministic code, methods with ... bodies become LLM-driven loops, type annotations are runtime-validated contracts, and docstrings are prompts. This "agent-as-object" model eliminates the split across prompt templates, schemas, callbacks, and orchestration DSLs by reusing Python's existing abstractions. Evaluations on SWE-bench Verified, Terminal-Bench 2.0, and ARC-AGI-3 demonstrate that current models effectively use this interface.

Problem

Modern agent frameworks fragment source code across prompt templates, tool schemas, callback code, configuration files, and workflow graphs. Developers must learn new programming models for capabilities — typed interfaces, variable scoping, control flow, asynchronous execution, object state — that already have mature, well-understood equivalents in ordinary Python. This increases the learning curve for humans and moves agent code away from the distribution of code LLMs were trained on, reducing agent readiness.

Method

NOOA represents an agent as a single Python class. Any method whose body is the ellipsis literal (...) becomes an agentic method executed by the harness as an LLM loop; any method with a real body executes deterministically. Two built-in strategies control loop execution:

  • PredictStrategy: single-shot LLM call; the harness validates the output against the Python return annotation and retries locally on failure.
  • CodeActStrategy: iterative Python REPL. The model calls execute_python(...) to compute, inspect state, call helpers, or spawn subagents, then terminates via return_result(...) with a type-validated value.

Pass-by-reference: large arguments are never serialized into the prompt. The model sees a bounded preview (records = list(len=100, [:5]=[...], [-5:]=[...])) but the live object is injected as a local in the REPL session, so the agent can index or iterate over the full value in code. This decouples the context window from the data volume the agent can process.

Context rendering separates into three regions managed by ContextManager and EventManager: (1) static blocks (system prompt, agent doc()) cached across turns; (2) dynamic blocks re-evaluated per turn (e.g., self.todo.status()); (3) event history as an append-only log of typed events. The layout is designed to maximize KV-cache reuse — the static prefix is immutable, events only grow by append, and volatile state is at the tail.

Long-term memory is an optional MemoryManager subsystem. The agent authors its own memory via seven model-callable tools (remember, recall, search, update_memory, forget, associate, deref). Retrieval unions embedding and keyword candidates and ranks by ACT-R activation (relevance × recency × importance). A BeforeTurn hook injects salient memories into a dynamic context block. Asynchronous consolidation merges near-duplicates, reconciles conflicts, re-scores importance, and prunes decayed entries. The store is a single SQLite file; memories may hold typed references (kind:key) resolved against live agent state at recall time.

Key Contributions

  • Agent-as-Python-object programming model: classes are agents, methods are capabilities, ... bodies trigger LLM loops, type annotations are contracts, asyncio handles concurrency — no new DSL.
  • Six model-facing interface capabilities (claimed first combination on a single surface): typed I/O, pass-by-reference over live objects, code as action (CodeAct), programmable loop engineering, explicit object state, and model-callable harness APIs for context and events.
  • Framework survey: comparison of 14 existing agent frameworks and harnesses against the six capabilities, showing the community is converging on several features as experimental or partial implementations.
  • ACT-R-activated long-term memory subsystem with deliberate agent-authoring, asynchronous reflection, typed memory graph, and live-reference resolution.
  • Benchmark evaluations on SWE-bench Verified, Terminal-Bench 2.0, and ARC-AGI-3; on ARC-AGI-3, a single-agent, one-page skill replaces a multi-agent world-model system and advances the score–cost Pareto frontier.

Results

  • ARC-AGI-3: NOOA compresses a multi-agent world-model system into a single agent with a one-page skill and advances the benchmark's score–cost Pareto frontier (exact scores not reported in the provided text).
  • Long-term memory ablation: +11.8 RHAE points over the identical agent using file-based notes instead of the MemoryManager.
  • Capability tests: targeted tests confirm that current models correctly use typed I/O, pass-by-reference, CodeAct REPL, and harness APIs (detailed pass rates in evaluation section, truncated in provided text).
  • SWE-bench Verified and Terminal-Bench 2.0: results reported but numerical details not present in the provided text excerpt.

Limitations

  • Better pprint output formats for LLMs remain open work; no standard Python library exists for truncating arbitrary values in LLM-legible ways.
  • Long-term memory effect (+11.8 RHAE) is measured relative to file-based notes, not relative to no memory, so the absolute gain over a memory-free baseline is not isolated.
  • The transfer problem in workspace optimization (companion work) — workspace discarded at task boundary — motivated the memory subsystem but is not fully resolved.
  • Dangerous/blocking Python APIs (eval, exec, compile, input, blocking event-loop calls) are rejected; this restricts the action space compared to unrestricted code execution environments.
  • Full evaluation numbers (SWE-bench Verified, Terminal-Bench 2.0) are not available in the provided text excerpt, preventing full assessment of benchmark standing.

Relevance to Agentic AI / LLM Agents

NOOA directly addresses the agent programming model problem: by making a Python class the complete agent surface, it unifies the developer and model interfaces, enabling agents to be tested, traced, refactored, and versioned with standard software-engineering tooling. The pass-by-reference abstraction and CodeAct REPL solve a core scalability problem — agents can process arbitrarily large data structures without context-window overflow. The ACT-R-activated long-term memory with deliberate authoring and asynchronous consolidation offers a concrete architecture for persistent agent state that competes with or extends prior memory frameworks (MemGPT, generative agents). The six model-facing capabilities and the survey of 14 frameworks provide a structured vocabulary and baseline for evaluating convergence in the broader agent-framework ecosystem.