This is the main, full project documentation for Prometheus.
It explains:
- what the project does end-to-end,
- what runs by default,
- what optional native subsystems exist (including C/C++),
- install/uninstall and verification,
- architecture boundaries,
- and next steps from here.
Prometheus is a local-first engineering platform centered on a capability model.
Core behavior:
- Boot runtime services (
core/bootstrap.py) - Register capabilities (hardware, firmware, recovery, AI, security, engineering)
- Expose those capabilities through:
- CLI (
prometheus/python prometheus.py) - HTTP API (
backend/main.py) - assistant tools (
assistant/tools/*) - automation actions (
automation/actions/*)
- CLI (
- Run with simulated hardware by default; use real device backends when present
Primary operator surfaces:
- CLI:
prometheus --help - API health:
GET /health - API docs:
GET /docs
Yes, but optionally.
Prometheus runs without C/C++ by default using deterministic simulated hardware backends. If native HAL libraries are present, hardware managers switch to real backends automatically.
How this works:
hardware/hal/ctypes_bridge.pyloads shared libraries fromcpp/build/hal/...hardware/usb/manager.pyattemptsfrom hardware.hal.ctypes_bridge import UsbTransporthardware/serial/manager.pyattemptsfrom hardware.hal.ctypes_bridge import SerialTransport- On import/load failure, managers log fallback and use simulated devices
So you can use Prometheus heavily without touching C/C++, because simulation and Python-level hardware APIs are always available.
Boot entrypoint: core/bootstrap.py
Boot sequence:
- Initialize DB
- Build platform components (event bus, capability manager, APIs)
- Register capability families:
- hardware
- recovery
- AI
- distributed
- engineering
- intelligence
- security
- Register assistant tool capabilities
- Inject
CapabilityApiinto automation action dispatchers - Register plugins and agents
- Start scheduler (unless safe-mode)
Main container services registered include:
platform_service,delta_service,epsilon_service,omega_servicecapability_api,plugin_api,agent_api,device_apiknowledge_engine,memory_api,reasoning_apihardware_hal,hardware_session_manager,hardware_diagnostics- workflow runtime bindings
core/config.py- process config from env defaultscore/database.py- SQLAlchemy engine/sessioncore/container.py- service containercore/capabilities.py- capability registration and execution authorizationcore/bootstrap.py- complete runtime wiring
services/platform_service.py- high-level orchestration APIservices/capability_registry.py- base hardware capability registrationservices/hardware_capabilities.py- transport capability registrationservices/epsilon_service.py- HAL/session/diagnostics/recovery integrationservices/security_capabilities.py- security capability surfaceservices/ai_capabilities.py- AI capability surface
hardware/usb,hardware/serial,hardware/adb,hardware/fastbootmanagers- permission policies per transport (
permissions.py) hardware/drivers/*for transport and device-family drivershardware/hal/ctypes_bridge.pyfor optional native transport bridge
automation/actions/*.py- internal action dispatchersassistant/tools/*.py- plugin-capability descriptors + executors- both route through registered capabilities in normal runtime paths
backend/main.py exposes:
- system: health/status/stats/jobs/resources/baseline
- capabilities: discover/execute/history/health
- plugins/agents/memory/knowledge/workflows
- device + ownership + gamma/delta/epsilon/omega flows
- assistant/providers and command dispatch
- SSE event stream (
/events)
prometheus_cli/main.py commands include:
status,demo,testinstall,extensions,new,pack,verifyusb,serial,adblaunch(backend + optional distributed/cloud/frontend components)
Prometheus is multi-runtime, but the default install path is Python-first.
- orchestration, API, CLI, capability execution, automation, assistant tools
- source:
cpp/ - HAL CMake:
cpp/hal/CMakeLists.txt - provides shared libs loaded by Python ctypes bridge
- optional: system works without these libraries
go/andcloud/subsystems- started via
prometheus launchflags (--distributed,--cloud,--all)
crates/andzig/exist in repo- helper scripts exist under
scripts/build_rust_extensions.* - not required for the standard Python install/uninstall path
Windows:
- Install:
.\scripts\install_prometheus.ps1 - Uninstall:
.\scripts\uninstall_prometheus.ps1
Common options:
-Editable(install editable mode)-Python "C:\Path\python.exe"(specific interpreter)- uninstall with
-RemoveVenvto delete.venv-prometheus
macOS/Linux:
- Install:
bash scripts/install_prometheus.sh - Uninstall:
bash scripts/uninstall_prometheus.sh
Environment switches:
PYTHON_BIN,VENV_PATH,EDITABLE=1,REMOVE_VENV=1
Minimum sanity check:
prometheus --helpGET /healthafter starting serverGET /docs
- unit/integration tests under
tests/ - transport capability tests (ADB/Serial/USB and others)
- bootstrap and API smoke coverage
tests/hardware_regression/- per-device/per-transport validations
- firmware sub-suite under
tests/hardware_regression/firmware/
tests/hardware_stress/- serial stability, flash cycles, concurrent sessions
- tests marked
@pytest.mark.physical - executed only when
PROMETHEUS_RUN_PHYSICAL=1
Internal policy:
- dispatchers should route via
CapabilityApi(not direct hardware imports) - approved exceptions documented in
architecture/module-spec.md
Notable approved exceptions include:
sdk/usb.py,sdk/serial.py,sdk/adb.py,sdk/fastboot.pyengineering/device_simulator.py- logger cross-cutting usage in engineering modules
- CLI only:
prometheus status - API server:
python prometheus.py --server - minimal services:
python prometheus.py --safe-mode - full launcher:
python -m prometheus_cli launch --all
/health- runtime and component health/status- summarized platform state/capabilities- discover registered capabilities/system/services- service container registry/events- SSE stream of platform events
- packaging/import issues (missing modules in wheel)
- missing host binaries (Go/npm/native libs)
- permission mismatch in capability execution
- optional native HAL not found (falls back to simulation)
- Add CI pipeline stage:
- run install script
- run
prometheus --help - run uninstall script
- Add artifact checks:
- verify wheel contains
core,services,hardware,backend,prometheus_cli
- verify wheel contains
- Add release checklist updates in docs and workflow
Deliverable: every release proves clean install/run/uninstall.
- Split this file into user/developer/operator task guides
- Add endpoint map generated from backend routes
- Add capability map generated from registered capabilities at boot
- Add simulation-vs-real-hardware troubleshooting guide
Deliverable: no ambiguity about default runtime vs optional components.
- Complete SDK boundary audit for remaining modules
- Remove legacy direct-hardware fallback after one stable cycle
- Add startup assertion tests ensuring expected capabilities exist
Deliverable: consistent capability-first dispatch across runtime.
- Extend regression matrix and fixture realism
- Add flake tracking for stress tests and enforce thresholds
- Add physical-lab nightly gated pipeline
Deliverable: predictable reliability under concurrency and long-running use.
- Versioned install bundles + release notes
- First-run diagnostic command for environment validation
- Extension ecosystem docs and signed-package workflows
Deliverable: easier onboarding and safer extension adoption.
A milestone is complete only when:
- behavior is implemented and documented
- install/uninstall is validated on a fresh environment
- relevant tests pass (unit + regression + stress subset)
- capability permission behavior is verified
- operational runbook updates are included