NVIDIA-NeMo/labs-OO-Agents

NVIDIA Object Oriented Agents: the Pythonic way to build AI Agents.

What it solves

NOOA provides a more intuitive, Pythonic way to build AI agents by consolidating prompts, tools, capabilities, and state into a single Python class. It eliminates the need to manage these as separate abstractions, allowing developers to use familiar software engineering practices like type annotations, docstrings, and object-oriented programming to define agent behavior.

How it works

The framework treats agents as Python objects. It uses a unique approach where methods with empty bodies (...) are designated as "generation methods" that are implemented at runtime by an LLM.

  • Prompts as Docstrings: The agent's docstring and method docstrings serve as the prompt.
  • Capabilities as Methods: Python methods define the agent's tools and interfaces.
  • State as Fields: Typed fields on the object store the agent's state.
  • Code as Action: The model interacts with the environment by writing Python code in a Jupyter-style REPL, accessing self and other helpers directly.

Who it’s for

Python developers building AI agents who want to use standard software development workflows (testing, tracing, and refactoring) and a model-agnostic framework that supports various LLMs via LiteLLM.

Highlights

  • Object-Oriented Interface: Unifies state, prompts, and tools within a single class.
  • LLM-Driven Methods: Allows seamless mixing of deterministic Python code and LLM-generated logic.
  • CodeAct Workflow: Uses a Python REPL for tool use, reducing the need for manual tool-schema definitions.
  • Model Agnostic: Supports a wide range of hosted and local models (e.g., Claude, GPT, Ollama, vLLM).
  • Integrated Tracing: Built-in support for tracing LLM calls and code execution via a dedicated CLI and viewer.

Related

  • Project
  • Project
  • Project
  • Project
  • Project