Persistent Memory for
Claude Code

Kiroku automatically extracts knowledge from every Claude conversation, embeds it in a local vector database, and makes it searchable via MCP. Your AI assistant finally remembers.

$ npx kiroku init
Created ~/.kiroku/ directory structure
Database: ~/.kiroku/data/memory.sqlite

$ npx kiroku start
Proxy started (port 7778)
Worker started (PID 42891)
MCP config: .mcp.json

Launching Claude Code...

claude> what did we decide about the auth system?
Found 3 relevant memories:
1. Decided to use JWT with refresh tokens (0.95)
2. Auth module uses bcrypt for password hashing (0.88)
3. Session timeout set to 24 hours (0.82)

How It Works

Three invisible layers that give Claude Code a memory, without changing your workflow.

Transparent Proxy

Routes Claude API traffic through a local proxy that side-records every conversation turn to a JSONL queue. Zero latency impact.

Knowledge Extraction

A background worker processes each turn with an LLM to extract structured entities, facts, and relationships. Fully async.

Vector Search via MCP

Facts are embedded with bge-m3 and stored in SQLite + sqlite-vec. Claude queries them automatically through MCP tools.

Heat & Decay

A half-life system keeps frequently-accessed memories warm and lets stale knowledge fade. Your memory stays relevant.

Architecture

Three independent modules. All data stays local.

Claude Code | | ANTHROPIC_BASE_URL=http://127.0.0.1:7778 v [Aegis Proxy] ──> api.anthropic.com | | SSE side-record > .jsonl queue v [Memory Worker] ──> LLM extraction (OpenRouter/Ollama) | ──> bge-m3 embedding v [SQLite + sqlite-vec] (~/.kiroku/data/memory.sqlite) ^ | MCP stdio | [MCP Gateway] ──> memory_search, memory_save, sql_readonly ^ | Claude Code (automatic tool calls)

Features

Everything you need for AI-native project memory.

🔍

Semantic Search

Vector similarity + keyword matching. Claude finds relevant memories automatically through MCP, no manual tagging needed.

🔒

DLP Redaction

AWS keys, API tokens, GitHub PATs — all automatically detected and redacted before storage. Your secrets stay secret.

📈

Cross-Project Memory

Personal preferences and global knowledge persist across all projects. Claude remembers "always use bun" everywhere.

🔥

Heat & Decay

Half-life decay keeps memories fresh. Frequently accessed facts stay hot, unused ones cool down naturally.

💾

100% Local

All data stored in a local SQLite database. No cloud sync, no third-party storage. Your knowledge, your machine.

🛠

SQL Sandbox

Claude can run read-only SQL queries against your memory database for complex analysis, timeline queries, and cross-project stats.

Pricing

Start free. Upgrade when your memory grows.

Free
$0 / forever
Perfect for trying out AI memory
  • 500 facts stored
  • 50 daily extractions
  • Basic extraction prompt
  • Full MCP integration
  • DLP redaction
  • Vector search (embedding)
  • Premium extraction prompt
  • Priority support
Install Free

FAQ

Does Kiroku send my code to external servers?

No. The proxy records conversation turns locally. Extraction uses your own LLM API key (OpenRouter, Ollama, etc.). All extracted knowledge stays in your local SQLite database. The only network call Kiroku makes is the extraction LLM request.

What LLMs are supported for extraction?

Any OpenRouter model (Gemini Flash, Claude Haiku, Llama, etc.) or local Ollama models. The default is Gemini 2.0 Flash via OpenRouter — fast, cheap, and high quality.

Does it work with Claude Pro / Max subscriptions?

Yes. Kiroku transparently proxies to Anthropic's API. It works with any Claude plan that supports the API, including Pro and Max.

What's the difference between Free and Pro?

Free tier limits you to 500 stored facts, 50 daily extractions, and uses a basic extraction prompt without vector search. Pro removes all limits, enables vector similarity search with bge-m3 embeddings, and gives you the premium extraction prompt with higher accuracy.

Can I self-host everything?

Yes. Kiroku is designed to be fully self-hostable. Free tier works completely offline. Pro features require a license key for the premium extraction prompt, but all data processing happens locally.

How do I activate a Pro license?

After purchase, run kiroku activate <your-license-key>. The key is tied to your machine ID. You can deactivate and transfer to another machine anytime with kiroku deactivate.

Give Claude Code a memory.

Install in 30 seconds. No sign-up required for the free tier.