LLMSlim

•
27
•

Provide deterministic long-term memory and local-first context compression for AI agents and coding tools without requiring LLM calls.

LLMSlim is a lightweight, local-first context management and long-term memory engine designed for AI agents and developer workflows. By storing messages verbatim and utilizing deterministic lexical ranking rather than expensive and slow LLM summaries or embedding APIs, it reliably retrieves facts and answers within strict token budgets. In addition to prompt and conversation compression, LLMSlim exposes a native Model Context Protocol (MCP) server equipped with memory tools—such as remember, recall, list_memories, forget, and fit_context—that safeguard against prompt injection by isolating user scopes directly at server startup.

Key Features

01Deterministic memory recall and storage with zero external LLM or API calls required
02Adaptive context planning and prompt compression to fit inputs strictly within token limits
0324 GitHub stars
04Local-first storage backends supporting SQLite, PostgreSQL, and MongoDB
05Scoped user and agent isolation configured at startup to mitigate prompt injection risks
06Pre-built Model Context Protocol (MCP) server providing five core memory and context tools

Use Cases

01Injecting persistent long-term memory into coding agents like Claude Code, Cursor, and Codex
02Fitting massive logs, retrieved documents, and conversation histories into fixed LLM token windows
03Reducing inference costs and latency in local or production AI agent pipelines through deterministic compression