v0.1.0
LIM is a C++ terminal-based LLM controller built on llama.cpp with a persistent, stateful KV-cache: each turn appends to the cache rather than reprocessing the full history, so new input costs only O(input tokens), not O(total history).
Key Features
- Stateful sessions — KV-cache is never discarded. No re-tokenization or re-decode overhead per turn.
- Native tools — Read, search, edit, and write files; run shell commands; search the web; read PDFs.
- Session save/restore — Save full session state and restore later with zero context loss. Fast cache for instant reloads.
- Interactive undo — Rewind to any checkpoint in your session history.
- Browser output — LaTeX-aware viewer streamed via WebSocket.
- VS Code extension — Integrated terminal and browser workspace.
- Benchmarking modes — Compare LIM's persistent cache against standard chatbot and cache-aware decoding.
- Sandboxed AI user — Dedicated user with isolated filesystem access for safe autonomous operation.
Requirements
- NVIDIA GPU with CUDA (or CPU-only with
make GGML_CUDA=off) - Python 3 with
aiohttp - A GGUF model file
Building & Setup
See README.md for full instructions, including building, user setup, directory permissions, and configuration.
In short:
git clone https://github.com/statefullm/lim.git
cd lim
makeThen follow the User Setup section to create the dedicated AI user and configure your environment before running lim.