Local-first LLM memory, AST slicing, RAM-aware routing, and speculative decoding proxy built for 8 GB laptops (Linux, macOS, Windows).
CrispLLM is a lightweight, zero-bloat OpenAI-compatible /v1 proxy and Model Context Protocol (MCP) server. It equips local coding models (llama-server, Ollama, vLLM) and cloud APIs with tiered architectural memory, 1-hop AST symbol slicing, dynamic context budgeting, and speculative acceleration — maintaining a steady-state proxy RSS under 85 MB with zero vector databases and zero embedding models in the SQLite FTS5 memory tier, 0 MB extra RAM for ngram-simple speculative decoding, and zero extra LLM calls on the routing/extraction hot path.
# Run instantly with uvx (no install needed): uvx crispllm --help # Or install via pip / uv: pip install crispllm # or: uv pip install crispllm Source installation from git git clone https://github.com/dhanushveerla/crispllm.git cd crispllm uv sync uv run pytest -q 2. Initialize and Start # Generate default crispllm.toml in current directory or ~/.config/crispllm/ crispllm init # Start proxy on http://127.0.0.1:8080 (OpenAI /v1 proxy + Streamable HTTP /mcp server) crispllm serve 3. Connect Any Client Python (OpenAI SDK):
from openai import OpenAI client = OpenAI(base_url="http://127.0.0.1:8080/v1", api_key="sk-local") response = client.chat.completions.create( model="crispllm-local", messages=[{"role": "user", "content": "Explain calculate_settlement in ledger/calculator.py"}], ) print(response.choices[0].message.content) Cursor / Windsurf / Continue:
flowchart LR Client["Client
(Cursor / Agent / SDK)"] subgraph CrispLLMProxy ["CrispLLM Proxy (:8080) — < 85 MB RSS"] direction TB Slicer["1-Hop AST Slicer
(Tree-sitter PageRank + Call Graph)"] Memory["3-Tier SQLite Memory
(Core + Episodic + Archival FTS5)"] Assembler["Prefix-Stable Prompt Assembler
(Byte-stable Core + User Episodic)"] WatchdogRouter["RAM Watchdog & Task Router
(ContextBudgeter + fast/balanced/deep)"] Speculative["Speculative Layer
(Cloud Predictions + llama-server Presets)"] Redactor["Reversible Secret Redactor
(Zero-leak gate + SSE Stream Restorer)"] end LocalRuntime["Local Runtime
(llama-server / Ollama)"] CloudRuntime["Cloud Fallback
(OpenAI / OpenRouter / NIM)"] Client -->|POST /v1/chat/completions| Slicer Slicer --> Memory Memory --> Assembler Assembler --> WatchdogRouter WatchdogRouter --> Speculative Speculative -->|Local Fast Path| LocalRuntime Speculative -->|Escalation / Fallback| Redactor Redactor -->|Sanitized Prompt| CloudRuntime LocalRuntime -->|Direct SSE Stream| Client CloudRuntime -->|Restored Secret Stream| Client Verified Hardware Benchmarks All metrics measured empirically on physical test hardware using bench/run_bench.py and committed in bench/baselines/ and docs/ROADMAP.md.
Test Hardware Platform (Lenovo LOQ 83FQ):
Target budget: total system peak RSS = 800 MB free for OS and IDE buffers.
Multi-turn latency reduction via byte-stable system prompt ordering and 1-hop AST call-graph extraction on the CrispLLM repository.
Evaluation on n=3 deterministic code-edit tasks (temperature=0.0, max_tokens=512) using current llama-server b12631+ preset engine (0 MB extra RAM for ngram-simple speculative decoding).
Long-context stress evaluation across 4 balanced categories (constraint_retention, contradiction_update, noisy_distractor, cross_turn_synthesis; 5 tasks each, ~7.2k tokens/task).
Reproduce via: python bench/run_bench.py --tasks-file bench/stress_tasks.json --dry-run or generate optimized llama.cpp server commands with crispllm llama-cmd --profile t2-vulkan --preset ngram-simple.
CrispLLM is engineered specifically for local execution on resource-constrained devices. By design, it makes deliberate engineering trade-offs:
[proxy] host = "127.0.0.1" port = 8080 auth_token = "sk-local" cors_origins = ["*"] [memory] enabled = true db_path = ".crispllm/memory.db" max_injected_tokens = 500 inject_constraints = true compact_middle_turns = true compact_min_turn_tokens = 40 keep_recent_turns = 2 auto_extract = true [resources] enabled = true local_backend = "llama_server" # "llama_server" or "ollama" ram_threshold_soft_mb = 1024.0 ram_threshold_hard_mb = 512.0 watchdog_poll_s = 2.0 ctx_buckets = [2048, 4096, 8192] max_local_ctx = 8192 idle_unload_s = 300.0 [speculative] predicted_outputs_enabled = true min_prediction_chars = 40 max_prediction_chars = 30000 min_prediction_lines = 3 llama_preset = "ngram-simple" draft_model_path = "" [router] local_base_url = "http://127.0.0.1:8081/v1" local_model = "Qwen2.5-Coder-3B" cloud_base_url = "https://api.openai.com/v1" cloud_model = "gpt-4o" cloud_api_key_env = "OPENAI_API_KEY" [privacy] enabled = true redact_secrets = true redact_emails = true redact_ips = false CLI Command Reference CrispLLM provides a unified command-line interface:
Add CrispLLM as an MCP server in your client configuration:
Claude Desktop (claude_desktop_config.json):
{ "mcpServers": { "crispllm": { "command": "uvx", "args": ["crispllm", "serve"] } } } Remote / Streamable HTTP MCP (Cursor, Continue, Claude Code):
CrispLLM is licensed under the MIT License.
Both files in this release have provenance metadata.
llm memory proxy local-llm ast-slicing speculative-decoding mcp llama-cpp
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Both files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Nov 23, 2026 2 release files Full provenance
Nov 22, 2026 2 release files No provenance




