A powerful tool for extracting and distilling key insights (decisions, facts, preferences, workflows, problems, and solutions) from long agent conversations into structured, human-readable knowledge bases.
- Multi-format Support: Parse conversation logs in Markdown or JSONL formats.
- Pattern-based Extraction: Automatically identify decisions, problems, solutions, and more using heuristic patterns.
- Structured Knowledge Base: Organizes insights into topical nodes.
- Human & Machine Readable: Saves knowledge as a JSON database and a collection of topical Markdown files.
- CLI Interface: Easy-to-use commands for initializing and updating your knowledge base.
bun installbun run src/index.ts init ./my-kbbun run src/index.ts distill conversation.md -o ./my-kbHandles the conversion of raw chat logs into a structured Conversation object. Supports typical "User/Assistant" prefixes.
Analyzes messages for meaningful content. It looks for patterns indicating:
- Decisions: "We decided to...", "Let's go with..."
- Problems: "Error:", "Failed to...", "Issue with..."
- Solutions: "Fixed by...", "The solution is..."
- Preferences: "I prefer...", "Always use..."
- Workflows: "Step 1:", "First, then, finally..."
Groups insights by topic (based on tags) and manages the storage lifecycle. It generates a summary for each topic and maintains cross-references.
Conversation Log -> Parser -> Extracted Messages -> Extractor -> Insights -> KB Manager -> Topical Markdown + KB JSON
Run tests:
bun testBuild:
bun run buildMIT