Helios
Receives git push webhooks so that memories anchored to repo config files are automatically flagged as [STALE]; also supports listing/enabling repo webhooks conversationally via the manage_git_webhooks tool.
Receives git push webhooks so that memories anchored to repo config files are automatically flagged as [STALE]; also supports listing/enabling repo webhooks conversationally via the manage_git_webhooks tool.
Receives git push webhooks so that memories anchored to repo config files (e.g. docker-compose.yml, prisma/schema.prisma) are automatically flagged as [STALE]; also supports managing repo webhooks via the manage_git_webhooks tool using a GitHub PAT.
Receives git push webhooks so that memories anchored to repo config files are automatically flagged as [STALE]; also supports listing/enabling repo webhooks conversationally via the manage_git_webhooks tool.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Heliossave that the staging API runs on port 8080 behind Caddy"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
☀️ Helios
The Token-Budgeted, Drift-Aware MCP Memory Engine for AI Coding Agents
Stop repeating architectural context across sessions. Stop agents from acting on outdated documentation.
Why Helios? • Quick Start • 1-Liner Client Setup • How Drift Detection Works • Architecture • MCP Tools
💡 Why Helios?
AI coding agents suffer from two fundamental failure modes: amnesia (forgetting ports, conventions, and architecture between sessions) and knowledge drift (trusting outdated facts after code and configuration files change).
Approach | Token Overhead | Handles Contradictions? | Detects Code/Config Drift? | Cross-IDE / Multi-Host? |
Static | High (loaded every turn) | ❌ Manual edits only | ❌ Silently goes stale | ❌ Per-machine / per-repo |
Vector / RAG Memory Servers | High (dumps long chunks) | ❌ Keeps old & new facts | ❌ Blind to | ⚠️ Usually cloud-locked |
☀️ Helios | Ultra-Low (≤ 25 words/fact) | ✅ Deterministic slot supersession | ✅ Git webhooks flag | ✅ Shared across IDE, CLI & SSH |
Core Design Pillars
Strict Token Diet: Enforces atomic, high-density facts (
≤ 25 wordsby default) so agent context windows stay lean, fast, and focused.Write-Through Architecture (Definition of Done): Replaces fragile deferred end-of-session memory saves with continuous, atomic persistence. Tasks altering infrastructure, ports, schemas, dependencies, or resolving non-obvious bugs are strictly incomplete until recorded in Helios.
Deterministic Lineage (AUDN Protocol): Facts operate on Add, Update, Deprecate, or No-op semantics. Saving a fact to an existing
(scope, subject)slot automatically supersedes the old fact and logs the transition in a historical audit trail.Git-Anchored Drift Detection: Memories can be anchored to repo configuration files (e.g.,
docker-compose.yml,prisma/schema.prisma). When agit pushmodifies an anchored file on GitHub, Forgejo, Gitea, or GitLab, Helios automatically flags the memory as[STALE]so your agent inspects the diff before acting.Dual-Plane Storage: Sub-millisecond SQLite WAL + FTS5 (BM25) full-text search for agents, mirrored into human-readable Markdown files (
/data/exports/<scope>.md) and crash-safe.tar.gzonline snapshots for developers.Live Day-2 Control Plane: Change word limits, episodic TTLs, scope aliases, and Git webhooks conversationally from your IDE without restarting containers.
Related MCP server: iranti
🚀 1. Quick Start: Server Deployment
Create a compose.yaml file (or paste directly into Dockhand / Portainer) and run docker compose up -d:
compose.yaml
services:
helios:
image: ghcr.io/brazaoo4/helios:latest
# Or to build locally from source:
# build: .
container_name: helios
restart: unless-stopped
user: "1000:1000" # Must match ownership of your host data directory
ports:
- "8000:8000" # Omit if routing internally via a reverse proxy network
volumes:
# [MANDATORY] Persistent storage for SQLite WAL (memory.db) & Markdown exports
- ./data:/data
environment:
# ========================================================================
# 1. MANDATORY / CORE SETTINGS
# ========================================================================
- TZ=UTC
- MEMORY_DATA_DIR=/data
# ========================================================================
# 2. RECOMMENDED SECURITY (Required if exposed outside a private LAN/VPN)
# ========================================================================
# Shared Bearer / ?token= key required for /mcp, /sse, and /export/*.
# Leave empty ONLY if running on a trusted local network or Tailscale mesh.
- HELIOS_API_KEY=
# Shared HMAC-SHA256 secret for verifying POST /webhook/git payloads.
# Generate with: openssl rand -hex 32
- HELIOS_WEBHOOK_SECRET=
- HELIOS_REQUIRE_WEBHOOK_SECRET=false
# ========================================================================
# 3. OPTIONAL: REVERSE PROXY & ENGINE TUNABLES (Also live-editable via MCP)
# ========================================================================
# Override base URL used in /setup scripts (auto-detected from proxy headers if empty)
- HELIOS_PUBLIC_URL=
- HELIOS_ALLOWED_ORIGINS=*
- HELIOS_WORD_LIMIT=25
- HELIOS_EPISODIC_TTL_DAYS=14
- HELIOS_CHANGELOG_LIMIT=100
# ========================================================================
# 4. OPTIONAL: CONVERSATIONAL GIT WEBHOOK MANAGER (manage_git_webhooks)
# ========================================================================
# Only needed if you want your AI agent to list/enable repo webhooks via chat.
# Leave empty if you prefer adding webhooks manually in your Git UI.
- HELIOS_GIT_PROVIDER= # forgejo | gitea | github | gitlab
- HELIOS_GIT_API_URL= # e.g., https://git.example.com or https://api.github.com
- HELIOS_GIT_TOKEN= # PAT with repo/webhook permissions
- HELIOS_GIT_OWNER= # Optional username/org filter
- HELIOS_WEBHOOK_URL= # e.g., https://helios.example.com/webhook/git
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1:8000/health"]
interval: 30s
timeout: 5s
retries: 3Pre-Flight Host Notes
Volume Permissions (
1000:1000): Helios runs rootless asuid=1000(gid=1000). Ensure your host bind-mount directory is owned by1000:1000before starting:mkdir -p ./data && chown -R 1000:1000 ./dataReverse Proxy (Nginx Proxy Manager / Caddy / Traefik): If exposing Helios over HTTPS, disable proxy buffering on your reverse proxy so SSE streams (
/sseand/mcp) flush immediately:proxy_buffering off; proxy_cache off; proxy_read_timeout 86400s;Cold-Boot Seeding (Optional): If you drop a
seed.yamlfile (see seed.example.yaml) into./data/seed.yaml, Helios will automatically ingest it on startup and rename it toseed.yaml.imported.
If you aren't pulling a pre-built image and want to build from the repository:
git clone https://github.com/brazaoo4/helios.git
cd helios
cp .env.example .env
mkdir -p data && chown -R 1000:1000 data
docker compose up -d --build⚡ 2. Client Installation for AI Agents
Helios supports zero-friction onboarding across Antigravity, Cursor, Claude Desktop, and Claude Code on Linux, macOS, and Windows.
2.1 Conversational AI Setup (1 Prompt)
Paste this single prompt into your coding agent (Claude Code, Cursor, Antigravity):
Fetch https://<your-helios-host>/setup and configure my local MCP client, global directives, and /remember skill.The agent fetches GET /setup, detects your OS and IDE, safely merges the "helios" server entry into your MCP JSON configuration without overwriting existing servers, adds the Helios directive block, and installs the /remember skill.
2.2 Instant Terminal 1-Liner Setup
Or run the automated onboarding script directly in your terminal:
Linux / macOS (Bash):
curl -fsSL https://<your-helios-host>/setup.sh | bashHeadless server CLI role (adds strict log-truncation rules like --tail=50):
curl -fsSL "https://<your-helios-host>/setup.sh?role=server-cli" | bashWindows (PowerShell):
irm https://<your-helios-host>/setup.ps1 | iexHeadless server CLI role:
irm "https://<your-helios-host>/setup.ps1?role=server-cli" | iexMulti-Client Auto-Detection & Token Passing:
The setup scripts automatically detect and configure Antigravity (mcp_config.json + GEMINI.md + /remember), Cursor (~/.cursor/mcp.json), Claude Desktop (claude_desktop_config.json), and Claude Code (claude mcp add).
If HELIOS_API_KEY is enabled, append ?token=<your_key> to the setup URL.
Client Configuration Paths & Snippets
Antigravity CLI / IDE (
~/.gemini/config/mcp_config.json|%USERPROFILE%\.gemini\config\mcp_config.json):{ "mcpServers": { "helios": { "url": "https://<your-helios-host>/mcp" } } }Cursor IDE (
~/.cursor/mcp.json|%USERPROFILE%\.cursor\mcp.json):{ "mcpServers": { "helios": { "url": "https://<your-helios-host>/sse" } } }Claude Desktop (
claude_desktop_config.jsonin~/.config/Claude/~/Library/Application Support/Claude/%APPDATA%\Claude):{ "mcpServers": { "helios": { "command": "npx", "args": ["-y", "mcp-remote", "https://<your-helios-host>/sse"] } } }Claude Code CLI:
claude mcp add --transport sse helios https://<your-helios-host>/sse
2.3 Safe In-Place Directive Management (<!-- HELIOS:START -->)
Helios encloses its global agent instructions inside idempotent HTML comment delimiters (GEMINI.md / CLAUDE.md / .cursor/rules/helios.mdc) so your personal custom rules are never overwritten:
<!-- HELIOS:START -->
# Global Agent Directives — Helios Memory Protocol
You are connected to Helios, a centralized token-budgeted memory engine.
1. Pre-Flight Check: Always call `recall_memories(scope="<current_repo>")` at task start.
2. Stale Protocol: When a memory is marked `[STALE]`, inspect `anchor_files` before relying on it.
3. Write-Through DoD: Any change to ports, stacks, dependencies, or bug fixes is INCOMPLETE until `save_memory()` is called.
4. Token Diet: Keep facts atomic (<= 25 words).
5. Distillation Audit: Run `/remember` before clearing context or after major milestones.
<!-- HELIOS:END -->Switch Machine Role (
workstation↔server-cli): "Runget_client_setup_bundle(action='switch_role', instance_role='server-cli')and update my directives."Clean Uninstall: "Run
get_client_setup_bundle(action='uninstall')and remove Helios from this machine."
🔄 3. How Git Drift Detection Works
When you save a memory tied to configuration files, Helios watches those files across commits:
# 1. Agent saves an anchored architectural fact:
save_memory(
scope="payments-api",
category="fact",
subject="db-pool",
content="PostgreSQL connection pool runs via PgBouncer on internal port 6432.",
anchor_files=["docker-compose.yml"]
)
# 2. Later, a developer pushes a commit modifying docker-compose.yml (commit a1b2c3d).
# Helios's webhook receiver automatically flags the memory as [STALE].
# 3. Next session, the agent runs pre-flight recall_memories(scope="payments-api"):
- #14 (payments-api/fact) **[db-pool]** PostgreSQL connection pool runs via PgBouncer on internal port 6432. `[STALE: docker-compose.yml modified in commit a1b2c3d]` _(anchors: `docker-compose.yml`)_
# 4. The agent inspects docker-compose.yml:
# - If the fact is still true: calls revalidate_memories(memory_ids=[14])
# - If the port changed: calls save_memory(..., subject="db-pool", content="...") to supersede #14!sequenceDiagram
autonumber
actor Dev as Developer / Agent
participant Git as Git Provider (GitHub/Forgejo/GitLab)
participant Helios as Helios (/webhook/git)
participant SQLite as SQLite Storage
Dev->>Git: git push (modified docker-compose.yml)
Git->>Helios: POST /webhook/git (HMAC verified, <= 1MB stream)
Helios->>SQLite: Match modified files against active anchor_files
Helios->>SQLite: UPDATE memories SET status = 'stale', stale_reason = 'commit sha'
Helios->>Dev: recall_memories returns [STALE: commit sha]
Dev->>Helios: Inspect diff & call revalidate_memories([id]) or save_memory()
Helios->>SQLite: UPDATE memories SET status = 'active' (and sync Markdown exports)🏗️ 4. System Architecture
flowchart TD
subgraph Clients["AI Clients & IDEs"]
AG["Antigravity CLI / IDE"]
CR["Cursor IDE"]
CD["Claude Desktop"]
CC["Claude Code"]
end
subgraph Ingress["Ingress & Security Layer"]
AGW["AuthGateMiddleware<br/>(Bearer Token / ?token=)"]
WHG["HMAC Webhook Ingress<br/>(GitHub / Forgejo / GitLab)"]
PUB["Public Setup & Health<br/>(/setup, /setup.sh, /setup.ps1, /health)"]
end
subgraph Core["Helios Core Engine (Starlette + FastMCP)"]
MCP["MCP Streamable HTTP & SSE<br/>(/mcp, /sse)"]
AUDN["AUDN Write Gate<br/>(Word Limit & Slot Supersession)"]
REVAL["Stale Drift Evaluator<br/>& Revalidation Gate"]
CONFIG["Layered Config Engine<br/>(SQLite > Env > Default)"]
EXP["Exporter Engine<br/>(_EXPORT_LOCK)"]
end
subgraph Storage["Storage Layer (SQLite WAL Mode)"]
SQL["memory.db<br/>(busy_timeout=10000, foreign_keys=ON)"]
FTS["Virtual Table memories_fts<br/>(BM25 Full-Text Search)"]
SETTINGS["runtime_settings Table<br/>(Live Day-2 Overrides)"]
ALIASES["scope_aliases Table<br/>(Dynamic Scope Resolution)"]
end
subgraph Egress["Sync & Observability Egress"]
MD["Markdown Mirror Sync<br/>(/data/exports/<scope>.md)"]
TAR["Online SQLite Snapshot<br/>(helios_portable_bundle.tar.gz)"]
end
Clients --> AGW
Ingress --> MCP
MCP --> AUDN
MCP --> REVAL
WHG --> REVAL
AUDN --> SQL
SQL --> FTS
SQL --> SETTINGS
SQL --> ALIASES
CONFIG --> SETTINGS
SQL --> EXP
EXP --> MD
EXP --> TARLayered Configuration Precedence
Runtime settings (HELIOS_WORD_LIMIT, HELIOS_EPISODIC_TTL_DAYS, HELIOS_CHANGELOG_LIMIT, HELIOS_GIT_*) resolve dynamically on every call without container restarts, while security boundaries (HELIOS_API_KEY, HELIOS_WEBHOOK_SECRET, MEMORY_DATA_DIR) remain locked to environment variables:
flowchart LR
A["1. SQLite runtime_settings<br/>(Live via manage_server_config)"] --> B["2. Environment Variables<br/>(.env / Docker Compose)"]
B --> C["3. Built-in Safe Defaults<br/>(src/config.py)"]🛠️ 5. MCP Tools Reference
Helios exposes 10 FastMCP tools with strict Pydantic field descriptions and worker-thread offloading:
Tool | Key Parameters | Purpose |
|
| Search active/stale memories in |
|
| Save or supersede an atomic memory (≤ |
|
| Batch-restore |
|
| Retire/archive an obsolete memory and log the reason in the scope's changelog. |
|
| Inspect superseded and archived records for time-travel debugging. |
|
| Manage aliases ( |
|
| View or modify runtime settings live ( |
|
| Interactively list owned repos and enable/disable drift webhooks on GitHub, Forgejo, Gitea, or GitLab. |
|
| Generate client MCP configs, |
| (none) | Trigger an online SQLite backup ( |
# 1. Search active and stale memories
recall_memories(
scope: str = "global",
query: str = "",
category: Literal["rule", "fact", "preference", "episodic", ""] = "",
status_filter: Literal["all", "active", "stale"] = "all",
limit: int = 8,
include_global: bool = True,
) -> str
# 2. Store or supersede an atomic memory
save_memory(
scope: str,
category: Literal["rule", "fact", "preference", "episodic"],
content: str,
subject: str = "",
anchor_files: list[str] | None = None,
replaces_id: int | None = None,
) -> str
# 3. Batch-clear [STALE] flags after verifying diffs
revalidate_memories(memory_ids: list[int]) -> str
# 4. Archive an obsolete memory
deprecate_memory(memory_id: int, reason: str = "") -> str
# 5. Inspect superseded/archived audit log
recall_history(scope: str = "global", limit: int = 10) -> str
# 6. Manage aliases, view scope counts, or rename scopes
manage_scope_alias(
alias: str = "",
canonical_scope: str = "",
action: Literal["set", "remove", "list", "rename"] = "set",
) -> str
# 7. Live Day-2 server configuration
manage_server_config(
action: Literal["list", "set", "reset"] = "list",
key: str = "",
value: str = "",
) -> str
# 8. Conversational Git webhook management
manage_git_webhooks(
action: Literal["list", "enable", "disable"] = "list",
repos: list[str] | None = None,
include_forks: bool = False,
) -> str
# 9. Client onboarding & lifecycle management
get_client_setup_bundle(
client: Literal["antigravity", "cursor", "claude-desktop", "claude-code", "all"] = "all",
os_platform: Literal["linux", "macos", "windows", "auto"] = "auto",
instance_role: Literal["workstation", "server-cli"] = "workstation",
action: Literal["install_or_update", "switch_role", "uninstall"] = "install_or_update",
) -> str
# 10. Generate crash-safe portable backup archive
export_bundle() -> str🌐 6. HTTP Endpoints & Organization Webhooks
6.1 HTTP Routes Reference
Method & Path | Auth Required | Description |
| No (Redacted) / Yes (Full) | Returns service health. Redacts database telemetry when |
| No | AI onboarding guide with non-destructive MCP config snippets. Accepts optional |
| No | 1-liner Linux/macOS Bash client installer ( |
| No | 1-liner Windows PowerShell client installer ( |
| Yes (if key set) | Lists generated Markdown scope export files and sizes. |
| Yes (if key set) | Generates and downloads |
| HMAC Signature | Universal Git push webhook receiver for |
| Yes (if key set) | MCP Streamable HTTP endpoint for modern protocol clients. |
| Yes (if key set) | MCP Server-Sent Events endpoint with session message support. |
6.2 Optional: Account-Wide / Organization Webhooks
In addition to selective per-repo activation via manage_git_webhooks, you can configure a single global webhook on your Git server:
Forgejo / Gitea: Go to Site Administration → Default Webhooks (
/admin/hooks) or Organization Settings → Webhooks, addhttps://<helios-host>/webhook/git(POST,application/json,HELIOS_WEBHOOK_SECRET, Push Events).GitHub: Go to Organization Settings → Webhooks, add
https://<helios-host>/webhook/git(application/json,HELIOS_WEBHOOK_SECRET, Just the push event).
🧪 7. Testing & Local Development
# Set up virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install development dependencies
pip install -r requirements-dev.txt
# Run linter & complete test suite
ruff check src/ tests/
pytest tests/ -q
# Validate declarative seed fact invariants
python -m src.seed --check📄 License
Helios is open-source software licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-only).
See CONTRIBUTING.md for contribution guidelines and SECURITY.md for vulnerability reporting.
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory for AI agents, for code, research and everyday life. Stale facts retire.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Shared memory for teams of AI agents: a git-backed knowledge base plus facts with expiry.
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI coding assistants with persistent project memory to retain architectural decisions, code patterns, and domain knowledge across sessions. It stores data locally in a SQLite database, allowing agents to remember, recall, and manage project-specific context using full-text search.0Apache 2.0
- AlicenseAqualityCmaintenancePersistent shared memory for AI coding agents. Stores facts as entity/key/value triples with hybrid semantic search, task checkpoints, and conflict resolution — shared across Claude Code, Codex CLI, and GitHub Copilot.16235 npm5AGPL 3.0
- AlicenseBqualityAmaintenancePersistent memory for AI coding agents, storing learned architecture decisions, patterns, and bug fixes in a local SQLite database with full-text search, enabling agents to recall information across sessions.662 npm1MIT
- AlicenseNot gradedqualityDmaintenancePersistent memory for AI coding agents with local-first, zero-cost, privacy-first SQLite/FTS5 storage and biological-inspired decay.18 npm3MIT