Prometheus

Open-source, model-agnostic agent framework for local hardware. Wraps any LLM in a validation layer that catches malformed tool calls, retries with structured feedback, and enforces output schemas. The model is the agent. The harness is the vehicle.

GitHub Architecture

MIT License · Python 3.11+ · Active Development · 3,600+ Tests

Status: Active development. Expect rough edges. Fixes land weekly. Feedback welcome.

The Stack

One stack, three layers, all local-first. Each layer composes downward.

Cognition Catch and organize thought before it becomes work — voice in, spoken answers out, an idea engine for ADHD brains. OAra Voice ships first.
In Development
Beacon The desktop cockpit. Sits on Prometheus.
Live
Prometheus The agent harness. Stands alone on your hardware. You are here.
Live — Open Source
Runs on your hardware — llama.cpp · Ollama · your GPU
Origins

Everything that makes Prometheus interesting was built from scratch:

Prometheus is an original codebase, not a fork: 250 of its 309 Python modules were written from scratch — including everything that makes it interesting: the Model Adapter Layer, SENTINEL, SYMBIOTE, the Wiki Knowledge System, the coding engine, and the fine-tuning gym. Like most real software, it started on the shoulders of open source: early scaffolding (base file tools, cron, the engine skeleton) was adapted from MIT-licensed projects — chiefly OpenHarness, with smaller pieces from Hermes Agent and OpenClaw — and the engine has since diverged to under 4% code similarity with its starting point. Every adapted file names its source in a header comment; full notices live in NOTICE. Several other subsystems — the gateways, LSP integration, teacher escalation — were designed by studying prior art and implemented clean-room.

Core Systems
Agent Loop

Pydantic-validated tool calls, PreToolUse/PostToolUse hook pipeline, permission governance. Works with any model.

Lossless Context Management

DAG-based conversation compression. Every message persisted to SQLite. Old messages summarized into expandable nodes. FTS5 full-text search. Works within 32K context windows.

SENTINEL

Proactive background intelligence. Watches telemetry, sends nudges via Telegram during idle. AutoDream engine: wiki lint, memory consolidation, telemetry digest, knowledge synthesis. Budget-capped. Never exceeds autonomous trust level.

Wiki Knowledge System

Compounding knowledge base (Karpathy's LLM Wiki concept). Memory Extractor runs every 30 min. WikiCompiler builds entity pages with cross-references. Query results file back as new pages. Obsidian-compatible.

Security Gate

4-level trust: BLOCKED, APPROVE, AUTO, AUTONOMOUS. 8 always-blocked patterns + configurable deny lists. Workspace boundary enforcement. Bash intent analysis. Memory security scanning. Token-authenticated REST + WebSocket control plane.

Model Adapter Layer

Validator catches malformed tool calls. Formatter translates between model formats. Enforcer constrains output to valid schemas (configurable strictness per model). Retry engine with structured error feedback.

Coding Mode

Point the agent at a coding task and it iterates in a sandbox until the build and tests pass — "iterate-to-green." With LSP enabled, diagnostics feed type errors back into the same loop, so it self-corrects against compiler ground truth. The result is a reviewable diff — nothing touches your branches until you merge.

Fine-Tuning Flywheel

Successful tool-call traces and adapter repair-pairs are captured, stored, and mined into an exportable dataset (capture → store → miner → export). Browse collected pairs with /pairs. The data-collection half of a LoRA loop for the local model — training is on the roadmap. All of it fed by telemetry that never leaves your disk — your own training data, not someone else's — and one config line turns it off entirely.

Record a Skill

Demonstrate a task once — screen and DOM captured — and the daemon distills it into a reusable skill. Two-tier trust: auto-learned skills stay quarantined until you promote them.

Durable Runtime

Sessions survive daemon restarts. A running turn can be stopped mid-flight. Artifacts produced in chat are downloadable from the session.

Beacon Desktop

Beacon is the native desktop cockpit for the daemon — chat with live tool timelines, coding runs and a Loop Manager, documents with AI redlines, Kanban, and per-provider key management across thirteen views. It pairs with a one-time 6-digit code and works over localhost or your tailnet. The daemon stays the source of truth; Beacon is the window into it.

Beacon Mission Control connected to a freshly installed Prometheus daemon

Mission Control, freshly paired.

Beacon has its own page →
Architecture
Your Machine (or split across two)
│
├── Prometheus daemon (systemd)
│   ├── Agent Loop
│   ├── Telegram / Slack / Discord Gateway
│   ├── Heartbeat + Cron
│   ├── Memory Extractor
│   ├── Wiki Compiler
│   ├── SENTINEL
│   ├── LCM Engine
│   └── AnatomyScanner (infra self-awareness)
│
├── Model Provider (local or remote)
│   ├── llama.cpp         any GGUF model
│   ├── Ollama            one-line model pulls
│   ├── Anthropic API     Claude via API key
│   ├── OpenAI-compat     any provider with /v1/chat
│   ├── Gemini / xAI      xAI via API key or SuperGrok subscription OAuth
│   └── DeepSeek / Kimi (Moonshot) / GLM (Z.ai) / MiMo
│
├── SQLite databases
│   ├── memory.db
│   ├── telemetry.db
│   └── lcm.db
│
└── ~/.prometheus/
    ├── wiki/             knowledge base
    ├── sentinel/         dream logs
    ├── skills/auto/      learned skills
    └── workspace/        sandboxed execution

Runs single-machine or split brain/GPU across two boxes. All data in SQLite on your filesystem. Nothing phones home.

Install

Prerequisites: Python 3.11+, a running llama.cpp / Ollama / LM Studio / vLLM instance (or a cloud API key), optional bot tokens for the messaging gateways.

1. Clone & Install
git clone https://github.com/OAraLabs/Prometheus.git && cd Prometheus
pip install -e '.[full]'
2. Setup
prometheus setup      # detects llama.cpp / Ollama / LM Studio / vLLM, writes config, smoke-tests
3. Run
prometheus daemon     # always-on: web API + gateways + cron

If anything misbehaves, prometheus doctor checks every subsystem and prints a fix hint per failure.

On first daemon start a web API token is minted and printed once — re-print it with prometheus token show.

On Linux, prometheus install-service writes a systemd user unit so the daemon survives reboots.

Prefer setup from a couch? Skip prometheus setup and run prometheus daemon bare — it boots in setup mode and prints a one-time 6-digit pairing code. Beacon's wizard does the rest.

bash read_file write_file edit_file grep glob web_search web_fetch youtube_transcript download_file image_generate video_generate cron_create cron_delete cron_list task_create task_get task_list task_update task_stop task_output todo_write skill agent ask_user message tts notebook_edit dashboard browser anatomy audit_query lcm_grep lcm_expand lcm_describe lcm_expand_query wiki_compile wiki_query wiki_lint sentinel_status mcp_status * lsp * sessions_list sessions_send sessions_spawn

Read-only tools run in parallel via asyncio.gather. Mutating tools run sequentially. Security hooks fire on every call. Dynamic MCP tools extend the set at runtime.

* mcp_status and lsp register only when their subsystems are enabled.

Interface
CommandDescription
/startWelcome message
/statusModel, uptime, tools, memory stats, SENTINEL state
/helpList commands and capabilities
/resetClear conversation (identity persists)
/clearClear conversation context
/modelCurrent model and provider
/wikiWiki stats — page count, recent updates
/sentinelSENTINEL status and last dream results
/benchmarkRun evaluation suite
/contextToken budget breakdown with visual progress bar
/skillsLoaded skills
/profileSwitch agent profiles
/anatomyInfrastructure snapshot
/beaconWeb bridge status + links
/steerInject a mid-turn course-correction while the agent is working
/queueQueue a message for the agent to pick up after the current task
/pairsBrowse captured repair-pairs / golden traces
/approve /deny /pendingManage approval queue
/claude /gpt /gemini /xaiPer-session cloud provider override (xAI via API key or SuperGrok subscription)
/deepseek /kimi /glm /mimoPer-chat cloud override — expansion providers
/localClear override, return to primary local model
/routeShow this chat's current provider + model

Telegram, Slack, and Discord gateways run at parity — 40+ slash commands on Telegram. CLI REPL included, plus the Beacon desktop app.

Provenance

An original codebase, not a fork — the full account is in Origins above. Every adapted file names its source in a header comment; complete notices live in NOTICE.

Project Structure
prometheus/
├── src/prometheus/
│   ├── engine/          # Agent loop, sessions, streaming
│   ├── adapter/         # Model Adapter Layer (validator, formatter, enforcer, retry, router)
│   ├── providers/       # llama_cpp, ollama, openai_compat, anthropic, xai_oauth, registry
│   ├── tools/builtin/   # 40+ builtin tools
│   ├── hooks/           # PreToolUse / PostToolUse + hot reload + LSP diagnostics
│   ├── permissions/     # Security gate + audit + exfiltration + approval queue
│   ├── memory/          # LCM engine, wiki compiler, extractor, store
│   ├── context/         # Token budget, 2-tier compression, prompt assembly
│   ├── gateway/         # Telegram, Slack, Discord, cron, heartbeat, media cache, archive
│   ├── sentinel/        # Observer, AutoDream, wiki lint, memory consolidation
│   ├── mcp/             # MCP runtime, transport, adapter
│   ├── lsp/             # Language server client, orchestrator, diagnostics hook
│   ├── evals/           # LLM judge, metrics, failure classifier, trend tracking
│   ├── coordinator/     # Subagent spawning, divergence detection, checkpoint/rollback
│   ├── learning/        # Skill creator, skill refiner, periodic nudge
│   ├── infra/           # AnatomyScanner, project configs
│   ├── cli/             # Identity generation, migration tool
│   ├── skills/          # Skill loader + registry
│   ├── tasks/           # Background task manager (bash + agent tasks)
│   ├── telemetry/       # Tool call tracking + cost tracking
│   ├── tracing/         # Phoenix/OpenTelemetry spans
│   └── config/          # Settings, paths, env var overrides, profiles
├── templates/           # Identity templates (no personal data)
├── skills/              # 102-file skill library (opt-in)
├── tests/               # 3,600+ tests across 220+ files
├── docs/                # Architecture, model registry, sprint reports
├── audits/              # Timestamped audit reports (diffable across runs)
├── gym/                 # Eval & fine-tuning gym (repair-pair capture, benchmark tasks)
├── .githooks/           # Pre-commit hook (blocks secrets, Tailscale IPs, host refs)
├── config/prometheus.yaml.default   # Reference config (no secrets)
├── scripts/daemon.py    # Dev shim — the installed `prometheus daemon` is the entry point
└── PROMETHEUS.md        # Agent instructions (like CLAUDE.md)