Molecule
Python · FastMCP · SQLite · Sentence-Transformers
Molecule gives AI agents persistent memory and retrieves individual sections of long documents. Returning only the relevant section reduced context token use by about 78% in this project.
How memory and retrieval work
The server splits Markdown by heading and ranks sections using embeddings, BM25 and heading matches. Agent feedback informs subsequent rankings. A separate pipeline extracts facts from transcripts without a language-model call, removes duplicates, flags conflicts and expires stale records.