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

docs/local-context-control-v1-status-and-v2-amendment.md

Local context-control v1 status and prospective v2 amendment

Frozen v1 status

V1 remains frozen. Its implementation, preregistration, corpus, contexts, schedule, identities, consumed authorization, attempt ledger, private execution marker, durable recovery lock, and sealed aborted record must not be deleted, rewritten, reinterpreted, or rerun.

The one authorized v1 attempt aborted during adapter startup before observation

  1. The Python adapter parsed the Go-written runtime-manifest.json with a payload-only strict decoder, rejected the file's normative single terminal LF as trailing JSON bytes, and exited before model verification, import mlx, mlx_lm.load, or a ready envelope. There were zero call directories, receipts, completion records, result summaries, observations, model loads, network requests, provider calls, cloud calls, or held-out accesses.

The v1 classification is invalid_pre_observation_adapter_startup_failure; rerun is prohibited. The sealed private aborted-record digest is 821ba7bc9b845ef32e199df396f0a17f3c05ea49d3acd8f98f9d31b18ccca8a7. Independent security and methodology reviews approved this classification. Before authorization, four wrapper attempts also failed with zero model loads and zero outcomes. The consumed startup abort is the fifth startup event and also produced zero model loads and zero outcomes.

Prospective v2 boundary

V2 is not a retry of v1. It is a separate protocol, schedule, authorization, attempt-ledger, run, result, CLI, adapter, schema, domain-separation, and output namespace universe. It was designed after an outcome-free startup failure and before any local-model output existed. Outcome selection is therefore impossible: there was no v1 model outcome available to inspect, tune against, accept, reject, or suppress.

The independently validated corpus and context content may remain substantively the same, but v2 uses new seeds, transform/compiler versions, protocol identity, schedule ordering and identity, observation IDs, schemas, package identity, and authorization bindings. V2 remains a provider-independent local development/calibration study, excludes TypeSafe/AgentTrace held-out evidence and cloud access, and authorizes no spend.

Normative JSON framing

Distill-native structured identities use RFC 8785/JCS. The inherited frozen model aggregate identity alone retains its separately documented legacy sorted/indented serializer.

  • On-disk canonical JSON is one UTF-8 JCS value followed by exactly one LF. Missing LF, multiple LF, CRLF, trailing whitespace, prose, a second value, leading whitespace, duplicate or nested duplicate keys, nonfinite numbers, out-of-range exponents, and a wrong top-level type fail closed.

  • Stdin/stdout transport frames are one UTF-8 JCS object followed by exactly one transport LF. Only the framing layer removes that LF; the payload parser receives LF-free bytes and rejects all other leading or trailing bytes.

  • JSONL is one canonical object per line with one LF after every record, including the final record.

Go and Python implement separate file and frame readers. A cross-language known-answer conformance receipt covers valid vectors and every adversarial class before adapter-check or authorization can succeed.

Adapter-check and attempt boundary

adapter-check is mandatory before authorization. It runs the exact committed v2 adapter under env -i semantics, python -I -B -S, offline cache flags, and the deny-network sandbox. It validates source commit/tree, binary build provenance, adapter, interpreter, runtime, model, package, protocol, schedule, host preflight, all input file hashes, and an absent path-bound run namespace. It executes Go/Python framing conformance, emits a content-addressed owner-only receipt with model_loaded=false and network_allowed=false, and exits without importing MLX, calling load(), creating the run namespace, or writing model caches or bytecode.

Authorization reconstructs every binding and rejects a copied check directory, stale receipt, namespace reuse, or any source, binary, adapter, interpreter, runtime, model, package, protocol, schedule, or host-identity drift. A failed adapter-check creates neither an authorization directory nor an attempt ledger. The successful check directory contains its own locked, path-bound use ledger; authorization consumes it exactly once to prevent receipt replay.

Run startup repeats all fail-closed validation and starts the adapter in a preload handshake. The preload process verifies the copied canonical package, authorization, adapter-check, model, runtime, source, and output bindings and returns model_loaded=false. Only after that handshake succeeds does the Go runner create the private adapter workspace, append and sync the sole attempt entry, and issue the explicit load frame. Any failure after ledger consumption is a terminal preserved abort; no outcome-dependent retry is allowed. Any failure before consumption may be corrected only while the receipt and all bound inputs remain valid and no attempt exists.

Filesystem snapshot rollback by a malicious owner remains outside the executable threat model. Independent custody must preserve the adapter-check, authorization ledger, and run namespace through review.

Result contract

Any public v2 result must disclose the v1 invalid boundary, four pre-authorization wrapper failures, one consumed startup abort, zero v1 observations, and zero v1 model loads. It must state that v2 was prospective before model output and that outcome selection was impossible. Absolute performance remains conditioned on the frozen quiescent host, AC power, memory, swap, disk, unrelated-process, sleep-inhibition, and deny-network requirements.

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