Skip to content
BOS Contributors edited this page Nov 1, 2026 · 5 revisions

BOS — BrainOS

BOS + BSH — the agent runtime, and the desktop app built on it

BOS (BrainOS) is an open-source runtime for AI agents written in Rust, with first-class Python and JavaScript bindings. It gives you the agent loop, tools, skills, memory, an MCP client, and a publish/subscribe bus for multi-agent work — without gluing five libraries together.

BSH (BOS Harness) is the native desktop application built on that same runtime. Workspaces, chat, terminal, browser, editor, subagent runs, scheduled tasks, and an extension platform that a package can plug into at every seam.

They are one project: BSH is the first consumer of BOS, so a capability the app gains is a capability the crates and both bindings gain.

PyPI npm Rust CI License


Start here

If you want to… Go to
Use the app — sessions, terminal, browser, editor, extensions The BSH Desktop App
Put an agent in a Python program Getting Started · Python Guide
Put an agent in a Node.js program Getting Started · JavaScript Guide
Embed the engine in Rust Getting Started · Rust Guide
Connect tools you already have (MCP servers) MCP Client
Give the model domain knowledge Skills System
Remember things across runs Memory
Write an extension for the app Extensions
Point it at a model Configuration
Understand the internals Architecture
Compare it with other frameworks Why BOS / BSH

A 60-second taste

Python

pip install nbos
from nbos import BrainOS, tool

@tool("Add two numbers")
def add(a: int, b: int) -> int:
    return a + b

async with BrainOS() as brain:
    agent = brain.agent("assistant").with_tools(add)
    print(await agent.ask("What is 2+2?"))

JavaScript / Node.js

npm install @open1s/jsbos
import { BrainOS, ToolDef } from '@open1s/jsbos';

const add = new ToolDef(
  'add', 'Add two numbers',
  (args) => (args.a || 0) + (args.b || 0),
  { type: 'object', properties: { result: { type: 'number' } }, required: ['result'] },
  { type: 'object', properties: { a: { type: 'number' }, b: { type: 'number' } }, required: ['a', 'b'] },
);

const brain = new BrainOS();
await brain.start();
const agent = await brain.agent('assistant').register(add).start();
console.log(await agent.runSimple('What is 2+2?'));

Rust

use agent::{Agent, AgentConfig};

#[tokio::main]
async fn main() {
    let agent = Agent::from_config(
        AgentConfig::default()
            .name("assistant")
            .model("openai/gpt-4o")
            .api_key(std::env::var("OPENAI_API_KEY").unwrap_or_default()),
    );
    println!("{}", agent.run_simple("Hello").await.expect("run"));
}

The desktop app

git clone https://github.com/open1s/bos && cd bos
cargo build --release -p bsh
./target/release/bsh

What is inside

Layer What it does
Agent (crates/agent) ReAct integration, tools, skills, memory, MCP, sessions, hooks, policies, sandbox
Engine (crates/react) The reasoning/acting cycle, streaming, LLM client seam
Bus (crates/bus) Publish/subscribe, query/response, caller/callable RPC
Bindings nbos (PyPI) and @open1s/jsbos (npm), one vocabulary across both
App (crates/bsh) The native desktop harness and its extension platform
  • Tools — wrap a closure, or implement the trait; the agent calls them through the engine seam.
  • Skills — SKILL.md folders the model loads on demand: Skills System.
  • Memory — in-process or file-backed, with metadata filters: Memory.
  • MCP — stdio and HTTP servers, mapped to native tools/resources/prompts: MCP Client.
  • Sandbox — one policy engine (SBPL / Landlock + Seccomp / AppContainer) under the tool and terminal seams.
  • Extensions — a package can add tools, commands, panels, prompts, contexts, skills, themes, language services, agent roles, workflows, storage, events, or observation hooks.

Extensions in one minute

export BSH=./target/release/bsh
$BSH ext new com.acme.hello --dir hello
$BSH ext validate hello
$BSH ext mock hello echo '{"text":"hi"}'
$BSH ext install hello
$BSH ext list

Six runtimes — declarative, process, WASM component, Extism, MCP, and built-in Rust — behind one manifest, one capability policy, one audit log. Full walkthrough: Extensions.


Documentation

BSH by Example 34-chapter book on the app and its extension framework
Extension Standard The normative contract
User guides Python, JavaScript, Rust, rex CLI
README The project front page
Changelog · Releases What changed, and when

Community

If BOS or BSH saves you a day, star the repository — github.com/open1s/bos — it is how the next person finds it.

Version 3.0.2 · English · 中文 README

Clone this wiki locally