{"slug": "nvidia-object-oriented-agents-an-agent-is-a-python-class", "title": "Nvidia Object-Oriented Agents: An agent is a Python class", "summary": "NVIDIA-labs released NOOA (NVIDIA-labs OO Agents), a model-agnostic Python framework that represents AI agents as Python classes, unifying state, capabilities, prompts, and typed interfaces in a single object. The framework, available on GitHub, supports familiar Python development workflows and includes optional sub-packages for CLI, memory, and evaluation, but is research software that requires sandboxed execution due to risks from LLM-generated code.", "body_md": "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:\n\n``` python\nfrom nooa import Agent\n\n# The agent is a Python object.\nclass SupportAgent(Agent):\n    \"\"\"You are a support agent.\"\"\"\n\n    # State lives on the object. Fields are typed.\n    order_db: OrderDB\n\n    # Ordinary method. Just Python.\n    def is_refund_eligible(self, order: Order) -> bool:\n        return order.delivered and order.days_since_delivery <= 30\n\n    # Agentic method: the runtime hands this to an LLM.\n    async def triage(self, message: str, order: Order) -> Ticket:\n        \"\"\"Create a typed support ticket.\"\"\"\n        ...\n```\n\n**What's happening here:**\n\n**Agents are Python objects.** Fields are state, methods are capabilities, docstrings are prompts, type annotations are contracts.A method with`...`\n\nbodies are LLM-driven.`...`\n\nbecomes an agentic loop; a real body stays deterministic Python.**Code as action.** The model acts by writing Python in a Jupyter-style REPL with access to`self`\n\n, imports, and helpers — Python methods and type annotations supply the callable interfaces, reducing the need to write separate tool-schema definitions.**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.\n\nThis 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).\n\nInstall directly from GitHub with [uv](https://docs.astral.sh/uv/getting-started/installation/). Add the **core** framework to a new (or existing) Python project:\n\n```\nuv init my-agent-project\ncd my-agent-project\n\nuv add \"nooa @ git+https://github.com/NVIDIA-NeMo/labs-OO-Agents.git@main\"\n```\n\n**Optional sub-packages** — CLI, memory, evaluation pipeline\n\nAll of these live in the same repo and are addressed with `#subdirectory=…`\n\n.\n\n```\n# CLI (beta): the `nooa` command, trace viewer, eval runner\nuv add \"nooa-cli @ git+https://github.com/NVIDIA-NeMo/labs-OO-Agents.git@main#subdirectory=packages/nooa-cli\"\n\n# Long-term memory subsystem (MemoryManager)\nuv add \"nooa-memory @ git+https://github.com/NVIDIA-NeMo/labs-OO-Agents.git@main#subdirectory=packages/nooa-memory\"\n\n# Evaluation pipeline for agent testing\nuv add \"eval_pipeline @ git+https://github.com/NVIDIA-NeMo/labs-OO-Agents.git@main#subdirectory=util/eval_pipeline\"\n```\n\nNOOA is **research software**, and agents can be configured to execute LLM-generated code. We welcome contributions and fixes, but expect rough edges. LLM-generated code may take dangerous or unwanted actions, incuding sending private data to uncontrolled locations, deleting files, or modifying its environments. Ensure you run NOOA agents in a sandboxed environment isolated from your primary filesystem, such as [NVIDIA OpenShell](https://github.com/NVIDIA/OpenShell).\n\nNOOA validates generated code (AST checks) and applies module deny-lists before execution. **These are defense-in-depth guardrails, not a containment boundary.** They exist to keep generated code from freezing the event loop and to catch common mistakes early — not to stop code that is actively trying to escape. A static checker over Python cannot provide that guarantee: `open()`\n\ngives arbitrary file access, `importlib`\n\ncan load modules straight from a path, and reflection reaches the rest. **The containment boundary is OS-level isolation** — always run agents that execute generated code inside a sandbox such as a container, VM, or [NVIDIA OpenShell](https://github.com/NVIDIA/OpenShell). Do not rely on the in-process validators alone.\n\nChoose from supported hosted or local [LiteLLM-supported](https://docs.litellm.ai/) model:\n\n``` python\nfrom nooa.unifiedllm.registry import get_llm_client\n\nllm = get_llm_client(\"claude-haiku-4-5\")                                            # Anthropic (after `export ANTHROPIC_API_KEY=...`)\nllm = get_llm_client(\"gpt-5-mini\")                                                  # OpenAI    (after `export OPENAI_API_KEY=...`)\nllm = get_llm_client(\"ollama_chat/qwen3:1.7b\", api_base=\"http://localhost:11434\")   # Ollama    (no key)\nllm = get_llm_client(\"hosted_vllm/Qwen/Qwen3-1.7B\", api_base=\"http://localhost:8000/v1\")  # vLLM (no key)\n```\n\n* Agents are Python objects*. Methods with\n\n`...`\n\nbodies are **generation methods**— implemented at runtime by an LLM-driven strategy. The signature defines the contract; the docstring is the prompt.\n\n``` python\nimport asyncio\n\nfrom nooa import Agent\n\nclass FeedbackAgent(Agent, llm=llm):\n    \"\"\"You are an agent specializing in analyzing customer feedback.\"\"\"\n\n    async def analyze_feedback(self, text: str) -> str:\n        \"\"\"Analyze customer feedback for sentiment and key topics in one sentence.\"\"\"\n        ...\n\nasync def main():\n    agent = FeedbackAgent()\n    result = await agent.analyze_feedback(\"Great product, but shipping was slow\")\n    print(result)\n\nasyncio.run(main())\n```\n\nRun the same code from your own project with `python`\n\n. You can run the checked-in example:\n\n```\nuv run python examples/quickstart/01_first_generation_method.py\n```\n\nRename `analyze_feedback`\n\nto `analyze_feedback_briefly`\n\nand the output changes — your method name, parameters, and docstring *are* the prompt.\n\nReady for more? See [ examples/](/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.\n\nEvery LLM call, code execution, and method invocation is traced by default — orchestrators, generation methods, and helpers, with parent-child spans preserved. If you installed the CLI and viewer dependencies, start the trace viewer and open the run in your browser:\n\n```\nuv run nooa start-dev        # trace viewer on http://localhost:5001\n```\n\nIf the viewer isn't running, tracing is silently disabled — no configuration needed either way.\n\n— the full progressive tutorial: structured output, tools via[examples/README.md](/NVIDIA-NeMo/labs-OO-Agents/blob/main/examples/README.md)`self`\n\n, strategies, progressive disclosure with`doc()`\n\n, tracing, dynamic prompts, context blocks, summarization, skills, MCP, sandbox, and more.— design principles, harness details, capability tests, and SWE-bench Verified / Terminal-Bench 2.0 results.[Paper](https://arxiv.org/abs/2607.20709)— conventions used inside this repo (helpful when reading the source).[AGENTS.md](/NVIDIA-NeMo/labs-OO-Agents/blob/main/AGENTS.md)\n\nFor a local editable install, clone the repo and sync the development environment with `uv`\n\n:\n\n```\ngit clone https://github.com/NVIDIA-NeMo/labs-OO-Agents.git\ncd labs-OO-Agents\nuv sync --group dev\n```\n\nThis installs the core framework, workspace packages, development tools, the `nooa`\n\nCLI, and the trace viewer runtime in the repo's `.venv`\n\n. Run CLI commands through `uv`\n\n:\n\n```\nuv run nooa --help\nuv run nooa start-dev       # trace viewer on http://localhost:5001\n```\n\nEnable pre-commit hooks and run the test/lint suite:\n\n```\nuv run pre-commit install\nuv run pytest                # run tests\nuv run ruff check            # lint\nuv run pyright               # type check\n```\n\nSee [CONTRIBUTING.md](/NVIDIA-NeMo/labs-OO-Agents/blob/main/CONTRIBUTING.md) for the full workflow.\n\nIf you use NVIDIA-labs OO Agents in your research, please cite:\n\n```\n@techreport{nvidia_oo_agents_2026,\n  title  = {NVIDIA-labs OO Agents: Native Python Object-Oriented Agents},\n  author = {Furgale, Paul and Klingler, Severin and Nolan, James and Staats, Matt and\n            Di Lorenzo, Gaia and Martinez Abad, Elisa and Schueler, Christian and\n            Dinu, Razvan and Devoto, Alessio and Berard, Pascal and Kaplun, Gal and Sarafian, Elad and\n            Roveri, Riccardo and Derczynski, Leon and Silveira Cabral, Ricardo},\n  year   = {2026},\n}\n```\n\nApache 2.0. See [LICENSE](/NVIDIA-NeMo/labs-OO-Agents/blob/main/LICENSE) and [THIRD_PARTY_NOTICES.md](/NVIDIA-NeMo/labs-OO-Agents/blob/main/THIRD_PARTY_NOTICES.md).", "url": "https://wpnews.pro/news/nvidia-object-oriented-agents-an-agent-is-a-python-class", "canonical_source": "https://github.com/NVIDIA-NeMo/labs-OO-Agents", "published_at": "2026-07-27 14:34:18+00:00", "updated_at": "2026-07-27 14:52:47.476605+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools", "artificial-intelligence"], "entities": ["NVIDIA-labs", "NOOA", "NVIDIA", "GitHub", "OpenShell"], "alternates": {"html": "https://wpnews.pro/news/nvidia-object-oriented-agents-an-agent-is-a-python-class", "markdown": "https://wpnews.pro/news/nvidia-object-oriented-agents-an-agent-is-a-python-class.md", "text": "https://wpnews.pro/news/nvidia-object-oriented-agents-an-agent-is-a-python-class.txt", "jsonld": "https://wpnews.pro/news/nvidia-object-oriented-agents-an-agent-is-a-python-class.jsonld"}}