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.
|
Antigravity |
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).
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:
- Every fact, attributed. One event per fact with
seqandagentPath;rawEvents()keeps every native payload verbatim (record stream). - Control with honest answers.
prompt,steer,queue,withdrawandabortanswer accepted or rejected with a typed code (conversation). Runtimes with native compaction also offercompact(contract). - Your own tools and subagents.
serveMcpToolsattaches host tools to any runtime;@botiverse/oar/agentshands work to other runtimes (host tools). - Views and tests.
@botiverse/oar/observefolds records for a UI, in a browser too;@botiverse/oar/testingis a scripted runtime with no binary or login.
What differs by runtime is declared on the Runtime, not guessed
(matrix). Entry points and setup:
package README.
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));
}
}- Installation: whether each runtime is installed, its version and where; install and update through the vendor's own installer and updater, and the minimum version OAR supports where a runtime has one.
- Account: log in, log out and status through the runtime's own login, without a terminal (OAR never handles the tokens); usage: plan, quota windows and their resets, and Codex and Claude limit resets.
- Models: what the installation can run now, with efforts and service tiers.
- Inventories: configured skills, commands, MCP servers and tools.
- Setup forms: settings as data a UI renders.
- Orientation: all of the above for every runtime in one bounded call.
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.jsonlEvery command: packages/cli (published as @botiverse/oar-cli).
- Raft: where people and agents work together; Raft Computers run agent runtimes through OAR.
- Kaze: a calm, quick browser for macOS and Windows, with an agent that works in your tabs.
- DeepSeek Harness:
subagent-oarhands DeepSeek Harness subagents to other runtimes. - repo-harness: file-backed workflow harness for Claude Code and Codex sessions.
- Eta: a self-contained multi-agent loop, runtime and app.
- dsh-agent-team: agent teams for DeepSeek Harness.
- dsh-engine-switch: a DeepSeek Harness plugin that hands the main session to another agent runtime.
- ducter: a personal AI that hands work to coding agents on your machines.
- tmux-agent-deck: control tmux sessions and coding agents from a web terminal.
Using OAR in a public project? Open a pull request to add it here.
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.
- Issues. Name the
@botiverse/oar(or@botiverse/oar-cli) version, the runtime and its version, and the OS; say what you called, what you expected and what happened; include the session's records that show it (session.records(), or a log fromoar run ... --record run.jsonl), redacted, and how you reproduced it in a real environment. One problem per issue. - Pull requests. Read docs/development.md first.
One change per pull request, rebased on
main, titled in Conventional Commits (fix(pi): ...); a fix comes with a test that fails without it; docs are updated in the same change;CI=1 pnpm run checkpasses (withoutCI=1, snapshot tests rewrite their snapshots instead of failing). Do not bump package versions or push tags: releases are cut by the maintainers. Say in the description how the change was verified in a real environment. - Never paste credentials, tokens, account identifiers or emails, or machine-local paths.
- Projects that use both Raft and OAR can ask contact@raft.build for a joint channel with the OAR team, to take part more directly.
- Design: why oar exists, its decisions and what comes next.
- Spec: the record stream and every contract built on it.
- Runtimes: what each runtime says natively and how oar maps it.
- Prior art: related projects compared feature by feature.
- Development: working in this repo.
ESM-only, Node entry requires Node.js 24+; the browser entry needs a modern browser with Web Crypto. Apache-2.0.
