NVIDIA-labs OO Agents:原生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.