oar README

The project's README from github.com/botiverse/oar. As one markdown file: README.md.

OAR - programming interface for all agent harnesses

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.

Supported runtimes


Antigravity

Claude Code

Codex

Cursor

Grok Build

Kimi Code

Pi

Docs

Read To answer
docs/design/ Why oar exists and which design problems it treats as load-bearing
docs/spec/ Record-stream and query contracts
Conversation projection Build a conversation UI from requests, responses and native messages
docs/spec/inventory.md Independent native skills, MCP server and tool queries
docs/spec/subagents.md Subagents on any runtime, from a host or over oar mcp
docs/spec/update.md Update checks and upgrades through each runtime's own updater
docs/runtimes/ What each runtime says natively and how oar maps it
docs/development.md Working in this repo: validate changes, add a runtime, conventions
packages/cli/ The oar executable, published separately as @botiverse/oar-cli
docs/design/system.md How the library, evidence layer, projections, and continuation form one agent-facing system
docs/prior-arts/feature-comparison.md Surveyed projects compared by concrete features and evidence
docs/design/decisions.md Design decisions, their evidence, and conditions for reconsideration
docs/design/roadmap.md Which system improvements are next, and what evidence gates them

Library

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

const grok = runtimes.require("grok");
const installation = await grok.installation?.();

if (installation?.kind === "available") {
  const session = await grok.session(installation, { cwd: process.cwd() });
  session.events((event) => {
    switch (event.kind) {
      case "text_delta": process.stdout.write(event.text); break;
      case "tool_call_started": console.log(`[${event.tool}]`); break;
      case "turn_ended": console.log(event.outcome.kind); break;
    }
  });
  const run = await promptAndWait(session, "Inspect this repository", { timeoutMs: 120_000 });
  console.log(run.kind === "rejected" ? run.code : run.outcome);
  await session.dispose();
}

events() is the flat, attributed reading of the session: one Event per fact (native user message echoes, text, reasoning, background tasks, tool call start / progress / end, turn start and end, usage, model, effort, compaction, retry, app requests, control rejections, the process exit), with seq and agentPath on each. Pass { coalesceText: true } to get text in blocks instead of pieces. When the runtime's own frame matters, session.rawEvents() and session.records() expose the underlying record stream with every native payload verbatim.

CLI

npx @botiverse/oar-cli list
oar run claude "What does this repo do?" --record run.jsonl

ESM-only, requires Node.js 24+, Apache-2.0.

oar (botiverse/oar)

Searching Database…

198 ·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。
Creator
botiverse
Size
7.2 MB
Stars
198
Age
2mo
Commits · 90 Days