Generated banner for Distill
Generated logo for Distill

Distill

Memory framework

First committed by Siddhant-K-code

Published in Siddhant-K-code/distill. Publisher page

198 GitHub stars

What it is

Context intelligence layer for LLM agents: persistent memory with write-time dedup, sensitivity tagging, conflict detection, and hierarchical decay. ~12ms. No LLM calls. MIT.
— the description by Siddhant-K-code

AutoGineer overview, from the brain’s own files

Distill is a framework designed to serve as a context intelligence layer for LLM agents. It provides persistent memory capabilities, allowing agents to maintain context across sessions. The system includes features for deduplication, sensitivity tagging, conflict detection, and hierarchical decay of information. It is designed to integrate with various environments, including Claude Desktop and Cursor, via an MCP server, and provides REST API endpoints for broader agentic applications.

How it works

Memory model: Hybrid

AutoGineer overview, from the brain’s own files

Distill functions as a memory layer that manages agent context through a series of internal packages. It handles data ingestion, deduplication, and embedding to organize information. The system uses a memory model that supports persistent storage and retrieval, allowing agents to access relevant context. It includes tools for session management, token-budgeted context windows, and handoff capabilities for decision-to-documentation workflows.

Folders
FolderRoleFiles
.githubagent-config5
docsdocs17
examplesexamples4
pkgsource-code115
scriptsscripts5
toolsscripts2
cmdfolder34
grafanafolder1
internalfolder119
mcpfolder4
researchfolder105
testdatafolder27

Requirements

Apps: Docker

Runtimes: Go

Databases: Pinecone, Qdrant, Redis, SQLite, Weaviate

API keys (by name): COHERE_API_KEY, DISTILL_API_KEY, OPENAI_API_KEY, PINECONE_API_KEY

Works with: Claude apps

Set it up

  1. This brain runs code automatically: 1 script. Review Makefile before opening the folder in Claude Code. No step below turns a hook on for you.

    • Makefile: $(GO) install $(GOFLAGS) -ldflags "$(LDFLAGS)" .
  2. Not scanned by AutoGineerThe author’s MCP configuration (README.md) also starts it in a way AutoGineer does not offer. Read that file: AutoGineer did not scan that path; what it runs is listed under “This brain runs”. https://github.com/Siddhant-K-code/distill/blob/2417e00dabe498eb8187f4544f001d5a49fbdb45/README.md
  3. Not scanned by AutoGineerThe author’s README also describes installing it from a clone of its repository. Read its install section: AutoGineer did not scan that path. https://github.com/Siddhant-K-code/distill/blob/2417e00dabe498eb8187f4544f001d5a49fbdb45/README.md#go-install
  4. Not scanned by AutoGineerThe author’s README also describes installing it with go install. Read its install section: AutoGineer did not scan that path. https://github.com/Siddhant-K-code/distill/blob/2417e00dabe498eb8187f4544f001d5a49fbdb45/README.md#go-install
  5. First committed by Siddhant-K-code. Published in Siddhant-K-code/distill. Licence: MIT License.

Usage

AutoGineer overview, from the brain’s own files

  • Integrating persistent memory into LLM agent workflows.
  • Managing context windows across multiple agent sessions.
  • Implementing deduplication and sensitivity tagging for agent data.
  • Using the MCP server to connect agent memory to desktop clients.
  • Automating decision-to-documentation bundles via handoff capabilities.
“Retrieve the context from the last session regarding the project architecture.”
The agent accesses the persistent memory layer to provide the relevant architectural details stored in the previous session.
“Summarize the recent decisions made in the current development sprint.”
The agent uses the handoff capability to bundle and present the documented decisions stored within the system.

Documentation by Siddhant-K-code

Read the documentation at the source

CHANGELOG.md

Changelog

All notable changes to Distill are documented here.

Unreleased

Added
  • Distill Lock v0 — Offline lock, build, and verify commands for deterministic, byte-identical context artifacts with exact deduplication, canonical manifests, drift detection, and portable macOS/Linux goldens.

  • Handoff v0 alpha — Experimental offline handoff prepare and handoff verify commands for freezing Markdown decision contexts and packaging external-agent proposals as deterministic, review-only artifacts.

Fixed
  • macOS batch job ID collisions — Preserve the existing time-ordered ID format while making IDs process-locally monotonic under coarse clock granularity and concurrent submissions.

[v0.9.0] - 2026-05-09

Added
  • Multi-provider embedding support — Ollama and Cohere alongside OpenAI; --embedding-provider flag on all commands (#83)

  • Memory expiry and supersession — expire and supersede endpoints; TTL via expires_at; include_expired on recall (#84)

  • Sensitivity tagging — pattern-based auto-classification for PII, credentials, and internal references; max_sensitivity in recall response (#85)

  • Conflict detection on write — semantically similar but non-duplicate entries flagged in store response (#88)

  • Task-relevance ranking — boost_tags, task_context, and min_relevance on recall (#89)

  • MCP tools — memory_expire and memory_supersede

Changed
  • README reframed around memory reliability (#86)

Fixed
  • Staticcheck QF1003 lint violation (#87)

[v0.4.0] - 2026-02-24

Added
  • Session-based context window management (pkg/session) — Token-budgeted context windows for long-running agent sessions. Entries are deduplicated on push, compressed through hierarchical levels (full text → summary → sentence → keywords), and evicted when the budget is exceeded. Lowest-importance entries are compressed first. (#38, closes #31)

  • Session CLI — distill session create/push/context/delete commands. (#38)

  • Session HTTP API — /v1/session/create, /push, /context, /delete, /get endpoints. Opt-in via --session flag. (#38)

  • Session MCP tools — create_session, push_session, session_context, delete_session for Claude Desktop, Cursor, and Amp. Opt-in via --session flag. (#38)

Stats
  • 9 files changed, 1,928 insertions, 6 deletions

  • 1 new package: pkg/session

  • 13 new tests


[v0.3.0] - 2026-02-23

Feature release adding persistent context memory, SSE streaming, OpenTelemetry tracing, and project documentation.

Added
  • Persistent context memory store (pkg/memory) — SQLite-backed memory that persists across agent sessions. Write-time deduplication via cosine similarity, recall ranked by (1-w)*similarity + w*recency, tag filtering via junction table, and token-budgeted results. Opt-in via --memory flag on api and mcp commands. (#37, closes #29)

  • Hierarchical decay worker — Background compression of aging memories: full text → summary (extractive, ~20%) → keywords (~5%) → evicted. Configurable ages via distill.yaml. Accessing a memory resets its decay clock. (#37)

  • Memory CLI — distill memory store/recall/forget/stats commands for direct memory management. (#37)

  • Memory HTTP API — POST /v1/memory/store, /recall, /forget, GET /stats endpoints. (#37)

  • Memory MCP tools — store_memory, recall_memory, forget_memory, memory_stats tools for Claude Desktop, Cursor, and Amp. (#37)

  • SSE streaming dedup (pkg/sse) — POST /v1/dedupe/stream endpoint with per-stage progress events (embedding, clustering, selection, MMR). (#22)

  • OpenTelemetry tracing (pkg/telemetry) — Distributed tracing with OTLP and stdout exporters. Each pipeline stage instrumented as a separate span. W3C Trace Context propagation. (#21)

  • FAQ (FAQ.md) — 20 Q&As covering algorithms, integrations, deployment, and cost. (#36)

Changed
  • README — Added Context Memory section with CLI/API/MCP examples, updated architecture diagram (Memory Store: shipped), updated roadmap status, expanded API endpoints table. (#37, #34)

Dependencies
  • Added modernc.org/sqlite — Pure Go SQLite driver (no CGO required)

Stats
  • 21 files changed, 3,617 insertions, 73 deletions

  • 3 new packages: pkg/memory, pkg/sse, pkg/telemetry

  • 11 new tests for memory store


[v0.2.0] - 2026-02-14

Major release adding four new modules: semantic compression, KV caching, Prometheus observability, and YAML configuration.

Added
  • Prometheus metrics endpoint (pkg/metrics) — /metrics endpoint on both api and serve commands. Tracks request rate, latency percentiles, chunks processed, reduction ratio, active requests, and clusters formed. Includes HTTP middleware for automatic instrumentation. (#19)

  • Grafana dashboard (grafana/dashboard.json) — 10-panel dashboard template covering request rate, error rate, P99 latency, latency percentiles, chunks processed, reduction ratio, clusters formed, and status code breakdown. (#19)

  • Configuration file support (pkg/config) — distill.yaml config file with schema validation and ${VAR:-default} environment variable interpolation. New CLI commands: distill config init and distill config validate. Config priority: CLI flags > env vars > config file > defaults. (#18)

  • Semantic compression module (pkg/compress) — Three compression strategies: extractive (sentence scoring), placeholder (JSON/XML/table summarization), and pruner (filler phrase removal). Chainable via compress.Pipeline. (#13)

  • KV cache for repeated patterns (pkg/cache) — In-memory LRU cache with TTL support for system prompts, tool definitions, and other repeated context. Includes PatternDetector for automatic identification of cacheable content and a Redis interface for distributed deployments. (#17)

  • GitHub Sponsors funding configuration (5b11d6d)

Changed
  • Architecture diagram updated to reflect the full pipeline: Cache check → Cluster dedup → Select → Compress → MMR re-rank

  • README expanded with pipeline module docs (compression, cache), monitoring section, config file usage, and updated integrations table (#15)

  • Viper config loading now searches for distill.yaml (previously .distill), uses DISTILL_ env prefix with key replacer (#18)

  • serve.go — /metrics endpoint now serves Prometheus format instead of JSON config dump (#19)

Fixed
  • Docker workflow permissions — Added attestations and id-token write permissions for ghcr.io push (#14)

Stats
  • 24 files changed, 3,572 insertions, 55 deletions

  • 4 new packages: pkg/compress, pkg/cache, pkg/config, pkg/metrics

  • 46 new tests across all packages


[v0.1.2] - 2026-01-01

Fixed
  • Go Report Card badge and formatting

  • gofmt simplifications applied

  • Documentation em-dash replacements

[v0.1.1] - 2025-12-28

Added
  • Hosted API link in README

[v0.1.0] - 2025-12-27

Initial release.

  • Core deduplication pipeline: agglomerative clustering + MMR re-ranking

  • Standalone API server (distill api)

  • Vector DB server (distill serve) with Pinecone and Qdrant backends

  • MCP server for AI assistants (distill mcp)

  • Bulk sync and analyze commands

  • Docker image, Fly.io and Render deployment configs

  • GoReleaser cross-platform builds

457 files · 445 not served here

Advantages

Limitations

Security

Risk level: No risk found

This brain runs

Install scripts (1)

  • Makefile (make install): $(GO) install $(GOFLAGS) -ldflags "$(LDFLAGS)" .

MCP servers (1)

  • README.md (distill): /path/to/distill mcp --memory --session

Attribution and licence

First committed by
GitHub avatar of Siddhant-K-codeSiddhant-K-code
Publisher
Siddhant Khare (Community)
Source
Siddhant-K-code/distill · commit 2417e00
Licence
MIT License (files served here)
  • ATTRIBUTION.md (written by AutoGineer)
Synced
Contributors
Siddhant-K-code

AutoGineer is not affiliated with or endorsed by Siddhant-K-code.

Install from source

445 of its files are not served here, so there is no ZIP. Siddhant-K-code/distill at 2417e00