Anyone who has run AI agents for a while knows this. Agents don't learn. They just search. You have to explain today's context all over again, even though you explained it yesterday. They repeat this week the mistakes they made last week. When a session ends, everything resets. If the quality of the 100th conversation is the same as the first, it means all 99 conversations in between have evaporated.

I ran into this problem every day while running five agents on OpenClaw. I gave Zeon, Sion, Mion, Sano, and Raon different roles and designed a layered memory structure for them myself. But I eventually hit a structural limit: more conversations didn't make them smarter. They just made the context window bigger. I needed a system where agents could accumulate experience and evolve on their own. That frustration led me to build MemKraft.

Figure 01Source Telegram #143

Before building it, I tried quite a few existing open-source memory systems myself. Mem0 was good at automatic memory extraction and semantic search. Its design was clean: extract facts from conversations, store them as vectors, and retrieve them later based on similarity. But it depended on a vector database, and the stored knowledge wasn't human-readable. Letta, formerly MemGPT, was the first project to properly implement memory tiers and virtual context management. Its approach of letting agents edit their own memory and manage the context window through paging was innovative, but it required a full agent runtime. It was too heavy to add lightly to an existing stack. GBrain's dual structure of Compiled Truth and Timeline stood out, and Rowboat's Obsidian-based live tracking and meeting briefs were practical. Each had clear strengths, and clear limits too.

MemKraft brings together what I learned from these projects, built on three principles: zero external dependencies, plain Markdown, and no ties to any framework. There's no reason good ideas should be locked into a particular database or runtime.

Here's the core structure. When a conversation or text comes in, an automatic extraction pipeline pulls out people, organizations, concepts, and numerical facts. A MECE classification tree called RESOLVER takes these and routes each to exactly one destination. People go to entities/, decisions to decisions/, and raw captures to inbox/.

Every entity page has two layers. Compiled Truth is the current state. Who this person is, what organization they belong to, what they're doing now. It gets rewritten whenever something changes. Timeline is the change history. It records, in chronological order, what information came in, when, and from which source. It is never edited, only appended to.

Why two layers? With only the current state, the past disappears. With only a history, you have to read everything to understand the present. Compiled Truth is for quick judgments. Timeline is for tracing the basis of those judgments. Source Attribution ties into this. Every fact gets a [Source: who, when, through what channel] tag. A fact without a source is trust debt. It works for now, but someday it will cause trouble. MemKraft makes that debt visible, and Dream Cycle catches missing sources every night.

Multilingual support was one of the most practical reasons I built MemKraft. I mix Korean and English when talking to my agents, and I also work with Chinese and Japanese sources in investment research. Most existing memory systems are English-centered. Even when they handle CJK, it's secondary. MemKraft was designed to treat all four languages equally from the start.

For English, it detects names through Title Case pattern matching and filters them against a blocklist of common words. For Korean, it extracts Hangul syllables, then separates out particles. It strips particles like 이, 을, 를, 은, 는, 에, and 로, along with verb endings, to isolate the name itself. For Chinese, it detects surname + given name patterns using 100 built-in surnames. For Japanese, it matches against 85 surnames. It includes 806 Chinese, Japanese, and Korean stop words, and all of this runs on regular expressions and the standard library alone, without any LLM calls. It works the same way on a plane, offline, or inside a CI pipeline.

Memory is harder to maintain than to accumulate. Over time, duplicates appear, facts without sources quietly pile up, some pages grow bloated, and others have a name but no content. If a person has to manage all this manually, the memory system itself becomes another burden.

Dream Cycle automates this work. It runs six checks every night. Automatic daily note creation, missing-source flags, warnings for thin pages, duplicate detection through slug normalization (catching that simon-kim and Simon Kim might be the same person), flags for neglected inbox items, and marking bloated pages for compression. You preview with --dry-run first, then apply the changes if everything looks right.

Memory Tier divides knowledge into three tiers: Core, Recall, and Archival. Core is always included in context, Recall surfaces during searches, and Archival keeps historical records. Progressive Disclosure uses tokens in stages during a search. Level 1 scans the index for about 50 tokens, Level 2 returns section headers, and Level 3 gives you the full file. It goes only as deep as needed without filling the context window unnecessarily.

Installation takes one line. You need Python 3.9 or later, and nothing else. All knowledge is stored as plain Markdown files, so a single git push backs up the entire knowledge base. A Markdown file written in 2026 will be just as readable in 2036. Embeddings from a particular model might not even be decodable once that model is gone, but text files last forever.

It doesn't care which framework you use, either. Whether it's OpenClaw, LangChain, CrewAI, or an agent you built yourself, just call the CLI or import it as a Python library. More than 20 commands are available from day one, along with the workflows you need to run agents: Backlink, Fuzzy Search, Agentic Search, Meeting Brief, Open Loop Tracking, and Decision Distillation.

If you want to build agents that get smarter with every conversation instead of dumber, give it a try and leave some feedback. It's MIT-licensed. Use it however you like. Stars, forks, and PRs are all welcome!

seojoonkim/memkraftUltimate zero-dependency compound knowledge system for AI agents. Auto-extract, classify, search, and maintain memory in plain Markdown.GitHub · github.comOpen