Runtime Overview¶
The OpenCastor runtime is a Python process that runs on your robot and exposes a REST API + RCAN message bus.
Components¶
castor/
├── api.py ← REST gateway (FastAPI)
├── auth/ ← RCAN authentication, scopes, HMAC
├── harness/ ← Agent execution engine
│ ├── pattern.py ← Execution patterns (single, init/exec, multi)
│ ├── memory.py ← Memory backends (working, filesystem, firestore)
│ └── security.py ← OPA guardrails, telemetry
├── contribute/ ← Idle compute coordinator
│ └── credits.py ← Castor Credits accounting
├── compete/ ← Competition engine (Sprint, Bracket, Threshold)
├── compliance.py ← RCAN spec version enforcement
└── bridge/ ← MQTT ↔ RCAN transport bridge
Startup sequence¶
- Load config (
arm.rcan.yaml) - Validate RCAN compliance (
castor/compliance.py) - Register robot with fleet registry (Firestore)
- Start P66 watchdog
- Start REST gateway (
/api/*) - Start MQTT bridge (if configured)
- Start contribute coordinator (if enabled)