Skip to content

About

Tool for extracting and distilling key insights from long agent conversations into structured knowledge bases

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Agent Knowledge Distiller

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.

Features

  • 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.

Installation

bun install

Usage

Initialize a Knowledge Base

bun run src/index.ts init ./my-kb

Distill Insights from a Conversation

bun run src/index.ts distill conversation.md -o ./my-kb

Core Components

Parser

Handles the conversion of raw chat logs into a structured Conversation object. Supports typical "User/Assistant" prefixes.

Extractor

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..."

Knowledge Base Manager

Groups insights by topic (based on tags) and manages the storage lifecycle. It generates a summary for each topic and maintains cross-references.

Architecture

Conversation Log -> Parser -> Extracted Messages -> Extractor -> Insights -> KB Manager -> Topical Markdown + KB JSON

Development

Run tests:

bun test

Build:

bun run build

License

MIT

About

Tool for extracting and distilling key insights from long agent conversations into structured knowledge bases

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages