oar README

项目的 README,来自 github.com/botiverse/oar。合并为一个 markdown 文件:README.md。

OAR - programming interface for all agent harnesses Built with Raft

OAR logo

OAR (Open Agent Runtime) is a provider-independent programming interface for coding-agent runtimes: a solid foundation for building agent workspaces and other applications.

Delete harness logic and focus on outcomes and UX.

OAR is built in the open: the agents and people working on it talk, review and ship on Raft, where you can follow along.

Supported runtimes


Antigravity

Bottega

Claude Code

CodeBuddy Code

Codex

Cursor

DeepSeek Harness

Devin

Factory Droid

Grok Build

Kimi Code

OpenCode

Pi

Qoder

Qwen Code

Pi Durable also runs through a host-owned Harness, including in a browser (demo).

Community runtimes

Shipped from @botiverse/oar/community and maintained outside the core team: a host adds one with its own deployment and credentials, so they are not in defaultRuntimes.


Mister Morph

Cybion

Dim

Library

One API drives every runtime: swap "claude" for "codex", "grok" or "pi" (with a model it has) and the code stays the same. An option a runtime cannot honor is refused before anything opens, never silently dropped.

import { defaultRuntimes, promptAndWait } from "@botiverse/oar";

const claude = defaultRuntimes.require("claude");
const installation = await claude.installation?.();
if (installation?.kind !== "available") throw new Error("claude is not installed");

const session = await claude.session(installation, { cwd: process.cwd(), model: "sonnet" });

session.events((event) => {
  // Every event says which agent it came from: [] is the root.
  if (event.kind === "text_delta" && event.agentPath.length === 0) process.stdout.write(event.text);
  if (event.kind === "tool_call_started") console.log(event.tool);
});

const run = promptAndWait(session, "Find and fix the flaky test", { timeoutMs: 600_000 });
// From your UI: steers the running turn, or queues where the runtime cannot steer.
await session.deliver("Leave the snapshots alone.");
console.log(await run);
await session.dispose();

// Later, even from another process: the same conversation.
const resumed = await claude.session(installation, { cwd: process.cwd(), resume: session.id });

A session gives you:

What differs by runtime is declared on the Runtime, not guessed (matrix). Entry points and setup: package README.

Without a session

The same API answers the questions a dashboard or setup wizard asks, for every runtime:

for (const runtime of defaultRuntimes.list()) {
  const installation = await runtime.installation?.();
  if (installation?.kind === "available") {
    console.log(runtime.id, await runtime.listModels?.(installation));
  }
}

CLI

The same API on the command line: set up runtimes on a machine (install, sign in, check usage and models) and run a turn to see what a runtime does, for setup, debugging and verifying OAR itself. oar mcp also lets an agent hand tasks to other runtimes.

npx @botiverse/oar-cli installation
oar install codex --plan
oar account login claude
oar account usage
oar run claude "What does this repo do?" --record run.jsonl

Every command: packages/cli (published as @botiverse/oar-cli).

Projects using OAR

See awesome-oar for a curated list of apps, agents, bridges, and plugins built on OAR. Using OAR in a public project? Open a pull request there to add it.

Contributing

Issues and pull requests are welcome, from people and from agents, including the agents of projects that use OAR. Issues are preferred. AI-written contributions are fine without a person checking them by hand, as long as the AI verified them in a real environment: the real runtime, a real account, a real task.

Docs

ESM-only, Node entry requires Node.js 24+; the browser entry needs a modern browser with Web Crypto. Apache-2.0.

oar (botiverse/oar)

正在搜索数据库…

553 ·GitHub
这是什么?OAR(Open Agent Runtime)是一个与提供方无关的编程接口,面向 Claude Code、Codex 和 Cursor 等编程智能体 harness,让你只需构建一次集成,而不必为每个智能体编写单独的 harness 逻辑。
这是库还是命令行工具?两者都是:oar 是一个你可以导入来读取和查询智能体会话的库,同时还提供一个独立的 CLI 可执行文件,以 @botiverse/oar-cli 之名发布。
怎么在我的项目里开始使用 oar?引入 oar 库并调用 session.events(),即可获得对编程智能体会话的扁平、归一化读取,或者安装 @botiverse/oar-cli 包,从命令行驱动各种运行时。
运行 CLI 需要什么?你需要 Node.js 24 或更新版本;CLI 包仅支持 ESM,所以较旧的 Node 环境或仅用 CommonJS 的项目无法直接加载它。
oar 会取代我现有的编程智能体吗?不会——oar 不安装也不运行智能体本身,它读取并控制你已有的 harness(Claude Code、Codex、Cursor 等),甚至更新也经由各个运行时自己的更新器进行。
oar 开箱即用支持哪些编程智能体?oar 目前支持 Antigravity、Claude Code、Codex、Cursor、Grok Build、Kimi Code 和 Pi 作为运行时。
从 events() 能得到什么?events() 返回一个扁平的 Event 对象列表——每个事实对应一个,例如文本、工具调用的开始/进度/结束、回合开始/结束、用量、模型、重试或进程退出——每个都带有 seq 编号和 agentPath 标记。
events() 和 rawEvents() 有什么区别?events() 是 oar 对会话的归一化扁平视图,而 session.rawEvents() 和 session.records() 则暴露底层的原生记录流,逐字保留每个运行时特定的负载,适用于需要原始帧的场景。
我能跨不同运行时运行子智能体吗?可以——oar 支持在任意受支持的运行时上运行子智能体,可以由宿主应用驱动,也可以通过“oar mcp”驱动,详见 docs/spec/subagents.md。
作者
botiverse
大小
15.1 MB
星标
553
时长
3个月
提交 · 90 天