Skip to main content

The compound knowledge system for AI agents

Project description

MemKraft โ€” Zero-dependency compound memory for AI agents

MemKraft ๐Ÿง 

๐Ÿ”ด Without MemKraft: Session 100 = Session 1

๐ŸŸข With MemKraft: Every conversation makes the next one smarter

The ultimate compound knowledge system for AI agents โ€” auto-extract, cognify, track, tier, search, and maintain memory in plain Markdown with zero lock-in. A zero-dependency compound memory layer that turns raw conversations into an ever-growing, self-maintaining knowledge base.


Quick Start

pipx install memkraft
memkraft init
memkraft extract "Simon Kim is the CEO of Hashed in Seoul." --source "news"
memkraft brief "Simon Kim"

That's it. No API keys. No database. No config. Plain Markdown files you own.

More examples โ€” 6 daily patterns that cover 90% of use
# 1. Extract & Track โ€” auto-detect entities from any text
memkraft extract "Simon Kim is the CEO of Hashed in Seoul." --source "news"
memkraft track "Simon Kim" --type person --source "X/@simonkim_nft"
memkraft update "Simon Kim" --info "Launched MemKraft" --source "X/@simonkim_nft"

# 2. Search & Recall โ€” find anything in your memory
memkraft search "venture capital" --fuzzy
memkraft lookup "Simon" --brain-first
memkraft agentic-search "who is the CEO of Hashed"

# 3. Meeting Prep โ€” compile all context before a meeting
memkraft brief "Simon Kim"
memkraft links "Simon Kim"

# 4. Ingest & Classify โ€” inbox โ†’ structured pages (safe by default)
memkraft cognify            # recommend-only; add --apply to move files
memkraft detect "Jack Ma and ้ฉฌๅŒ–่…พ discussed AI" --dry-run

# 5. Log & Reflect โ€” structured audit trail
memkraft log --event "Deployed v0.2" --tags deploy --importance high
memkraft retro              # daily Well / Bad / Next retrospective

# 6. Maintain & Heal โ€” Dream Cycle keeps memory healthy
memkraft dream --dry-run    # nightly: sources, duplicates, bloated pages
memkraft diff               # what changed since last maintenance?
memkraft open-loops         # find all unresolved items

All 20+ commands available from day one.


Why MemKraft

MemKraft โ€” forge raw conversations into compound knowledge

AI agents start every conversation from zero. Six months later, the agent still doesn't know anything โ€” it just searches faster. Conversation 100 is no better-informed than conversation 1.

MemKraft fixes this.

Raw Input โ”€โ”€โ–ถ Extract โ”€โ”€โ–ถ Classify โ”€โ”€โ–ถ Forge โ”€โ”€โ–ถ Compound Knowledge
     โ–ฒ                                                โ”‚
     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Brain-first recall โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        maintained by Dream Cycle โ—€โ”€โ”€ nightly

Every fact has a source. Every entity has a timeline. Every night, Dream Cycle cleans the dross. Your next conversation starts sharper than the last.

Memory compounds Each conversation builds on all prior ones. The 100th conversation is the best-informed.
Structure enforces quality RESOLVER prevents duplicates. Source Attribution enforces trust. Tiers prioritize what matters.
Maintenance is automated Dream Cycle keeps memory healthy โ€” no manual curation required.
Knowledge is portable Plain Markdown, zero dependencies, any framework. If MemKraft disappears, your memory is still readable.
Provenance is non-negotiable Every fact traces back to a source. Facts without sources are trust debts.
Context is finite Memory tiers fill the context window with what matters. Bloated pages get flagged. Inspired by Recursive Language Models (Zhang et al., 2025).

Features

Ingestion & Extraction

Auto-extract Pipe any text in, get entities + facts out. Regex-based NER for EN, KR, CN, JP โ€” no LLM calls, instant results.
CJK detection 806 stopwords, 100 Chinese surnames, 85 Japanese surnames, Korean particle stripping. Multilingual out of the box.
Cognify pipeline Routes inbox/ items to the right directory. Recommend-only by default โ€” --apply to actually move.
Fact registry Extracts currencies, percentages, dates, quantities into a cross-domain index.
Originals capture Save raw text verbatim. No paraphrasing, no interpretation loss.

Search & Retrieval

Fuzzy search Built on difflib.SequenceMatcher. Works offline, on a plane, with zero setup.
Brain-first lookup Searches entities โ†’ notes โ†’ decisions โ†’ meetings. Stops after sufficient high-relevance results.
Agentic search Multi-hop: decompose query โ†’ search โ†’ traverse [[wiki-links]] โ†’ re-rank by tier and recency.
Progressive disclosure 3-level query for token efficiency. L1: index scan (~50 tokens). L2: section headers. L3: full file.
Backlinks Wiki-style [[entity-name]] cross-references. See every page that references an entity.
Link suggestions Auto-suggest missing [[wiki-links]] based on known entity names.

Structure & Organization

Compiled Truth + Timeline Dual-layer entity model: mutable current state + append-only audit trail with source tags.
Memory tiers Core / Recall / Archival โ€” explicit context window priority. promote to reclassify.
RESOLVER.md MECE classification tree โ€” every piece of knowledge has exactly one destination.
Source attribution Every fact tagged with [Source: who, when, how]. Enforced by Dream Cycle.
Live Notes Persistent tracking for people and companies. Auto-incrementing updates + timeline.

Maintenance & Audit

Dream Cycle Nightly auto-maintenance: missing sources, thin pages, duplicates, inbox age, bloated pages, daily notes.
Memory decay Older, unaccessed memories naturally decay โ€” keeps the knowledge base fresh.
Fact dedup Automatically detects and merges duplicate facts across entities.
Auto-summarize Condenses bloated pages while preserving key information.
Diff tracking See exactly what changed since the last Dream Cycle.
Open loop tracking Finds all pending / TODO / FIXME items across your entire memory.

Logging & Reflection

Session logging JSONL event trail with tags, importance, entity, task, and decision fields.
Daily retrospective Auto-generated Well / Bad / Next from session events + file changes.
Decision distillation Scans events and notes for decision candidates. EN + KR keyword matching.
Meeting briefs One command compiles entity info, timeline, open threads, and a pre-meeting checklist.

Architecture

MemKraft Architecture

Text-based architecture diagram
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                        MemKraft                          โ”‚
โ”‚                The Compound Knowledge Engine              โ”‚
โ”‚                                                          โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”              โ”‚
โ”‚  โ”‚  Extract  โ”‚โ”€โ–ถโ”‚ RESOLVER โ”‚โ”€โ–ถโ”‚ Classify โ”‚              โ”‚
โ”‚  โ”‚(auto-detect)โ”‚ โ”‚ (MECE   โ”‚โ”€โ–ถโ”‚ & Route  โ”‚              โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚  tree)   โ”‚  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜              โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ”‚                     โ”‚
โ”‚  โ”‚  Inbox    โ”‚โ”€โ”€โ”€โ”€โ”€โ”€โ–ถ Cognify โ”€โ”€โ”€โ”€โ”˜                     โ”‚
โ”‚  โ”‚ (capture) โ”‚     (recommend    โ”‚                     โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      by default)   โ”‚                     โ”‚
โ”‚                                     โ–ผ                    โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”              โ”‚
โ”‚  โ”‚ Decisions โ”‚  โ”‚ Entities โ”‚  โ”‚Live Notesโ”‚              โ”‚
โ”‚  โ”‚ (why)     โ”‚  โ”‚ (who)    โ”‚  โ”‚ (track)  โ”‚              โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜              โ”‚
โ”‚        โ”‚             โ”‚             โ”‚                     โ”‚
โ”‚        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                     โ”‚
โ”‚                      โ–ผ                                   โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                     โ”‚
โ”‚  โ”‚ Dream Cycle  โ”‚  โ”‚   Sessions    โ”‚                     โ”‚
โ”‚  โ”‚ (auto-heal)  โ”‚  โ”‚  (JSONL log)  โ”‚                     โ”‚
โ”‚  โ”‚ โ€ข sources    โ”‚  โ”‚              โ”‚                     โ”‚
โ”‚  โ”‚ โ€ข thin pages  โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                     โ”‚
โ”‚  โ”‚ โ€ข duplicates  โ”‚         โ”‚                              โ”‚
โ”‚  โ”‚ โ€ข inbox age   โ”‚         โ–ผ                              โ”‚
โ”‚  โ”‚ โ€ข bloated     โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                     โ”‚
โ”‚  โ”‚ โ€ข daily note  โ”‚  โ”‚  Retro &     โ”‚                     โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”‚  Distill      โ”‚                     โ”‚
โ”‚         โ”‚           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                     โ”‚
โ”‚         โ–ผ                                                 โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                     โ”‚
โ”‚  โ”‚    Diff      โ”‚  โ”‚  Open Loops  โ”‚                     โ”‚
โ”‚  โ”‚ (changes)    โ”‚  โ”‚  (unresolved)โ”‚                     โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                     โ”‚
โ”‚                                                           โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”‚
โ”‚  โ”‚ Progressive Disclosure: query --level 1|2|3    โ”‚       โ”‚
โ”‚  โ”‚ Brain-first Lookup: entities โ†’ notes โ†’ ...    โ”‚       โ”‚
โ”‚  โ”‚ Memory Index: .memkraft/index.json            โ”‚       โ”‚
โ”‚  โ”‚ Source Attribution: [Source: who, when, how]  โ”‚       โ”‚
โ”‚  โ”‚ Memory Tiers: core | recall | archival         โ”‚       โ”‚
โ”‚  โ”‚ Backlinks: [[entity-name]]                    โ”‚       โ”‚
โ”‚  โ”‚ Fact Registry: cross-domain numeric index     โ”‚       โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Memory Directory Structure

memory/
โ”œโ”€โ”€ .memkraft/           # Internal state (index.json, timestamps)
โ”œโ”€โ”€ sessions/            # Structured event logs (YYYY-MM-DD.jsonl)
โ”œโ”€โ”€ RESOLVER.md          # Classification decision tree (MECE)
โ”œโ”€โ”€ TEMPLATES.md         # Page templates with tier labels
โ”œโ”€โ”€ open-loops.md        # Unresolved items hub (auto-generated)
โ”œโ”€โ”€ fact-registry.md     # Cross-domain numeric/date facts
โ”œโ”€โ”€ YYYY-MM-DD.md        # Daily notes (auto-created by Dream Cycle)
โ”œโ”€โ”€ entities/            # People, companies, concepts (Tier: recall)
โ”œโ”€โ”€ live-notes/          # Persistent tracking targets (Tier: core)
โ”œโ”€โ”€ decisions/           # Why we decided what we decided
โ”œโ”€โ”€ originals/           # Captured verbatim โ€” no paraphrasing
โ”œโ”€โ”€ inbox/               # Quick capture before classification
โ”œโ”€โ”€ tasks/               # Work-in-progress context
โ””โ”€โ”€ meetings/            # Briefs and notes

Comparison

We respect every project in this space. Here's an honest look at the trade-offs.

The short version: Mem0 and Letta are excellent โ€” if you want vector search or a full agent runtime, use them. MemKraft is for teams who want portable, git-friendly memory with zero dependencies that works with any framework, offline, forever.

MemKraft Mem0 Letta GBrain Rowboat
Storage Plain Markdown Vector + Graph DB DB-backed Plain Markdown Plain Markdown
Dependencies Zero Vector DB + API DB + runtime Zero Desktop app
Framework Any API-first (Py/JS) Agent framework Claude-specific Obsidian
Offline / git-friendly Yes No No Yes Yes
Auto-extract (EN/KR/CN/JP) Yes Yes (LLM) โ€” โ€” โ€”
Cognify pipeline Yes โ€” โ€” โ€” โ€”
Progressive disclosure Yes โ€” โ€” โ€” โ€”
Agentic search Yes โ€” โ€” โ€” โ€”
Fuzzy search Yes Yes (vector) โ€” โ€” โ€”
Semantic search No Yes โ€” โ€” โ€”
Graph memory No Yes โ€” โ€” โ€”
Self-editing memory No โ€” Yes โ€” โ€”
Virtual context mgmt No โ€” Yes โ€” โ€”
Source attribution Required โ€” โ€” Yes โ€”
Memory tiers Yes โ€” Yes โ€” โ€”
Dream Cycle Yes โ€” โ€” โ€” โ€”
Memory decay + dedup Yes โ€” โ€” โ€” โ€”
Auto-summarize Yes โ€” Yes โ€” โ€”
Live tracking Yes โ€” โ€” โ€” Yes
Meeting prep Yes โ€” โ€” โ€” Yes
Session logging Yes โ€” โ€” โ€” โ€”
Backlinks Yes โ€” โ€” โ€” โ€”
Open loop tracking Yes โ€” โ€” โ€” โ€”
Decision distillation Yes โ€” โ€” โ€” โ€”
Cost Free Free tier + paid Free Free Free
Where each tool shines
  • Mem0 โ€” Best for API-first integration with vector retrieval and graph traversal. Strongest at semantic search and automatic memory extraction. MemKraft takes the auto-extraction idea but keeps everything in readable, git-friendly Markdown.

  • Letta (MemGPT) โ€” Best when you want a complete agent runtime with automatic context paging and self-editing memory. Pioneered tiered memory and virtual context management. MemKraft adopts tiers as a lightweight convention without requiring a runtime.

  • GBrain โ€” Best for Claude-specific workflows. The compiled-truth + timeline model was a direct inspiration. MemKraft generalizes it to be framework-agnostic and adds Dream Cycle, auto-extraction, and cognify.

  • Rowboat โ€” Best as an Obsidian desktop app for human-in-the-loop workflows. MemKraft incorporates live-tracking and meeting briefs into a CLI-first, programmable workflow that agents can call directly.

Choose MemKraft when: you want compound memory that's portable, transparent, git-friendly, and works with any agent framework โ€” without a database, API keys, or a running service.

Choose something else when: you need semantic/vector search, graph traversal, or a full agent runtime with virtual context management.


Installation

pipx install memkraft
More installation options
# Isolated install with pipx (recommended for CLI use)
pipx install memkraft

# Run without installing
pipx run memkraft brief

# From source
git clone https://github.com/seojoonkim/memkraft.git
cd memkraft && pipx install .

Don't have pipx?

brew install pipx && pipx ensurepath   # macOS

Requirements: Python 3.9+. Nothing else.

# Optional: set memory directory (default: ./memory)
export MEMKRAFT_DIR=/path/to/your/memory

How It Works โ€” Technical Design


Zero-dependency Philosophy

MemKraft runs on Python 3.9+ with zero external dependencies. No vector databases, no LLM API calls at runtime, no framework lock-in. Built entirely from the standard library: re for pattern matching, difflib for fuzzy search, json for structured data, pathlib for file operations.

Why? Because memory should be portable and permanent. A Markdown file from 2026 is still readable in 2036. A vector embedding from a proprietary model may not even decode. When you git push your memory directory, you're backing up knowledge in its most durable form.

Compiled Truth + Timeline (Dual-Layer Entity Model)

Every entity page is forged in two layers:

  • Compiled Truth โ€” the current state. Mutable, always rewritable. This is what an LLM reads first: role, affiliation, key context. When facts change, you re-forge this section.
  • Timeline โ€” an append-only log of every event, each tagged with [Source: who, when, how]. Never edited, only appended.

Why dual-layer? Because a single "current state" page silently overwrites history. The timeline is an audit trail โ€” it makes every claim traceable. Compiled Truth makes it actionable. Together, they give you both what we know now and how we got here.

Auto-Extract: Entity and Fact Detection

memkraft extract runs a multi-stage detection pipeline:

  1. English names โ€” regex for Title Case patterns, filtered against a common-word blocklist
  2. Korean names โ€” Hangul syllable extraction with particle stripping (์กฐ์‚ฌ ์ œ๊ฑฐ: ์ด, ์„, ๋ฅผ, ์€, ๋Š”, ์—, ๋กœ...) and verb-suffix removal
  3. Chinese names โ€” surname-first detection using 100 built-in Chinese surnames (็Ž‹ๆŽๅผ ๅˆ˜้™ˆๆจ่ตต้ป„ๅ‘จๅด...)
  4. Japanese names โ€” surname-matched detection against 85 Japanese surnames (็”ฐไธญ, ไฝ่—ค, ้ˆดๆœจ, ้ซ˜ๆฉ‹...)
  5. Fact extraction โ€” pattern matching for "X is/was/founded/leads Y" in English and Korean
  6. Stopword filtering โ€” 806 KR/CN/JP stopwords loaded from stopwords.json, cached per session

Cognify: Inbox Classification

The cognify command processes inbox/ items and recommends routing:

  • Contains "decided", "decision", "chose" โ†’ decisions/
  • Contains "todo", "task", "action item" โ†’ tasks/
  • Contains role words (CEO, CTO, founder, investor) โ†’ entities/
  • Default โ†’ entities/ for manual review

Recommend-only by default. Add --apply to actually move files. Files under 20 characters are skipped.

Source Attribution: Trust Chain

Every fact carries a [Source: who, when, how] tag. Dream Cycle scans for entries without attribution and flags them. Facts without sources are trust debts โ€” they work until they don't. MemKraft makes the debt visible.

Memory Tiers: Context Window Management

  • Core โ€” always in context. Live Notes default. Active people and projects.
  • Recall โ€” searchable, included when relevant. Entity default.
  • Archival โ€” historical, rarely accessed. Old decisions, completed projects.

memkraft promote reclassifies tiers as priorities shift.

Dream Cycle: Automated Maintenance

Six nightly health checks:

  1. Daily note fallback โ€” auto-creates daily note if missing
  2. Incomplete source attributions โ€” flags timeline entries without [Source: ...]
  3. Thin entity pages โ€” flags pages under 300 bytes
  4. Duplicate entity detection โ€” normalizes slugs, flags potential duplicates (e.g., simon-kim โ†” ๊น€์„œ์ค€)
  5. Overdue inbox items โ€” flags anything in inbox/ older than 48 hours
  6. Bloated pages โ€” flags pages over 4KB for compaction

Fuzzy Search

Uses difflib.SequenceMatcher โ€” no embedding model, no API calls. Compares the query against every line in every memory file, keeping matches above a 0.3 similarity threshold with ยฑ3 lines of context. Works offline, in CI, on a plane.

Backlinks

[[entity-name]] syntax (compatible with Obsidian, Logseq). memkraft links "Entity Name" scans all .md files and returns referencing files with surrounding context.

RESOLVER.md: MECE Classification

A decision tree that ensures every piece of knowledge has exactly one correct destination. Prevents the two most common memory diseases: duplicates and orphans.

Full CLI Demo


# Initialize the forge
$ memkraft init
โœ… MemKraft initialized at memory

# Auto-extract entities and facts from any text
$ memkraft extract "Simon Kim is the CEO of Hashed. Hashed is a VC in Seoul." \
    --source "X/@simonkim_nft"
[
  {"name": "Simon Kim", "type": "person", "context": "auto-detected", "source": "X/@simonkim_nft", "action": "created", "path": "entities/simon-kim.md"},
  {"entity": "Simon Kim", "fact": "the CEO of Hashed", "action": "appended"}
]

# Start tracking someone persistently
$ memkraft track "Simon Kim" --type person --source "X/@simonkim_nft"
โœ… Tracking: memory/live-notes/simon-kim.md

# Update with new info
$ memkraft update "Simon Kim" --info "Open-sourced MemKraft under MIT" \
    --source "X/@simonkim_nft, 2026-04-10"
โœ… Updated: memory/live-notes/simon-kim.md

# Promote to core memory (always in context)
$ memkraft promote "Simon Kim" --tier core
โœ… Promoted 'Simon Kim' โ†’ core

# Get a meeting brief
$ memkraft brief "Simon Kim"

๐Ÿ“‹ Meeting Brief: Simon Kim
Generated: 2026-04-11

๐Ÿ‘ค Entity Info
   CEO of Hashed. VC based in Seoul.

๐Ÿ”„ Live Note
   Current State: CEO of Hashed, building MemKraft, the compound knowledge engine
   Recent Activity:
   - 2026-04-10 | Open-sourced MemKraft [Source: X/@simonkim_nft]

๐Ÿ“… Timeline
   - 2026-04-11 | Entity first detected [Source: Telegram]
   - 2026-04-10 | MemKraft MIT release [Source: X/@simonkim_nft]

๐Ÿ”“ Open Threads
   - [ ] Initial entity โ€” enrichment needed

# Detect CJK entities
$ memkraft detect "้ฉฌๅŒ–่…พๅ’ŒๆŽๅฝฆๅฎ่ฎจ่ฎบไบ†ไบบๅทฅๆ™บ่ƒฝ" --dry-run
[
  {"name": "้ฉฌๅŒ–่…พ", "type": "person", "context": "auto-detected (Chinese)"},
  {"name": "ๆŽๅฝฆๅฎ", "type": "person", "context": "auto-detected (Chinese)"}
]

# Process inbox
$ memkraft cognify
๐Ÿง  Cognify complete (recommend mode): 3 processed, 1 skipped
   โ†’ meeting-notes.md: decision (use --apply to move)
   โ†’ decision-001.md: decision (use --apply to move)
   โ†’ action-items.md: task (use --apply to move)

# Progressive Disclosure Query
$ memkraft query simon --level 1
  2026-04-11 live-notes/simon-kim.md
    - **2026-04-11** | Tracking started

$ memkraft query --level 2 --date 2026-04-11
  ๐Ÿ“„ live-notes/simon-kim.md
    # Simon Kim (Live Note)
    ## Tracking Config
    ## Current State
    ## Recent Activity
    ## Key Points

# Session Event Logging
$ memkraft log --event "Deployed v0.2 to production" --tags deploy,release --importance high
๐Ÿ“ Logged: Deployed v0.2 to production

$ memkraft log --read
๐Ÿ“‹ Session events for 2026-04-11 (2 events):
  ๐Ÿ”ด 14:30:00 Deployed v0.2 to production [deploy,release]
  โšช 11:00:00 Bug fix applied [bug]

# Daily Retrospective
$ memkraft retro
๐Ÿ”„ Daily Retrospective โ€” 2026-04-11
โœ… Well (went well):
  โ€ข Deployed v0.2 to production
โš ๏ธ Bad (issues):
  โ€ข (none)
โžก๏ธ Next (action items):
  โ€ข (none)
๐Ÿ‘ฅ Entities touched: MemKraft

# Distill decision candidates
$ memkraft distill-decisions
๐Ÿ“‹ Decision candidates (1):
  [high] sessions/2026-04-11.jsonl: decided to use MemKraft over alternatives

# Track unresolved items
$ memkraft open-loops
๐Ÿ”“ Open Loops (2):
  [2026-04-11] live-notes/simon-kim.md: - [ ] Initial setup โ€” enrichment needed
  [2026-04-10] decisions/stack.md: โณ pending team approval

# Build memory index
$ memkraft index
๐Ÿ“‡ Index built: 15 files โ†’ .memkraft/index.json

# Suggest missing wiki-links
$ memkraft suggest-links
๐Ÿ”— Link suggestions (1):
  meetings/2026-04-10-hashed.md: add [[simon-kim]] โ€” "CEO of Hashed, building MemKraft"

# Extract numeric/date facts
$ memkraft extract-facts "Revenue $5.3M, 85% growth, 42 employees, deadline 2026-06-30"
๐Ÿ“Š Facts extracted (4):
  โ€ข $5.3M
  โ€ข 85%
  โ€ข 42 employees
  โ€ข 2026-06-30

# Brain-first lookup
$ memkraft lookup "Simon" --brain-first
  [high] live-note: simon-kim
  (brain-first: stopped after 2 high-relevance results. Use --full for all.)

# Fuzzy search
$ memkraft search "venture capital Seoul" --fuzzy
  [0.72] entities/simon-kim.md
     Simon Kim | CEO of Hashed. VC based in Seoul.
  [0.58] entities/hashed.md
     Hashed | VC firm in Seoul, blockchain-focused

# Backlinks
$ memkraft links "Simon Kim"
Backlinks to 'Simon Kim' (3):
  ๐Ÿ“Ž entities/hashed.md
     ...CEO [[simon-kim]] founded Hashed in 2018...
  ๐Ÿ“Ž decisions/seed-round.md
     ...introduced by [[simon-kim]]...
  ๐Ÿ“Ž live-notes/memkraft.md
     ...[[simon-kim]] open-sourced MemKraft...

# Diff โ€” what changed since last maintenance?
$ memkraft diff
Changes since last Dream Cycle (4):
  ๐Ÿ†• created: entities/simon-kim.md (2026-04-11 16:00)
  โœ๏ธ modified: entities/hashed.md (2026-04-11 15:30)

# Dream Cycle
$ memkraft dream --dry-run
๐ŸŒ™ Dream Cycle โ€” 2026-04-11
   Mode: dry-run
   ๐Ÿ” Scanning for incomplete source attributions...
      โš ๏ธ entities/hashed.md: timeline entry missing [Source: ...]
   ๐Ÿ” Scanning for thin entity pages...
   ๐Ÿ” Scanning for duplicate entities...
      โš ๏ธ Possible duplicate: simon-kim โ†” ๊น€์„œ์ค€
   ๐Ÿ” Scanning for inbox overdue items...
   ๐Ÿ” Scanning for bloated pages (auto-compact)...
๐ŸŒ™ Dream Cycle complete: 3 total issues found
   Incomplete sources: 1
   Thin entities: 0
   Duplicate entities: 1
   Inbox overdue: 0
   Bloated pages: 1

# Capture raw text verbatim
$ echo "Simon: 'We're building the memory layer that agents actually need.'" \
    > memory/originals/simon-2026-04-11.md

# RESOLVER.md โ€” classification decision tree
$ cat memory/RESOLVER.md
# RESOLVER โ€” Classification Decision Tree
## Is it a person, company, or concept? โ†’ entities/
## Is it a decision with rationale? โ†’ decisions/
## Is it raw capture before processing? โ†’ inbox/ then cognify
## Is it verbatim text to preserve? โ†’ originals/

Contributing

PRs welcome. See CONTRIBUTING.md.

License

MIT โ€” use it however you want.


Changelog

v0.2.0 (2026-04-12)

  • Goal-Weighted Reconstructive Memory (Conway SMS): agentic-search --context โ€” same query with different context produces different result rankings; memory-type-aware re-ranking with differential decay curves
  • Dialectic Synthesis: Auto-detect contradictory facts during extract, tag with [CONFLICT], generate CONFLICTS.md report, resolve via dream --resolve-conflicts or resolve-conflicts command
  • Memory Type Classification: 8 memory types (identity, belief, preference, relationship, skill, episodic, routine, transient) with differential decay multipliers
  • Type-Aware Decay: Identity memories decay 10x slower than routine memories
  • Tests: 112 โ†’ 158 (46 new tests for v0.2.0 features)

v0.1.0 (2026-04-12)

  • Initial release: extract, detect, decay, dedup, summarize, agentic search
  • Entity tracking (track, update, brief, promote)
  • Dream Cycle (7 health checks), cognify, retro
  • Hybrid search (exact + IDF-weighted + fuzzy), agentic multi-hop search
  • Zero dependencies โ€” stdlib only

MemKraft โ€” Agents don't learn. They search. Until now.

GitHub ยท PyPI ยท Issues

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memkraft-0.2.0.tar.gz (72.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

memkraft-0.2.0-py3-none-any.whl (53.7 kB view details)

Uploaded Python 3

File details

Details for the file memkraft-0.2.0.tar.gz.

File metadata

  • Download URL: memkraft-0.2.0.tar.gz
  • Upload date:
  • Size: 72.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for memkraft-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b159510829e0ddecdc98d030effa03880581793cb9d072b7b73af476ffa5ff8f
MD5 242631ff5e4f507b39482af9ad32eebd
BLAKE2b-256 c585b9e03761eb832c84fdc3cf13f344a0a0cda8bee3430e275389f622e78d5e

See more details on using hashes here.

File details

Details for the file memkraft-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: memkraft-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 53.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for memkraft-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d74403fa91d5b1283d424adf613b1db0cb8bc1c33233f0cbcaff310c27a2f58
MD5 349108df2a274164db55ad9202379e4d
BLAKE2b-256 bb9a222c3b2e53718a32b80d499659cf446b7292b1d878f1d28163c21572150f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page