Brain4Agent
Brain4Agent is an open-source Python long-term memory store for AI agents that keeps past turns in one SQLite file and retrieves them with BM25, built first for Chinese, Japanese and Korean text, with no model calls in the core search.
Why it matters
For developers building agents that work in CJK languages, it gives a lightweight, offline memory layer that tells the agent which query words it never stored instead of returning a confident guess.
Highlights
- CJK text works out of the box using character bigrams, with an optional 20 MB jieba dictionary the README says raises hit@1 from 0.875 to 0.950 on its Chinese benchmark.
- Searches return evidence: corpus_missing lists question words the store never saw, and missing_terms shows what each session lacks.
- Ships as a CLI, a Python library and an MCP server with five tools (b4a_remember, b4a_recall, b4a_ask, b4a_session, b4a_stats).
- An optional hosted judge, off unless a key is set, can label results found, not_found or uncertain.
Taken from the project's own README, docs or launch page. Claims about speed or accuracy are the maker's unless stated otherwise.
Worth knowing: The README notes that a write triggers a full index rebuild on the next search (about 400 ms at 2,925 memories) and memory use of roughly 1.2 GB at 100k memories. Benchmarks are the project's own and are in Chinese.
Quick facts
| Pricing | Free |
|---|---|
| Free or paid | Free (open source) |
| License | Apache-2.0 |
| Language | Python (3.11+) |
| Platform | Windows and macOS stated; CLI, library and MCP server |
| GitHub stars | ★ 152 (as of 2026-11-13) |
| Maker | SparkofSpike (GitHub) |
Links
Related ranking
See how established tools compare in Best AI Agents That Do Tasks for You. New releases aren't scored until we review them against the rubric.
Checked 2026-11-13 from the tool's own pages. Prices and star counts change, so confirm on the official site. Listing here is not a ranking or an endorsement.
One email a week on AI that saves business owners time
Every Friday: one tool pick with the business use case, what changed in tools you already use, and the week's AI news in plain English. No spam.
Free. Unsubscribe any time. See our privacy policy.