kioku-lite
Personal memory engine for AI agents. Tri-hybrid search, zero Docker, single SQLite file.
kioku-lite — kioku (記憶) means "memory" in Japanese: 記 (ki) to record, 憶 (oku) to remember. A lightweight, fully local memory engine that gives AI agents long-term memory with causal reasoning, using tri-hybrid search (BM25 + Vector + Knowledge Graph) in a single SQLite file.
Homepage · Docs · The Story · PyPI
Read the intro: Why I built a Knowledge Graph memory engine for my AI agents — also in 日本語 and Tiếng Việt
Why kioku-lite
Most agent memory systems store flat text or vectors. They can't answer "Why was I stressed last month?" because they don't track how events, emotions, and decisions connect. kioku-lite solves this with a Knowledge Graph on top of traditional search — running 100% local with no LLM calls.
| System | Infrastructure | LLM required | Search | Knowledge Graph |
|---|---|---|---|---|
| Mem0 | Cloud-managed | Yes (every write) | Vector + Graph | ✅ Managed |
| Claude Code | Flat markdown files | No | Context window only | ❌ |
| OpenClaw | SQLite per-agent | No | Semantic (embedding) | ❌ |
| kioku-lite | Single SQLite file | Agent-driven, zero extra | Tri-hybrid (BM25 + vector + KG) | ✅ Agent-driven |
vs Mem0: Mem0 targets production apps — managed cloud infra, automatic LLM extraction on every write. kioku-lite targets personal use — fully local, fully offline, the agent is already an LLM so no extra call needed. Full comparison: docs
Features
- Tri-hybrid search — BM25 (FTS5) + Vector (sqlite-vec) + Knowledge Graph (PPR for entity-focused queries)
- Temporal fact management — mark facts as superseded, track validity windows with
--include-historicalflag - Memory consolidation — detect stale edges via confidence decay, surface old memories for summarization
- Entity resolution — auto-dedup via dual-threshold (vector + name similarity), manual merge with audit trail
- Community detection — cluster detection and analysis integrated into consolidation pipeline
- Zero infrastructure — no Docker, no ChromaDB, no external servers
- Fully offline — FastEmbed ONNX embedding, no API keys needed
- Agent-driven KG — agent extracts entities and indexes them (no built-in LLM)
- CLI + Python API — works with any agent that runs shell commands
- Built-in personas — companion (emotion tracking) and mentor (decision tracking)
- Multilingual — 100+ languages via multilingual-e5-large
Getting started
Install and connect to your agent in 3 commands:
pipx install "kioku-lite[cli]"
kioku-lite init --global
kioku-lite install-profile companion
That's it. Your agent now has long-term memory with Knowledge Graph.
Full setup guides for each agent type:
- Claude Code / Cursor / Windsurf — copy-paste the guide, agent does the rest
- OpenClaw — auto-generates SOUL.md + TOOLS.md
Architecture
Agent (Claude Code, Cursor, …)
│
├─ save "..." ──→ SQLite FTS5 + sqlite-vec + Markdown backup
├─ kg-index <hash> ──→ GraphStore (nodes, edges, aliases, temporal validity)
├─ kg-invalidate / merge ──→ Temporal tracking, entity resolution audit
├─ search "..." ──→ BM25 ∪ Vector ∪ PPR(entities) → RRF rerank
├─ consolidate ──→ Decay stale edges, detect duplicates, surface old memories
└─ clusters / cluster ──→ Community detection & analysis
Temporal & Dedup Layers:
- Temporal validity:
kg_edges.valid_from/valid_until— query with--include-historical - Entity consolidation: auto-dedup via dual threshold (0.98 vector sim + 0.85 name sim)
- Confidence decay:
weight * 0.5^(days/half_life)for stale edge detection - Cluster-aware consolidation: groups related entities during dedup
kioku-lite never calls an LLM. The agent extracts entities from its own context, keeping the memory engine 100% local and LLM-agnostic.
Deep dive: System Architecture · Write Pipeline · Search Pipeline · KG Open Schema
Development
git clone https://github.com/phuc-nt/kioku-agent-kit-lite
cd kioku-agent-kit-lite
pip install -e ".[cli,dev]"
pytest
License
MIT © 2026 Phuc Nguyen
Metadata
Release files for kioku-lite 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| kioku_lite-0.2.0.tar.gz | 600.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kioku_lite-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 675.1 kB
Release files / kioku_lite-0.2.0.tar.gz
| Download URL | kioku_lite-0.2.0.tar.gz |
|---|---|
| Size | 600.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
55af640d136f38f443f03a9d29c58cd463adaccda47ed5b68a2f35f669afbaa9
|
|
BLAKE2b-256 checksum How to use checksums |
d61fe80f3f7f4b457ee66cd37190fef3ca17d0812ddd525dfdf4c99701ee9a94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / kioku_lite-0.2.0-py3-none-any.whl
| Download URL | kioku_lite-0.2.0-py3-none-any.whl |
|---|---|
| Size | 74.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3cf434d78ef33ddb2d7fdedbc8f3fc61c41575a3e4612da75e2aa544b3ca3aa1
|
|
BLAKE2b-256 checksum How to use checksums |
ccf3f3e095c4fd11f7e32c08dd81fd3067226cc891ffdd047aff06e9d43e3f26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for kioku-lite 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.