跳到主内容
@wquguru
精选80MarkTechPost(RSS)产品发布/更新

NVIDIA 开源 NOOA:将 AI Agent 封装为单个 Python 类

NVIDIA AI Releases NOOA: An Object-Oriented Python Framework That Turns an AI Agent Into a Single Python Class

原文
发到 X
推荐理由

做 Agent 开发的工程师值得一看,NOOA 把 Agent 定义收敛成一个 Python 类,方法即动作、注解即契约,还给出 SWE-bench 82.2% 的实测和 token 减半的效率数据,建议直接 clone 仓库跑一遍。

NVIDIA Labs has open-sourced NOOA (NVIDIA Object-Oriented Agents), a model-agnostic Python framework for building AI agents. Agent development today is split across prompt templates, tool schemas, callback code, and workflow graphs. NOOA collapses all of it into one Python class. Methods are the actions the model can take. Fields are agent state. Docstrings are prompts. Type annotations are contracts the runtime enforces. A method whose body is ... is completed at runtime by an LLM-driven loop, while a method with a normal body stays deterministic Python. Developers and models therefore share one interface, so agent behavior can be tested, traced, refactored, and version-controlled like ordinary software. NVIDIA reports 82.2% on SWE-bench Verified, 86.8% on CyberGym L1, and 85.1% mean RHAE on ARC-AGI-3 — at roughly half the tokens of the open harnesses it was compared against.

NVIDIA Labs 已开源 NOOA(NVIDIA 面向对象智能体),这是一个与模型无关的 Python 框架,用于构建 AI 智能体。当前的智能体开发分散在提示模板、工具模式、回调代码和工作流图中。NOOA 将所有内容整合到一个 Python 类中。方法是模型可以采取的动作。字段是智能体状态。文档字符串是提示。类型注解是运行时强制执行的契约。方法体为 ... 的方法在运行时由 LLM 驱动的循环完成,而具有正常方法体的方法保持确定性的 Python。因此,开发者和模型共享一个接口,智能体行为可以像普通软件一样进行测试、跟踪、重构和版本控制。NVIDIA 报告在 SWE-bench Verified 上达到 82.2%,在 CyberGym L1 上达到 86.8%,在 ARC-AGI-3 上平均 RHAE 为 85.1%——所用 token 数量约为所比较的开放框架的一半。

Is it deployable?

它可以部署吗?

Yes, but only inside OS-level isolation. NOOA is Apache 2.0, installs with pip install nooa (v0.0.8, released July 30, 2026), and requires Python 3.12–3.13. PyPI classifies it as alpha, and NVIDIA describes it as a research preview. Agents can execute LLM-generated code, and NVIDIA states directly that its AST checks and module deny-lists are defense-in-depth guardrails, not a containment boundary. The containment boundary is a container, a VM, or NVIDIA OpenShell. Models are pluggable through LiteLLM, so hosted APIs, Ollama, and vLLM endpoints all work.

可以,但仅限于操作系统级隔离环境。NOOA 采用 Apache 2.0 许可证,可通过 pip install nooa 安装(v0.0.8,发布于 2026 年 7 月 30 日),需要 Python 3.12–3.13。PyPI 将其归类为 alpha 版本,NVIDIA 将其描述为研究预览版。智能体可以执行 LLM 生成的代码,NVIDIA 明确表示其 AST 检查和模块拒绝列表是纵深防御护栏,而非隔离边界。隔离边界是容器、虚拟机或 NVIDIA OpenShell。模型可通过 LiteLLM 进行插拔,因此托管 API、Ollama 和 vLLM 端点均可使用。

  • Company level: AI-native startups and mid-market platform teams building internal agents. Enterprise AI platform and applied-research groups running evaluations or pilots. Regulated production workloads should wait for a stable release.
  • Industries: developer tooling, cybersecurity, cloud and DevOps, data analytics, financial services operations, customer support.
  • Applications: repository issue triage and patching, terminal and infrastructure automation, vulnerability validation pipelines, large-batch classification and extraction over in-memory data, typed multi-agent orchestration.
  • 公司层面:构建内部智能体的 AI 原生初创公司和中型市场平台团队。运行评估或试点项目的企业 AI 平台和应用研究团队。受监管的生产工作负载应等待稳定版本。
  • 行业:开发者工具、网络安全、云和 DevOps、数据分析、金融服务运营、客户支持。
  • 应用:仓库问题分类和修补、终端和基础设施自动化、漏洞验证管道、内存数据上的大批量分类和提取、类型化多智能体编排。

An agent is a Python object

智能体是一个 Python 对象

NVIDIA Labs released NOOA (NVIDIA Object-Oriented Agents), a model-agnostic Python framework for building agents. Traditional agent development splits source across prompt templates, tool schemas, callbacks, and workflow graphs. NOOA collapses that into one class.

NVIDIA Labs 发布了 NOOA(NVIDIA 面向对象智能体),这是一个与模型无关的 Python 框架,用于构建智能体。传统的智能体开发将源代码分散在提示模板、工具模式、回调和流程图中。NOOA 将其整合到一个类中。

Methods are the actions the model can take. Fields are state. Docstrings are prompts. Type annotations are contracts enforced by the runtime. A method whose body is ... becomes an agentic method, completed at runtime by an LLM-driven loop; a method with a normal body stays deterministic Python the model can call as a tool.

方法是模型可以执行的动作。字段是状态。文档字符串是提示。类型注解是由运行时强制执行的契约。方法体为...的方法成为代理方法,在运行时由LLM驱动的循环完成;方法体正常的方法保持确定性Python,模型可以将其作为工具调用。

Two strategies ship. PredictStrategy is a single typed LLM call with a local retry loop on validation failure. CodeActStrategy runs an iterative Python REPL where the model calls execute_python(...) until it submits return_result(...), which is validated against the return annotation.

两种策略已发布。PredictStrategy是单个类型化LLM调用,在验证失败时带有本地重试循环。CodeActStrategy运行迭代式Python REPL,模型调用execute_python(...)直到提交return_result(...),该结果根据返回注解进行验证。

Six capabilities on one surface

一个界面上的六项能力

The research team identifies six model-facing ideas it claims to be the first to combine: typed input/output, pass by reference over live objects, code as action, programmable loop engineering, explicit object state, and model-callable harness APIs. NVIDIA scored fourteen frameworks and harnesses—LangGraph, Google ADK, PydanticAI, smolagents, Claude Agent SDK, OpenAI Codex, OpenHands, and others—against the same axes, and reports partial coverage everywhere else.

研究团队确定了六项面向模型的想法,并声称是首个将它们结合起来的:类型化输入/输出、对活动对象的引用传递、代码作为行动、可编程循环工程、显式对象状态以及模型可调用的工具API。NVIDIA对十四个框架和工具——LangGraph、Google ADK、PydanticAI、smolagents、Claude Agent SDK、OpenAI Codex、OpenHands等——按照相同的轴进行了评分,并报告其他所有地方都只有部分覆盖。

Pass by reference is the load-bearing one. Arguments arrive as live Python objects; the model sees only a bounded preview with the concrete type, true length, and a head/tail sample. A hundred-element list renders in about thirty tokens while the full variable stays in the REPL. Context is split into a cacheable static prefix, an append-only typed event history, and dynamic blocks at the tail, which preserves KV-cache reuse across turns.

引用传递是承重墙。参数作为活动Python对象到达;模型只看到有界预览,包含具体类型、真实长度以及头/尾样本。一百个元素的列表渲染大约三十个标记,而完整变量保留在REPL中。上下文被分为可缓存的静态前缀、仅追加的类型化事件历史以及尾部的动态块,这保持了跨轮次的KV缓存重用。

An optional memory subsystem attaches to an unmodified agent. Seven model-callable tools write and recall records ranked by ACT-R activation, all in one human-inspectable SQLite file.

可选的内存子系统附加到未修改的代理上。七个模型可调用的工具写入并检索按ACT-R激活排序的记录,全部存储在一个人类可检查的SQLite文件中。

Performance

性能

Capability tests ran 88 tests five times across ten models: 4,309 of 4,400 records passed (97.9%). A six-family stress subset covering batching, error recovery, and decomposition passed 84.7%, where the gap between small and frontier models widens from 3.2 to 23 points.

能力测试在十个模型上运行了88个测试五次:4,400条记录中通过4,309条(97.9%)。涵盖批处理、错误恢复和分解的六族压力子集通过率为84.7%,其中小型模型与前沿模型之间的差距从3.2个百分点扩大到23个百分点。

End-to-end, a benchmark-agnostic 253-line agent reaches 82.2% on SWE-bench Verified with GPT-5.5 at xhigh effort, against 78.6% for OpenCode and 78.2% for PI, and 79.8% with Opus 4.6. On Terminal-Bench 2.0 it reaches 73.0% at high effort versus 60.7% and 68.5%, though PI leads at xhigh with 75.3%. On CyberGym L1 it solves 86.8% with network access blocked, the top open-source result reported. On ARC-AGI-3, one agent with a one-page world-model skill reaches 50.2% mean RHAE with GPT-5.5 and 85.1% with GPT-5.6-sol, under $20 per game.

端到端地,一个与基准无关的253行智能体在SWE-bench Verified上使用GPT-5.5在xhigh努力级别下达到82.2%的准确率,而OpenCode为78.6%,PI为78.2%,使用Opus 4.6时为79.8%。在Terminal-Bench 2.0上,它在高努力级别下达到73.0%,而对比的60.7%和68.5%,尽管PI在xhigh级别以75.3%领先。在CyberGym L1上,它在网络访问被阻止的情况下解决了86.8%的问题,这是报告的最高开源结果。在ARC-AGI-3上,一个具有一页世界模型技能的智能体使用GPT-5.5达到50.2%的平均RHAE,使用GPT-5.6-sol达到85.1%,每局游戏成本低于20美元。

Efficiency is the more interesting result: 82.2% at roughly 1.1M tokens and ~28 model calls per task, against 2.2M tokens and 66 calls for PI at 78.2%. Trace analysis also credits validated termination—OpenCode stops when the model replies without a tool call, while NOOA requires a typed TaskResult carrying evidence and a verification command.

效率是更有趣的结果:82.2%的准确率大约消耗110万token和每次任务约28次模型调用,而PI在78.2%的准确率下消耗220万token和66次调用。痕迹分析还归功于验证终止——OpenCode在模型回复而不调用工具时停止,而NOOA要求输入带有证据和验证命令的TaskResult。

Key Takeaways

关键要点

  • An agent is one Python class—methods are actions, fields are state, docstrings are prompts, annotations are enforced contracts.
  • A ... method body becomes an LLM loop; a real body stays deterministic Python the model can call.
  • Pass by reference keeps large data live in the REPL, so no context compaction was needed on SWE-bench.
  • 82.2% SWE-bench Verified and 86.8% CyberGym L1 at roughly half the tokens of the compared open harnesses.
  • Apache 2.0 and pip-installable, but alpha—execute generated code only inside OS-level isolation.
  • 一个智能体就是一个Python类——方法是动作,字段是状态,文档字符串是提示,注解是强制契约。
  • 一个...方法体变成LLM循环;真实的主体保持确定性Python,模型可以调用。
  • 按引用传递使大数据保留在REPL中,因此在SWE-bench上不需要上下文压缩。
  • 在SWE-bench Verified上达到82.2%,在CyberGym L1上达到86.8%,而token消耗约为所比较的开源框架的一半。
  • Apache 2.0许可,可通过pip安装,但处于alpha阶段——仅在操作系统级隔离中执行生成的代码。

Check out the Paper, GitHub Repo and Technical Blog. Also, feel free to follow us on Twitter and don’t forget to join our 150k+ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.

查看论文、GitHub仓库和技术博客。此外,欢迎在Twitter上关注我们,别忘了加入我们的150k+ML SubReddit并订阅我们的新闻通讯。等等!你在Telegram上吗?现在你也可以在Telegram上加入我们。

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

关联信息,但可能不是同一事件