# SAGE

> Open-source memory infrastructure for AI agents. SAGE gives agents persistent institutional memory that survives across conversations, validates each write through BFT consensus, scores it for confidence, and decays it over time. Works over MCP and REST.

SAGE (Sovereign Agent Governed Experience) is persistent memory infrastructure for AI agents. It gives agents institutional memory that survives across conversations, validates each memory through Byzantine fault-tolerant consensus, attaches a confidence score, and lets stale memories decay naturally over time. Rather than a flat file or a vector database bolted onto a chat app, it is built on the same consensus primitives that power distributed ledgers.

## What It Is

SAGE runs as a self-hosted node that any AI client can write to and read from over the Model Context Protocol or a REST API. Each memory write passes through pre-validation, a signed vote transaction, and a BFT quorum before it commits, so the agent's recorded knowledge reflects validated consensus rather than unchecked input. It runs in a single-validator personal mode on one machine or scales to a multi-agent network where each node votes with its own consensus key.

## Consensus-Validated Memory

The system is built on CometBFT consensus with an application layer that handles validation, confidence scoring, decay, and Ed25519 signatures. A per-node memory auto-voter deduplicates and quality-checks each candidate memory, casting one signed vote per node before the quorum commits it. Confidence reflects both corroboration from independent agents and age-based decay, and an on-chain governance engine handles validator proposals and voting.

## CEREBRUM Dashboard

CEREBRUM is the built-in single-page dashboard for inspecting and managing memory. It renders memories as a force-directed neural graph with domain filtering, semantic search, and real-time updates, and includes an optional 3D MRI view that lays memories out anatomically inside a brain mesh. The same interface manages the agent network, configuring domain-level read and write permissions, clearance levels, key rotation, and downloadable bundles.

## Security and Access Control

Memory can be stored with optional AES-256-GCM encryption and Argon2id key derivation in what the project calls the Synaptic Ledger. Per-domain role-based access control gates every read path, so an agent without a grant on a domain cannot enumerate its contents, and clearance levels and multi-org federation extend the model across teams.

## Working With AI Clients

SAGE is designed to work with any AI, including Claude, ChatGPT, Gemini, and DeepSeek, through MCP tools for remembering, recalling, linking, and corroborating memories. For Claude Code it ships lifecycle hooks that enforce a boot, turn, and reflect memory cycle, and it offers a Python SDK and Docker images for programmatic and containerized deployments.

## Features
- Byzantine fault-tolerant consensus validation of every memory write (CometBFT)
- Confidence scoring with corroboration and natural time-based decay
- CEREBRUM dashboard with a force-directed neural memory graph and optional 3D MRI view
- MCP server tools for remember, recall, link, and corroborate
- REST API for programmatic access
- Per-domain role-based access control, clearance levels, and multi-org federation
- Optional AES-256-GCM encryption with Argon2id key derivation (Synaptic Ledger)
- Ed25519-signed memory and governance transactions
- On-chain governance for validator proposals and voting
- Multi-agent network management: add/remove agents, key rotation, LAN pairing
- Hybrid recall combining BM25 keyword and vector search via Reciprocal Rank Fusion
- Single-validator personal mode or multi-validator deployment
- Claude Code lifecycle hooks enforcing a boot, turn, and reflect memory cycle
- Python SDK and Docker images
- One-click updates from the dashboard

## Integrations
Claude, Claude Code, ChatGPT, OpenAI Codex, Gemini, DeepSeek, Model Context Protocol (MCP), Docker

## Platforms
MACOS, WINDOWS, LINUX, CLI, API, DEVELOPER_SDK

## Pricing
Open Source

## Version
10.8.5

## Links
- Website: https://l33tdawg.github.io/sage/
- Documentation: https://github.com/l33tdawg/sage/tree/main/docs
- Repository: https://github.com/l33tdawg/sage
- EveryDev.ai: https://www.everydev.ai/tools/sage-l33tdawg
