英伟达实验室OO代理:原生Python面向对象代理
NVIDIA-labs OO Agents: Native Python Object-Oriented Agents
July 22, 2026
作者: Paul Furgale, Severin Klingler, James Nolan, Matt Staats, Gaia Di Lorenzo, Elisa Martinez Abad, Christian Schüller, Razvan Dinu, Alessio Devoto, Pascal Berard, Gal Kaplun, Elad Sarafian, Riccardo Roveri, Leon Derczynski, Ricardo Silveira Cabral
cs.AI
摘要
传统的智能体开发分散在提示词模板、工具模式、回调代码和工作流图中。我们提出NVIDIA面向对象代理框架(NOOA),这是一个模型无关的Python框架,用于构建可靠的AI智能体。NOOA采用更简洁的方式:智能体就是一个Python对象。其方法是模型可执行的操作,字段是状态,文档字符串是提示词,类型注解是契约。代码体仅为"..."的方法将在运行时由LLM驱动的智能体循环完成,而具有正常代码体的方法则保持标准确定性Python。这使得开发者和智能体拥有相同接口,因此智能体行为可以像其他软件一样被测试、追踪、重构和改进。
本文做出三项贡献:(1)提出"智能体即Python对象"编程模型及其背后的设计原则。对于Python已有的抽象,我们直接采用。智能体特有的能力——上下文、事件、状态渲染、长期记忆和经过验证的LLM循环——通过简单的Python式API暴露,使开发者和智能体共享同一熟悉的编程模型。(2)识别出NOOA首个(据我们所知)在统一界面上组合的六个面向模型的概念:类型化输入/输出、基于活对象的引用传递、代码即行动、可编程循环工程、显式对象状态、以及支持上下文和事件的模型可调用工具API。我们发现社区已在多个概念上趋于一致(通常作为实验性或部分特性),并通过对比促进进一步采纳。(3)在针对性能力测试以及SWE-bench Verified、Terminal-Bench 2.0和ARC-AGI-3等智能体与推理基准上,证明当前模型能有效使用此接口。
English
Traditional agent development is split across prompt templates, tool schemas, callback code, and workflow graphs. We present NVIDIA Object-Oriented Agents (NOOA), a model-agnostic Python framework for building reliable AI agents. NOOA takes a simpler approach: an agent is a Python object. Its methods are the actions the model can take, fields are its state, docstrings are its prompts, and its type annotations are contracts. A method whose code body consists of "..." is completed at runtime by an LLM-driven agent loop, while methods with normal bodies remain standard deterministic Python. This gives developers and agents the same interface, so agent behavior can be tested, traced, refactored, and improved just like other software.
This paper makes three contributions. (1) We present the agent-as-a-Python-object programming model and the design principles behind it. Where Python has existing abstractions, we adopt them directly. Agent-specific capabilities--context, events, state rendering, long-term memory, and validated LLM loops--are exposed through simple Pythonic APIs, so both developers and agents share one familiar programming model. (2) We identify six model-facing ideas that NOOA is, to our knowledge, the first to combine on a single surface: typed input/output, pass-by-reference over live objects, code as action, programmable loop engineering, explicit object state, and model-callable harness APIs for context and events. We find the community already converging on several of these ideas--often as experimental or partial features--and present the comparison to encourage further adoption. (3) We demonstrate that current models use this interface effectively, both in targeted capability tests and on agentic and reasoning benchmarks such as SWE-bench Verified and Terminal-Bench 2.0 and ARC-AGI-3.