The Universal Runtime for Embodied AI
Project description
OpenCastor
The Universal Runtime for Embodied AI.
Stop writing boilerplate. Start building robot agents.
OpenCastor connects any AI model to any robot hardware through a single YAML config file. Swap brains (Claude, Gemini, GPT, Ollama) or bodies (Raspberry Pi, Jetson, Arduino) without changing a line of code.
Whether you have a $50 Amazon robot kit or a $50,000 industrial arm, OpenCastor makes it work.
Why OpenCastor?
| Feature | What it means |
|---|---|
| Universal Adapter | Switch between Claude, Gemini, GPT, or Ollama with one config change |
| Hardware Agnostic | Built-in drivers for PCA9685, Dynamixel, Serial, and more |
| Zero Friction | Unbox to agent in under 5 minutes |
| Safety First | Hard-coded safety layers prevent LLM hallucinations from causing physical damage |
| RCAN Compliant | Built on the open RCAN Standard for interoperability |
| Messaging Built-in | Control your robot via WhatsApp, Telegram, Discord, or Slack |
Quick Start
1. Install
Linux / macOS (one-liner):
curl -fsSL https://raw.githubusercontent.com/craigm26/OpenCastor/main/scripts/install.sh | bash
Windows 11 (PowerShell):
irm https://raw.githubusercontent.com/craigm26/OpenCastor/main/scripts/install.ps1 | iex
Manual install (any platform):
git clone https://github.com/craigm26/OpenCastor.git
cd OpenCastor
python3 -m venv venv && source venv/bin/activate
pip install -e ".[dev]"
Platform-specific notes
| Platform | Package Manager | Notes |
|---|---|---|
| macOS | Homebrew (auto-installed) | Apple Silicon & Intel supported |
| Ubuntu / Debian | apt | Includes RPi auto-detection |
| Fedora / RHEL | dnf | |
| Arch Linux | pacman | |
| Alpine | apk | |
| Raspberry Pi | apt | Enables I2C & camera automatically |
| Windows 11 | winget / choco | Native PowerShell, no WSL needed |
Installer flags: --dry-run (preview), --no-rpi (skip RPi detection), --skip-wizard
Verify installation: bash scripts/install-check.sh (or install-check.ps1 on Windows)
2. Run the Wizard
$ castor wizard
OpenCastor Setup Wizard v2026.2.17.11
Which Brain do you want to use?
[1] Anthropic Claude Opus 4.6 (Recommended)
[2] Google Gemini 2.5 Flash
[3] Google Gemini 3 Flash (Preview)
[4] OpenAI GPT-4.1
[5] Local Llama (via Ollama)
> Selection: 1
The wizard generates an RCAN config file, collects your API key, and optionally sets up messaging channels.
3. Run
castor run --config my_robot.rcan.yaml
Your robot is now online. Open http://localhost:8501 for the CastorDash web interface.
Swap Your Brain in One Line
Your robot's entire personality lives in a YAML config file powered by the RCAN Standard. Switch AI providers by editing one block:
# Option A: Anthropic Claude (Recommended)
agent:
provider: "anthropic"
model: "claude-opus-4-6" # Best reasoning & safety
# Option B: Google Gemini
# agent:
# provider: "google"
# model: "gemini-2.5-flash" # Stable. Also: gemini-2.5-pro, gemini-3-flash-preview
# Option C: OpenAI GPT
# agent:
# provider: "openai"
# model: "gpt-4.1" # 1M context, strong vision. Also: gpt-5
# Option D: Local / Offline
# agent:
# provider: "ollama"
# model: "llava:13b"
# url: "http://localhost:11434"
Architecture
[ WhatsApp / Telegram / Discord / Slack ] <-- Messaging Channels
|
[ API Gateway ] <-- FastAPI (castor gateway)
|
[ Claude / Gemini / GPT / Ollama ] <-- The Brain (Provider Layer)
|
[ RCAN Config ] <-- The Spinal Cord (Validation)
|
[ PCA9685 / Dynamixel / GPIO ] <-- The Nervous System (Drivers)
|
[ Your Robot ] <-- The Body
- Messaging Channels: Control your robot from WhatsApp, Telegram, Discord, or Slack.
- API Gateway: FastAPI server with REST endpoints, webhook receivers, and bearer-token auth.
- Provider Layer: Normalizes AI outputs into a standard
Thoughtobject (text + action JSON). - RCAN Validation: Checks actions against physical constraints (speed limits, range of motion, collision).
- Driver Layer: Translates high-level intent (
move_forward) into low-level signals (PWM, serial, I2C).
Supported Models (Feb 2026)
| Provider | Models | Best For |
|---|---|---|
| Anthropic | claude-opus-4-6, claude-sonnet-4-5-20250929 |
Reasoning, safety, complex planning |
gemini-2.5-flash, gemini-2.5-pro, gemini-3-flash-preview, gemini-3-pro-preview |
Video, multimodal, speed | |
| OpenAI | gpt-4.1, gpt-4.1-mini, gpt-5 |
Instruction following, 1M context |
| Ollama | llava:13b, any local model |
Privacy, offline, no API cost |
Supported Hardware
Pre-made RCAN presets for popular kits, or bring your own config:
| Kit | Price | Preset |
|---|---|---|
| Waveshare AlphaBot / JetBot | ~$45 | presets/waveshare_alpha.rcan.yaml |
| Adeept RaspTank / DarkPaw | ~$55 | presets/adeept_generic.rcan.yaml |
| SunFounder PiCar-X | ~$60 | presets/sunfounder_picar.rcan.yaml |
| Robotis Dynamixel (X-Series) | Varies | presets/dynamixel_arm.rcan.yaml |
| DIY (ESP32, Arduino, custom) | Any | Generate with castor wizard |
The Perception-Action Loop
OpenCastor runs a continuous observe-reason-act cycle:
- Observe -- capture camera frame + sensor telemetry
- Reason -- send to AI model, receive structured action JSON
- Act -- translate intent into motor commands with safety checks
- Repeat -- configurable latency budget (default 200ms)
from castor.providers import get_provider
from castor.drivers.pca9685 import PCA9685Driver
brain = get_provider(config["agent"])
driver = PCA9685Driver(config["drivers"][0])
while True:
frame = camera.capture()
thought = brain.think(frame, "Sort the recycling from the trash.")
if thought.action:
driver.move(thought.action.get("linear", 0), thought.action.get("angular", 0))
Docker
cp .env.example .env # Add your API keys
cp config/example.rcan.yaml config/robot.rcan.yaml # Or use castor wizard
docker compose up # Launch API + dashboard
# Or with a custom command:
docker compose run opencastor castor wizard # Interactive setup
docker compose --profile gateway up # Include messaging gateway
CLI Reference
Setup
castor wizard # Interactive setup wizard
castor quickstart # One-command: wizard + demo
castor configure --config robot.rcan.yaml # Interactive config editor
castor install-service --config robot.rcan.yaml # Generate systemd unit file
castor learn # Interactive step-by-step tutorial
Run
castor run --config robot.rcan.yaml # Perception-action loop
castor run --config robot.rcan.yaml --simulate # No hardware
castor gateway --config robot.rcan.yaml # API gateway + messaging
castor dashboard # Streamlit web UI
castor demo # Simulated demo (no hardware/API keys)
castor shell --config robot.rcan.yaml # Interactive command shell
castor repl --config robot.rcan.yaml # Python REPL with robot objects
Diagnostics
castor doctor # System health checks
castor fix # Auto-fix common issues
castor status # Provider/channel readiness
castor logs -f # Structured colored logs
castor lint --config robot.rcan.yaml # Deep config validation
castor benchmark --config robot.rcan.yaml # Performance profiling
castor test # Run test suite
Hardware
castor test-hardware --config robot.rcan.yaml # Test motors individually
castor calibrate --config robot.rcan.yaml # Interactive calibration
castor record --config robot.rcan.yaml # Record a session
castor replay session.jsonl # Replay a recorded session
castor watch --gateway http://127.0.0.1:8000 # Live telemetry dashboard
Config Management
castor migrate --config robot.rcan.yaml # Migrate RCAN config version
castor backup # Back up configs
castor restore backup.tar.gz # Restore from backup
castor export --config robot.rcan.yaml # Export config bundle (no secrets)
castor diff --config a.yaml --baseline b.yaml # Compare two configs
castor profile list # Manage named config profiles
Safety & Compliance
castor approvals # View/approve dangerous commands
castor privacy --config robot.rcan.yaml # Show sensor access policy
castor audit --since 24h # View tamper-evident audit log
castor audit --verify # Verify audit chain integrity
OpenCastor's safety kernel includes anti-subversion (prompt injection defense), work authorization for destructive actions, physical bounds enforcement (workspace/joint/force limits), tamper-evident hash-chained audit logs, and safety state telemetry at /proc/safety. See docs/safety-audit-report.md for the full architecture.
Network & Fleet
castor discover # Find RCAN peers on LAN
castor fleet # Multi-robot status (mDNS)
castor network status # Network config & Tailscale
castor schedule list # Manage scheduled tasks
Advanced
castor token --role operator # Issue JWT for RCAN API
castor search "battery low" --since 7d # Search operational logs
castor plugins # List loaded plugins
castor upgrade # Self-update + health check
castor update-check # Check for newer versions
Contributing
OpenCastor is fully open source (Apache 2.0) and community-driven. We want your help.
Get involved:
- Discord: discord.gg/jMjA8B26Bq -- chat with maintainers and the community
- Issues: GitHub Issues -- report bugs or request features
- PRs: Fork, branch, and submit -- see CONTRIBUTING.md for guidelines
- Twitter/X: @opencastor
Areas we need help with:
- Driver Adapters: ODrive, VESC, ROS2 bridges, ESP32 serial
- AI Providers: Mistral, Grok, Cohere, local vision models
- Messaging Channels: Matrix, Signal, Google Chat
- Sim-to-Real: Gazebo / MuJoCo integration
- Tests: Unit tests, integration tests, hardware mock tests
Every contribution matters -- from fixing a typo to adding a new driver.
License
Apache 2.0. Built for the community, ready for the enterprise.
Built on the RCAN Spec by Continuon AI.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opencastor-2026.2.18.4.tar.gz.
File metadata
- Download URL: opencastor-2026.2.18.4.tar.gz
- Upload date:
- Size: 278.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef99bfffedd7aba45c2dd7c43c0b7a8fc75acd07002493739a6deb41b4741069
|
|
| MD5 |
cf47622b7d9b4240c6c170387e720f42
|
|
| BLAKE2b-256 |
7269c9029b76568590e7c287a01bd820dca01429edb1406ac890d830d44e3d53
|
File details
Details for the file opencastor-2026.2.18.4-py3-none-any.whl.
File metadata
- Download URL: opencastor-2026.2.18.4-py3-none-any.whl
- Upload date:
- Size: 233.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9149c333d09b9fba5f7667c7c61bca5d2b10eab5961cf7023f2bcaa46e5f507
|
|
| MD5 |
aa5f8c26cbd3635556a7eab554cdc713
|
|
| BLAKE2b-256 |
a5b12c0d6dd3c7742e7ffba56889079c55081a8dc0f18b0e7713b875a6502635
|