Skip to content
GhostFrame edited this page May 11, 2026 · 9 revisions

Kleos

Persistent memory and cognitive infrastructure for AI agents. Written in Rust.

One binary. One SQLite database. Local ONNX embeddings. No cloud keys required.

Quick Links

Section Description
Architecture Runtime stack, module map, data flow, search pipeline
API Reference All HTTP endpoints grouped by function
Configuration Environment variables, TOML config, encryption setup
CLI Tools kleos-cli, agent-forge, kleos-migrate
Memory System Core memories, facts, scratchpad, entities, episodes, skills
Brain Backend Hopfield networks, spreading activation, dream consolidation
Deployment Docker, systemd, reverse proxy
Integration Guides Claude Code hooks, MCP server, sidecar
Operations Backup, monitoring, troubleshooting
Building from Source Prerequisites, build commands, cross-compilation

What Kleos Does

Kleos gives AI agents long-term memory with cognitive structure. Agents store observations, search by meaning, traverse a knowledge graph, and receive memories shaped by personality and spaced repetition.

Memory system:

  • 7 memory categories (task, discovery, decision, state, issue, general, reference)
  • FSRS-6 spaced repetition -- memories strengthen with use and fade when ignored
  • 4-channel hybrid search: vector similarity, FTS5 full-text, personality signals, graph traversal
  • Reciprocal Rank Fusion scoring with ONNX cross-encoder reranking
  • SimHash deduplication, atomic fact decomposition, contradiction detection

Knowledge graph:

  • Auto-linking via cosine similarity with typed edges
  • Louvain community detection, weighted PageRank
  • Entity cooccurrence tracking
  • Structural analysis

Coordination services:

  • Axon (event bus), Broca (action log), Chiasm (task tracking)
  • Soma (agent registry), Loom (workflow orchestration), Thymus (quality evaluation)

Developer platform:

  • REST API with 80+ endpoints across 56 route modules
  • MCP server with 57 tools for LLM integration (memory, context, graph, intelligence, services, structural, skills, admin)
  • CLI client, session sidecar, credential manager
  • Client SDKs: TypeScript, Python (Pydantic v2 + httpx), Go (stdlib-only)
  • Multi-tenant isolation, RBAC, audit logging, quota enforcement

Workspace

Crate Description
kleos-server HTTP API server (Axum, default port 4200)
kleos-cli Command-line client
kleos-lib Core library -- memory, search, embeddings, graph, intelligence, services, 50+ modules
kleos-cred Credential management CLI with YubiKey PIV support
kleos-credd Credential daemon (port 4400)
kleos-mcp Model Context Protocol server (stdio; HTTP behind feature flag)
kleos-sidecar Outbound sidecar that batches and ships audit/metrics posts with retry
kleos-migrate ETL tool: copies encrypted SQLCipher monolith into per-tenant shards
kleos-approval-tui Terminal UI for approval workflows
agent-forge Structured reasoning CLI with Tree-sitter AST parsing
kleos-sh Shell command execution sandbox
kleos-fs Filesystem access tools
kleos-cleanup Database cleanup and maintenance tool
kleos-ingest Standalone ingestion pipeline binary
eidolon-supervisor Supervisor daemon for agent orchestration
forge Core forge library (shared by agent-forge)

Getting Started

See the main README for installation and quick start. For a full table of contents, use the sidebar.

Home

What's New

Getting Started

Core Concepts

Subsystems

Reference

Guides

Components

Development

API Routes Details

Expand All API Routes

Clone this wiki locally