Open Source Memory System

Your AI agents
finally
remember

Feive is a self-hosted, cross-agent memory system with a Palace structure for intelligent retrieval and a Dreaming system for autonomous memory consolidation.

Fei / Fly
+
Rêve
French / Dream
=
Feive
Flying Dreams

One memory, every agent

Feive unifies memory across all your AI agents through a single MCP server. No more fragmented context.

Palace Structure

Memories organized into Wings, Rooms, and Halls. Auto-classification routes each memory to the right location for 34% better retrieval accuracy.

Hybrid Retrieval

ChromaDB vector search for semantic matching, SQLite FTS5 for keyword fallback. Metadata filtering narrows the candidate set before semantic comparison.

Multi-Agent

Hermes, Claude Code, OpenClaw — all agents read from and write to the same memory. Each agent's contributions are tagged with source attribution.

Dreaming System

Nightly memory consolidation inspired by biological sleep: Light Sleep, REM pattern recognition, and Deep Sleep for archival. Auto-generates insights.

Full-Text Drawers

Every memory is stored as a human-readable Markdown file. The vector index can be rebuilt at any time from raw text. Your data, your format.

MCP Protocol

Standard Model Context Protocol server. Any MCP-compatible client can connect — Claude Code, Hermes, or your own agent. 11 tools out of the box.

4,678+
Memories Stored
5
Palace Wings
11
MCP Tools
3
Agent Integrations

Three layers, zero lock-in

Raw text at the bottom, intelligent indexes on top. Delete the index? Rebuild it. Switch models? No data lost.

Interface
MCP Server FastMCP, stdio transport
Auto-Recall Hook pre_llm_call injection
Auto-Capture Hook post_llm_call storage
Index
ChromaDB Vector search, cosine similarity
SQLite FTS5 Full-text search fallback
Palace Router Wing/Room/Hall auto-classify
Storage
Markdown Drawers Full text, human-readable, never deleted
Project State JSON, priority + urgency scoring

Sleep. Dream. Remember.

Inspired by biological sleep cycles, Feive runs a nightly consolidation process that deduplicates, discovers patterns, and archives stale memories.

I

Light Sleep

Scan all memories created in the last 24 hours. Generate a palace snapshot — total count, wing distribution, growth rate. Stage candidates for deeper analysis.

scan + snapshot
II

REM Sleep

Semantic deduplication at 0.85 threshold — merge similar memories, keeping the most complete version. An LLM extracts 1-3 non-obvious insights from the day's memories. Misclassified memories are re-routed.

dedup + insight + classify
III

Deep Sleep

Apply forgetting curves: memories older than 90 days with zero recalls are archived. Enforce hard limits on index size. Demote stale projects automatically. Generate a Dream Journal.

archive + demote + journal

Every agent, one memory

Each agent connects differently, but they all read from and write to the same palace.

Hermes
THE BRAIN
Primary conversation layer. Auto-recall before each response, auto-capture after. Full read/write via MCP + plugin hooks.
Auto R/W
Claude Code
THE NERVE CENTER
Technical execution. Auto-capture via Stop hook. Manual read/write through MCP tools. Builds and maintains the memory system itself.
Auto Write + MCP R/W
OpenClaw
THE HANDS
Automation layer — cron jobs, notifications, PLAUD processing. Manual read/write via MCP. Session capture on schedule.
MCP R/W + Scheduled

Five minutes to memory

# Clone and setup
git clone https://github.com/feive-memory/feive ~/.memory-hub
cd ~/.memory-hub
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt

# Configure
echo 'OPENAI_API_KEY=your-key' > .env

# Connect to Claude Code
claude mcp add --scope user memory-hub \
  -e OPENAI_API_KEY=your-key \
  -e MEMORY_HUB_PATH=~/.memory-hub \
  -- ~/.memory-hub/venv/bin/python ~/.memory-hub/server.py