BlackRoad OS Documentation

A sovereign AI operating system. 50 skills, 5 compute nodes, 52 TOPS of local inference, 275+ repositories.

What is BlackRoad OS?

BlackRoad OS is a self-hosted, sovereign AI operating system built on a fleet of Raspberry Pi nodes with Hailo-8 accelerators. It provides a tokenless gateway architecture where agents never embed API keys, a NATS pub/sub mesh for agent communication, and a memory system with FTS5 full-text search.

Key Capabilities

Products

Quick Start

Get BlackRoad OS running in your environment.

Prerequisites

Install the CLI

npm install -g @blackroad/operator

# Verify installation
br --version
br help

Configure

# Set gateway URL
br config set gatewayUrl http://127.0.0.1:8787

# Set default agent
br config set defaultAgent octavia

# Verify connectivity
br gateway health

First Commands

# Check system status
br status

# List available agents
br agents

# Invoke an agent
br invoke octavia "run diagnostics"

# Search the knowledge base
br search-all "NATS configuration"

The shell CLI provides 90 tool commands. Run br help to see them all.

Installation

Detailed setup for both TypeScript and Shell CLIs.

TypeScript CLI

git clone https://github.com/blackboxprogramming/blackroad-operator.git
cd blackroad-operator
npm install
npm run build
npm link

Shell CLI

chmod +x br
./br help
export PATH="$HOME/blackroad-operator:$PATH"

Environment Variables

VariableDefaultDescription
BLACKROAD_GATEWAY_URLhttp://127.0.0.1:8787Gateway endpoint
BLACKROAD_GATEWAY_PORT8787Gateway port
MCP_BRIDGE_TOKENBearer token for MCP bridge
DEBUG0Enable debug logging

System Architecture

How BlackRoad OS is designed.

High-Level Architecture

                    +------------------+
                    |   Cloudflare     |
                    |  95+ Pages       |
                    |  40 KV, 8 D1    |
                    |  10 R2, 18 tun  |
                    +--------+---------+
                             |
              +--------------+--------------+
              |       WireGuard Mesh         |
              |     anastasia hub 10.8.0.x   |
              +--+------+------+------+--+---+
                 |      |      |      |  |
            +----+  +---+  +--+  +---+ +-+---+
            |Alice| |Cec.| |Oct.||Aria| |Luc.|
            |.49  | |.96 | |.101||.98 | |.38 |
            +-----+ +----+ +----++----+ +----+

Tokenless Gateway

Agents never embed API keys. All LLM provider communication flows through the gateway.

[Agent CLIs] ---> [Gateway :8787] ---> [Ollama / Claude / OpenAI / Gemini]
                        |
                  Permission Matrix (agent-permissions.json)

Agent Communication

# NATS subjects
agent.octavia.task     # Task assignment
agent.octavia.status   # Status updates
fleet.heartbeat        # Fleet-wide heartbeat
mesh.broadcast         # Broadcast to all agents

Memory System

Persistent memory via SQLite with FTS5. 156,675 entries across 228 databases.

Gateway

The tokenless gateway is the security boundary for all AI provider calls.

Providers

ProviderFileEndpoint
Ollamaproviders/ollama.jsLocal :11434
Anthropicproviders/anthropic.jsapi.anthropic.com
OpenAIproviders/openai.jsapi.openai.com
Geminiproviders/gemini.jsgenerativelanguage.googleapis.com

Configuration

cd blackroad-core/gateway
node server.js
curl http://127.0.0.1:8787/v1/health

Gateway binds to localhost by default. Set BLACKROAD_GATEWAY_BIND=0.0.0.0 to expose externally.

Memory System

Persistent memory across sessions using SQLite and FTS5.

Core Scripts

ScriptPurposeKey Commands
memory-system.shJournal + chainstatus, summary, log
memory-codex.shSolutions DBsearch, stats, add-solution
memory-infinite-todos.shLong-running projectslist, show, add-todo
memory-task-marketplace.shClaimable taskslist, claim, complete
memory-til-broadcast.shShare learningsbroadcast, list, search
memory-indexer.shFTS5 searchsearch, rebuild, patterns
memory-security.shAgent identitystatus, identity, audit

Unified Search

br search-all "NATS configuration"
~/blackroad-operator/tools/search/index-all.py rebuild

REST API

Gateway REST API for agent invocation and system health.

Endpoints

MethodPathDescription
GET/v1/healthHealth check
GET/v1/agentsList agents
POST/v1/invokeInvoke agent

Health Check

curl http://127.0.0.1:8787/v1/health

{
  "status": "ok",
  "version": "1.0.0",
  "uptime": 86400,
  "agents": 5,
  "gateway": "tokenless"
}

Invoke Agent

curl -X POST http://127.0.0.1:8787/v1/invoke \
  -H "Content-Type: application/json" \
  -d '{"agent": "octavia", "task": "run diagnostics"}'

{
  "agent": "octavia",
  "result": "All systems operational...",
  "duration_ms": 1240
}

MCP Bridge API

MethodPathDescription
GET/Service info
GET/systemSystem status
POST/execExecute command
POST/file/readRead file
POST/file/writeWrite file
POST/memory/writeStore key-value
POST/memory/readRetrieve key-value
GET/memory/listList memory keys

Agent API

Programmatic agent invocation and management.

List Agents

curl http://127.0.0.1:8787/v1/agents

{
  "agents": [
    {"name": "octavia", "role": "architect", "status": "active"},
    {"name": "lucidia", "role": "dreamer", "status": "active"},
    {"name": "alice", "role": "operator", "status": "active"},
    {"name": "aria", "role": "interface", "status": "active"},
    {"name": "shellfish", "role": "hacker", "status": "idle"}
  ]
}

CLI Agent Commands

br agents
br agents --json
br invoke octavia "deploy to production"
br invoke lucidia "generate creative brief"
br invoke alice "check fleet health"

Fleet Nodes

5 Raspberry Pi compute nodes form the edge fleet.

NodeIPRoleHardware
Alice.49Gateway, DNS, DatabasePi-hole, PostgreSQL, Qdrant
Cecilia.96AI Inference16 Ollama, Hailo-8 (26T)
Octavia.101Gitea, Docker Swarm207 repos, Hailo-8 (26T)
Aria.98Frontend, UXWeb serving
Lucidia.38Web Apps, CI334 apps

Octavia IP is unstable. Lucidia SD is degrading.

Network

WireGuard mesh networking.

WireGuard Mesh

# Hub: anastasia (DigitalOcean NYC1)
# Subnet: 10.8.0.x / Port: 51820
wg show
ping 10.8.0.1

SSH Access

NodeUsersSudo
Alicealice, piNOPASSWD
Ceciliacecilia, blackroadNOPASSWD
OctaviapiNOPASSWD
Lucidiapi, octaviaNOPASSWD

Services

All services running across the fleet.

ServiceNodePort
GiteaOctavia3100
OllamaCecilia11434
QdrantAlice6333
PostgreSQLAlice5432
NATSMultiple4222
Pi-holeAlice80
AI GatewayFleet7000
WireGuardanastasia51820

Cloudflare Resources

Agent System

Autonomous agents with identity, communication, and coordination.

How Agents Work

  1. Identity — manifest with name, role, capabilities
  2. Communication — NATS pub/sub messaging
  3. Coordination — task marketplace
  4. Memory — persistent SQLite FTS5
  5. Gateway — tokenless AI provider access

Agent Lifecycle

agents/
  active/      # Currently running
  idle/        # Available
  processing/  # Working on tasks
  archive/     # Completed runs

Core Agents

The five core agents.

AgentRoleDescription
OctaviaThe ArchitectSystems design, strategy
LucidiaThe DreamerCreative vision, education
AliceThe OperatorDevOps, automation
AriaThe InterfaceFrontend, UX
ShellfishThe HackerSecurity, exploits

Invoking Agents

br invoke octavia "design the new auth system"

curl -X POST http://127.0.0.1:8787/v1/invoke \
  -d '{"agent": "octavia", "task": "design auth"}'

nats pub agent.octavia.task '{"task": "design auth"}'

Agent SDK

Build and deploy your own agents.

Agent Manifest

{
  "name": "my-agent",
  "role": "custom",
  "capabilities": ["code", "search", "deploy"],
  "gateway": "http://127.0.0.1:8787",
  "nats": "nats://127.0.0.1:4222",
  "memory": "~/.blackroad/my-agent.db"
}

Shell Agent Template

#!/bin/bash
set -e
AGENT_NAME="my-agent"
GATEWAY="http://127.0.0.1:8787"

curl -s -X POST "$GATEWAY/v1/agents/register" \
  -H "Content-Type: application/json" \
  -d "{\"name\": \"$AGENT_NAME\", \"role\": \"custom\"}"

nats sub "agent.$AGENT_NAME.task" | while read -r msg; do
  echo "Received task: $msg"
done

Security Model

Tokenless architecture with audit and permissions.

Principles

Verify No Leaked Tokens

./blackroad-core/scripts/verify-tokenless-agents.sh

Only Lucidia runs UFW. Other nodes rely on nftables NAT.

Authentication

JWT-based auth via auth.blackroad.io.

MCP Bridge Auth

export MCP_BRIDGE_TOKEN="your-token-here"
curl http://127.0.0.1:8420/system \
  -H "Authorization: Bearer $MCP_BRIDGE_TOKEN"

Contributing

How to contribute to BlackRoad OS.

Development Setup

git clone https://github.com/blackboxprogramming/blackroad-operator.git
cd blackroad-operator
npm install && npm run build
npm test
npm run format

Adding a CLI Command

  1. Create src/cli/commands/my-cmd.ts
  2. Register in src/cli/commands/index.ts
  3. Add tests in test/

Adding a Tool

  1. Create tools/my-tool/br-my-tool.sh
  2. Add route to br dispatcher
  3. chmod +x

All code is proprietary. CODEOWNERS requires @blackboxprogramming review.

Code Style

Conventions for BlackRoad OS code.

TypeScript

// Copyright (c) 2025-2026 BlackRoad OS, Inc. All Rights Reserved.
import { Command } from 'commander'

export const myCommand = new Command('my-cmd')
  .description('Do something')
  .action(async () => {
    console.log('done')
  })

Shell

#!/bin/zsh
# Copyright (c) 2025-2026 BlackRoad OS, Inc. All Rights Reserved.
GREEN='\033[0;32m'; RED='\033[0;31m'; NC='\033[0m'
DB_FILE="$HOME/.blackroad/my-tool.db"

case "$1" in
    list) sqlite3 "$DB_FILE" "SELECT * FROM items;" ;;
    *) echo "Usage: br my-tool [list]" ;;
esac