Open Source Knowledge Base Server and Multi-Agent Orchestrator for Persistent AI Memory

A developer has open-sourced a system that provides persistent memory for AI coding agents across sessions, eliminating the need to manually copy-paste context between conversations. The setup connects Claude.ai and Claude Code through a custom Model Context Protocol (MCP) server running on a private VPS.
Architecture and Components
The system consists of two main open-source projects:
- Knowledge Base Server: Acts as the central brain, built with Node.js, SQLite FTS5, Express, and Obsidian Sync. It ingests Obsidian vaults and Claude's memory directories, providing full-text search with ranked results and highlighted snippets.
- Agent Orchestrator (Daniel): Wraps Claude, Codex, and Gemini CLIs, enabling all three agents to share the same knowledge base and providing automatic failover when one agent hits rate limits or goes down.
Key Features
- Four MCP tools:
kb_search,kb_list,kb_read,kb_ingest - Web dashboard for manual document management
- CLI commands:
kb start,kb ingest,kb search,kb register - Self-learning capability: AI automatically updates its own
CLAUDE.mdinstruction files based on session outcomes - Three-tier storage (cold/hot/long-term) to prevent context drift
- Multi-agent failover with zero context loss during outages
Technical Implementation
The tech stack avoids vector databases and cloud dependencies, using SQLite FTS5 for token-optimized search. The workflow follows this path: Obsidian Vault (human curation) → KB Server (SQLite FTS5) → MCP Interface → Claude Code/Codex/Gemini (all share same brain).
The system includes an EXTENDING.md file written specifically for AI agents to read, allowing users to tell their agent "read EXTENDING.md and customize this for my setup" for automated configuration.
In a real-world test during a Claude Code outage, the orchestrator automatically routed to Codex, which SSH'd into the VPS, diagnosed the KB server, and provided recovery commands—all accessible from a phone via Termux with zero context lost.
The developer reports running this in production with three premium AI agents for approximately $60/month, accumulating context over 100+ sessions to enable one-shot clean code generation based on learned codebase patterns and preferences.
📖 Read the full source: r/ClaudeAI
👀 See Also

Benchmark Results: 6 Low-Cost Models vs. Claude Sonnet 4.6 for OpenClaw Orchestration
A developer tested six cheaper AI models against Claude Sonnet 4.6 as the main orchestrator for an OpenClaw setup. Only o4-mini matched Sonnet's perfect score, while others failed on critical judgment tasks like file inspection and delegation.

Claude DevTools: A Log Reader for Enhanced Claude Code Visibility
Claude DevTools is a local, open-source tool that reads Claude Code's existing log files in ~/.claude/ to provide detailed session visibility, including file operations with inline diffs, token breakdowns, context window visualization, and full subagent execution trees.

Spectr: An MCP That Writes App Specs from Screen Recordings for Pixel-Perfect Claude Clones
Spectr is an MCP server, CLI, and Claude Code skill that takes an .mp4/.mov screen recording of an iOS app and generates a 7-section spec.md with hex codes, font weights, spacing, transitions, and nav graph — eliminating the 30-minute manual spec writing per screen.

AgentWorkingMemory: A Local Memory System for AI Coding Agents
AgentWorkingMemory (AWM) is a local memory system that solves the session-to-session amnesia problem in AI coding agents. It uses a SQLite database, three local ML models (~124MB total), and integrates automatically via MCP to provide persistent, context-aware memory across Claude Code sessions.