neuron-explorer
Steering-first neuron explorer for Qwen3.5-4B: push every MLP neuron, keep every rollout, browse the results
OpenCastor is the open source runtime that connects AI brains to robot bodies. Speak or type one sentence, a local model drafts a bounded plan, you sign it, and the wheels turn.
Developer toolsPython · AstroGitHub @craigm26OnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
OpenCastor — productized open-core RCAN runtime. Gateway-as-kernel + drivers + fleet + cloud bridge + UI. Layer 4 of the OpenCastor stack. See rcan.dev/compatibility for protocol versions.
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
Productized open-core RCAN runtime — gateway-as-kernel, drivers, fleet, cloud bridge, UI. The most fully-documented RCAN runtime; not the only one.
Peer runtime: opencastor and robot-md are first-class peer RCAN 3.x runtimes against a single ROBOT.md — see PEER_RUNTIMES.md for the side-by-side.
OpenCastor is an open-source runtime for embodied AI. It implements the RCAN open protocol and handles the hard parts: safety gates, multi-provider AI routing, hardware drivers, messaging channels, and fleet management.Read the full README ↗OpenCastor is an open-source robot runtime and product. It implements the RCAN open protocol and handles the hard parts: safety gates, multi-provider AI routing, hardware drivers, messaging channels, and fleet management.
It is one client of robot-md-gateway: castor up runs the gateway as a separate service beside the runtime (Ports). OpenCastor does not embed the gateway yet; the safety notice at the end of this README says what that means.
Point it at any LLM (Gemini, GPT-4.1, Claude, Ollama, and 13 more) and any robot body (Raspberry Pi, Jetson, Arduino, ESP32, LEGO) via a single YAML config. Your robot answers to WhatsApp, Telegram, Discord, Slack, and Home Assistant — and learns from its own experience through the Sisyphus self-improvement loop.
RCAN ≠ OpenCastor. RCAN is an independent open protocol — like DNS and ICANN, but for robotics. Any robot can implement RCAN without using OpenCastor. OpenCastor is one implementation that helped inform the spec.
Bounded Embodiment ≠ OpenCastor. The Bounded Embodiment test method and its kit test whether a machine stays within its declared physical limits when its commands come from a source that cannot be trusted, such as an AI model. Like the RCAN spec, they are vendor-neutral and do not depend on OpenCastor. One person maintains all three.
pip install "opencastor>=3.1"
The
>=3.1is load-bearing, not decoration. A barepip install opencastorresolves the old CalVer line (2026.4.23.0), because under PEP 440 a date sorts above3.x— and that wheel has nocastor upin it. Every install instruction in this repository uses this exact string. See docs/setup/pairing.md.
castor up # one command: scans the bus, writes the units, prints a pairing QR
castor up is the path the OpenCastor iOS app and the
flashable Pi image both use. It detects what is on the
I²C bus, picks an archetype, writes four systemd user units, and prints a QR
to scan. It starts on simulated wheels by design — turning on real PWM is a
deliberate later edit in gateway-policy.env.
Prefer the long-form wizard, or have no robot to detect yet?
castor setup # 4-step wizard, writes an rcan.yaml
castor init --shape rc-car # just a ROBOT.md, shaped like a car
castor init asks what shape the robot is before anything else — arm,
rc-car or sim — because every default it used to offer described an arm.
The rc-car manifest points at castor up, which is the only bring-up program
that knows that shape.
The wizard will:
~/.config/opencastor/<name>.rcan.yamlHave a Pollen Microduck? Skip the wizard — one command does everything:
castor duckIt finds the duck on your network, checks SSH and
robotgroup access (printing the exact fix if either is missing), asksrobotdfor live health, and writes the config. Thencastor duck testmakes it walk.
# Start the AI brain + REST API (port 8000 standalone; 8081 under `castor up`)
castor gateway --config ~/.config/opencastor/bob.rcan.yaml
# Start the cloud bridge (connects robot to Fleet UI — outbound-only)
castor bridge --config ~/.config/opencastor/bob.rcan.yaml
Every port below comes from castor/up.py: three adjacent services at
--base-port (default 8080), plus one fixed helper. Nothing else in this
repository should quote a different number for a castor up robot.
| Service | systemd user unit | Port | Answers |
|---|---|---|---|
Gateway (robot-md-gateway) | <name>-gateway.service | 8080 (base + 0) | /v1/invoke with signed receipts — the port in the pairing QR |
| Runtime (OpenCastor) | <name>-castor.service | 8081 (base + 1) | /health, /api/stop, /ws/telemetry |
| Console | <name>-console.service | 8082 (base + 2) | chat brains, /surface, /gaps |
| RRF key-resolver stub | <name>-rrf-stub.service | 8090 (fixed) | loopback kid lookup |
castor up --base-port 8110 moves the first three to 8110/8111/8112; the RRF
stub does not move, so a second robot on one host needs the stub's port
adjusted by hand. Standalone castor gateway (no castor up) still defaults to
8000 — that is a different program on a different port, not this table.
castor bridge setup # generates and optionally installs systemd services
docker run -it \
-v ~/.config/opencastor:/config \
-e OPENCASTOR_CONFIG=/config/bob.rcan.yaml \
ghcr.io/craigm26/opencastor:2026.4.1.0 \
castor gateway
| Profile | Description | Requires |
|---|---|---|
apple_native | Mac with Apple Silicon (M1–M4) — runs models on-device via Apple Foundation Models. No API key needed. | macOS, Apple Silicon |
mlx_local_vision | Mac with Apple Silicon — open-source models via MLX (Llama, Mistral, Qwen). More model choice than apple_native. | macOS, Apple Silicon |
ollama_universal_local | Any machine — runs local models via Ollama. Works on Mac, Linux, and Windows. | Ollama installed |
On Apple Silicon, apple_native is the default. The wizard will ask which Apple model profile fits your use case:
| Apple Profile | Use case | Guardrails |
|---|---|---|
apple-balanced ⭐ | General chat and robot commands — best starting point | Default |
apple-creative | Creative tasks, less restrictive output | Permissive Content Transformations |
apple-tagging | Classifying or labeling objects/scenes | Default |
[ app.opencastor.com / Fleet UI ]
│ Firebase / Firestore
│
[ Cloud Functions ] R2RAM enforcement + rate limiting
│
[ castor bridge ] outbound-only Firestore connection
│
[ castor gateway ] FastAPI REST + messaging channels
│
┌──────────────────────┐
│ Protocol 66 Safety │ ESTOP | confidence gates | bounds
└──────────────────────┘
│
[ Tiered Brain ] Gemini / Claude / GPT / Ollama / …
│
[ RCAN Config + Drivers ] .rcan.yaml → hardware abstraction
│
[ Robot Hardware ] Pi / Jetson / Arduino / SO-ARM101 / …
rcan.canonical_json(body) produces byte-identical serialization across Python and TypeScript SDKsrcan.build_* builders| Command | Description |
|---|---|
castor setup | Interactive onboarding wizard — config, RRN, Fleet UI QR code |
castor gateway | Start AI brain + REST API + messaging channels |
castor bridge | Start cloud bridge (Fleet UI connection) |
castor scan | Auto-detect connected hardware (USB, I2C, V4L2) |
castor doctor | System health check — providers, channels, hardware |
castor fix | Auto-fix common configuration issues |
castor status | Provider and channel readiness summary |
castor improve | Run Sisyphus self-improvement on recent episodes |
castor audit --verify | Verify audit chain integrity |
castor incidents verify | Walk the incident log's hash chain across rotations (0 links hold, 1 break, 2 no log) |
castor approvals | Review and approve pending high-risk commands |
castor deploy | Push config to a remote robot over SSH |
castor fleet | Discover and monitor all robots on the local network |
castor upgrade | Pull latest version + pip install + service restart |
Full reference: docs.opencastor.com/runtime/cli
Minimal bob.rcan.yaml:
rcan_version: "3.0"
metadata:
robot_name: bob
agent:
provider: google
model: gemini-2.5-flash
drivers:
- id: wheels
protocol: pca9685
channels: {}
That's it. castor gateway --config bob.rcan.yaml starts the REST API, messaging channels, and the self-improving loop.
Swap the AI brain with one line:
agent:
provider: anthropic
model: claude-sonnet-4-6
Protocol 66 is RCAN's mandatory safety layer. Current OpenCastor conformance: 94%.
Key invariants:
GuardianAgent has veto authority over unsafe actionsStopping a robot and un-stopping it: docs/safety/hold.md
covers the latch file, castor pause / castor resume, the e-stop clear code
and why a sensor latch clears only at the robot. It is a best-effort software
hold, not a hardware cut.
P66 manifest: sbom/ · Full spec: rcan.dev/docs/safety/
app.opencastor.com — sign in with Google to see your fleet.
Robots connect via castor bridge (outbound-only Firestore). No open ports on the robot side.
The LeRobot SO-ARM101 6-DOF serial bus servo arm is auto-detected via USB VID/PID (CH340, 0x1A86/0x7523).
pip install "opencastor[lerobot]>=3.1"
castor scan # detects arm + suggests preset
castor wizard --preset so_arm101 # guided config: follower / leader / bimanual
castor gateway --config so_arm101.rcan.yaml
castor scan counts connected Feetech boards and automatically suggests the right preset: single arm (follower or leader), or bimanual pair (ALOHA-style). Koch arms use the same detection path.
OpenCastor is an open-source robot runtime and product: drivers, AI routing, messaging channels, fleet management, the cloud bridge and the Fleet UI. In the layer model that the safety notice at the end of this README uses, it is Layer 4. It uses:
robot-md-gateway — Layer 3, the open gateway. OpenCastor is one client of it: castor up runs it as a separate service, and it applies only to commands that pass through it.RobotRegistryFoundation/rcan-spec — Layer 5, the wire protocol.The vendor-neutral pieces, the RCAN spec and the Bounded Embodiment test method and kit, do not depend on OpenCastor. RCAN-the-protocol is implementation-independent, and OpenCastor is one runtime that speaks it. The same person maintains OpenCastor and these pieces.
Everything else in the ecosystem is independent; adopt one, or all seven.
| Layer | Piece | What it is |
|---|---|---|
| Declaration | ROBOT.md | The file a robot ships at its root. YAML frontmatter + markdown prose. Declares identity, capabilities, safety gates. Spec + Python CLI. |
| Agent bridge | robot-md-mcp | MCP server that exposes a ROBOT.md to Claude Code, Claude Desktop, Cursor, Zed, Gemini CLI — any MCP-aware agent. |
| Wire protocol | RCAN | How robots, gateways, and planners talk. Signed envelopes, LoA enforcement, PQC crypto. Think HTTP for robots. |
| Python SDK | rcan-py | pip install rcan — RCANMessage, RobotURI, ConfidenceGate, HiTLGate, AuditChain. |
| TypeScript SDK | rcan-ts | npm install rcan-ts — same API surface for Node + browser. |
| Registry | Robot Registry Foundation | Permanent RRN identities. Public resolver at /r/<rrn>. Like ICANN for robots. |
| Runtime and product ← this | OpenCastor | This repo. Open-source robot runtime and product, and one client of robot-md-gateway. Connects LLM brains to hardware bodies: safety gates, multi-provider AI routing, 18+ hardware drivers, messaging channels, fleet management. |
See also: the ROBOT.md quickstart — one command puts a Bob-class robot in Claude Code via the MCP bridge.
| Project | Version |
|---|---|
| OpenCastor (this) | v2026.4.17.0 |
| Fleet UI | live |
| RCAN Protocol | live matrix |
| rcan-py | v2.0.0 |
| rcan-ts | v2.0.0 |
| ROBOT.md | v0.2.0 (schema v1.1) |
| robot-md-mcp | v0.1.3 |
| Robot Registry Foundation | v3.0 |
OpenCastor is Apache 2.0 and community-driven.
docs/claude/ — structure, API reference, env varsConformance is not certification.
Conformance to RCAN tracks (L1–L4 protocol, Gateway Authority, HIL Runtime Safety) is self-asserted via signed bundles and independently replayable from those bundles. Conformance is not certification. Certification requires audit by a qualified third-party body, which is intentionally out of scope for this project in 2026.
Where safety is meant to be enforced.
Physical limits are meant to be enforced at Layer 3 (
robot-md-gatewayand the actuator driver it calls), and only for commands that pass through it. OpenCastor (Layer 4) does not embed the gateway yet, so actuators it drives directly are not covered. Declaration alone (Layer 1) does not enforce safety. Agent host alone (Layer 2) is not the safety boundary. If a deployment lacks Layer 3, no safety claim attaches to it. Layer 3 is not a certified safety function, and hostile-input testing in simulation (October 2026) found motions it does not yet bound.
Apache 2.0 · by Craig Merry
Implements the RCAN open protocol. RCAN is an independent open standard — any robot or runtime can implement it.