Skip to content

Case study · AI context infrastructure · 2026

LLMSlim

The context layer for production AI agents: what every agent sees, decided, checked and on the record.

Role
Product, architecture, research, engineering
Status
Core: open source (MIT) · Platform: private beta
$ pip install llmslim
Official LLMSlim film (2 min 24 s, with sound): Core 0.8, Studio, the CLI and the October 2026 real-model benchmarks. Every figure shown comes from LLMSlim's published benchmark results.

The problem

Context grows with every turn, tool and document.

Agents resend their whole prefix on every call. Old facts sit beside their corrections, retrieved text lands beside instructions, and nobody can say afterwards what the model actually saw.

Context per request, illustrative agent
  • Turn 112,900
  • Turn 1017,500
  • Turn 4033,700

Illustrative from the briefing: 50 tools at a measured average of 122 tokens each (375 MCP schemas); history grows about 300 tokens a turn.

Cost
The whole prefix is billed again on every call. Caching discounts reuse, not growth.
Correctness
85.7% stale-fact error with raw history in the 180-case synthetic benchmark.
Trust
Unlabelled baselines failed 100% of injection probes in the same benchmark.

The product

It owns the decision between your data and your model.

Every source is tagged with a role and a trust level, current facts are separated from superseded ones, the budget is planned explicitly, quality gates are checked, and the request is compiled for the provider with a trace you can replay.

How LLMSlim sits between an application and its modelSix context sources flow into LLMSlim, which labels trust, tracks state, plans to a token budget, checks quality gates, compiles for the provider and writes a trace. The host application then calls the model API. LLMSlim never executes tools or model calls.InstructionsHistoryDocumentsMemoryTool resultsTool schemasLLMSlimOWNS THE CONTEXT DECISION01Label trust02Track state03Plan to budget04Check gates05Compile06TraceModel APIcalled by the host:OpenAI, Anthropic, Gemini,Sarvam, vLLM
Diagram drawn by AMEYOR from the LLMSlim product briefing (Oct 2026). LLMSlim prepares context; it never executes tools or model calls.

Capabilities

One architecture, two products.

LLMSlim Core

Open source · MIT licence · runs locally
  • Query-focused compression

    Ranks documents, chat rounds and passages against the question and keeps the best whole, locally and deterministically (0.8).

    Open source
  • Optional reranker

    A 22M-parameter cross-encoder rescoring the strongest candidates; runs on CPU or GPU. Off by default.

    Open source
  • Code and log compression

    Keeps failures, tracebacks, imports and signatures; collapses repeated lines and marks what was omitted.

    Open source
  • Adaptive Context Planner

    Divides a fixed token budget across competing context and records why. Reports INFEASIBLE rather than truncating silently.

    Open source
  • Agent Context Runtime

    Prepares each agent turn as a checked, traceable unit with 10 quality gates.

    Open source
  • Cache-aware preparation

    Keeps request prefixes byte-stable for provider prompt caching. Savings are offline estimates.

    Open source
  • Tool schemas & MCP

    Normalises and fingerprints tool definitions; LLMSlim never executes tools.

    Open source
  • CLI and Studio

    Inspect any agent turn in the browser or from the terminal.

    Open source

LLMSlim Platform

Private beta · by invitation · runs in your cloud
  • Temporal state

    Each fact is active, stale, superseded, contradicted, uncertain or expired.

    Private beta
  • Trust firewall & provenance

    Labels where context came from and how far it can be trusted.

    Private beta
  • Provider-neutral Context IR

    One context decision compiled for OpenAI, Anthropic or Gemini.

    Private beta
  • Traces and replay

    Immutable traces; exact replay reproduced 100% across 15 benchmark runs.

    Private beta
  • Context Intelligence

    Learned policies run in shadow mode; no production uplift is claimed.

    Experimental
plan.py
from llmslim import plan_context

plan = plan_context(
    messages=messages, documents=docs,
    query="Acme renewal",
    model="sarvam-105b", max_input_tokens=8_000)

assert plan.feasible

Example adapted from the LLMSlim briefing. Local by default; no API key for extractive planning.

Provider compatibility

LLMSlim provider support levels
TargetLevel
OpenAIMaintained adapter
AnthropicMaintained adapter
Google GeminiMaintained adapter
Sarvam AIMaintained integration
Self-hosted (vLLM)Maintained builder
MCPMaintained adapter
LangChainAdapter (0.8.1)
LlamaIndexAdapter (0.8.1)
HaystackAdapter (0.8.1)

Request builders are execution-free: they produce the provider payload and the host sends it. Source: repositories, verified 9 Oct 2026.

Benchmarks

Ahead of LLMLingua-2. Level with LongLLMLingua, at about 100× the speed.

In October 2026 LLMSlim 0.8 was measured against Microsoft Research's two best-known open-source prompt compressors, with the same questions, the same token budget and the same reader model. Development questions were kept separate, and a fresh sample was run once after the code was frozen. The tie is reported as a tie.

points ahead of Microsoft's LLMLingua-2
+9.7points ahead of Microsoft's LLMLingua-278.7 vs 69.0 accuracy (95% CI +3.7 to +15.7). Microsoft Research's compressor, NaturalQuestions head-to-head: 300 cases, same 25% token budget, Claude Haiku 5.5 reader, Oct 2026.
faster than LongLLMLingua, at equal accuracy
~100×faster than LongLLMLingua, at equal accuracy78.7 vs 78.0 on the same 300 cases (level, within noise). Median 0.09 s vs 9.3 s per question; a 22M-parameter reranker vs a 7B model.
fewer tokens on long chat histories
14×fewer tokens on long chat historiesLongMemEval-S: 76.7% accuracy at 7,984 tokens vs 82.2% with the full 114,006-token history (72.2% on a fresh sample). Claude Haiku 5.5, Oct 2026.
Core releases on PyPI
11Core releases on PyPIFrom 0.1.0 on 15 Jun 2026 to 0.8.1 on 11 Oct 2026.
  • Full contextNo compression · None89.0
  • LLMSlim 0.8 + rerankerAMEYOR · 22M cross-encoder78.7
  • LongLLMLinguaMicrosoft Research · LLaMA-2-7B-chat, 4-bit78.0
  • LLMLingua-2Microsoft Research · XLM-RoBERTa-large69.0
  • LLMSlim 0.8, no modelAMEYOR · None68.7
  • +9.7 pts

    ahead of LLMLingua-2

    95% CI +3.7 to +15.7; ahead on both the original and the fresh sample.

  • Level

    with LongLLMLingua

    78.7 vs 78.0 (+0.7, 95% CI −4.7 to +6.0): it won one sample, LLMSlim the other.

  • ~100×

    faster than LongLLMLingua

    Median compression time per question on the same 6 GB laptop GPU.

NaturalQuestions with 20 retrieved documents per question: 300 paired cases (100 questions, gold passage 1st, 10th or 20th), the same 25% token budget for every compressor and the same reader, Claude Haiku 5.5. Competitors run with their published settings. October 2026.

One dataset, one reader and one budget. Without the optional reranker, LLMSlim is level with LLMLingua-2 (68.7 vs 69.0). Tuning used separate development questions only, and the fresh sample was run once after the code was frozen.

Beyond the head-to-head: LLMSlim 0.8 with the reranker against the full context, same reader (Claude Haiku 5.5), October 2026
BenchmarkLLMSlimFull contextTokensNote
LongMemEval-SMemory over 115k-token chat histories76.7%82.2%114,006 → 7,98476.7% vs 72.2% on a fresh sample; 1/62 of the cost
LongBench v1Seven long-context tasks54.954.915,532 → 5,232Equal to full context on a third of the tokens, no model
HotpotQAMulti-hop questions, F169.474.92,179 → 939Truncation to the same budget: 49.5
LongBench v2Long documents and code, multiple choice55.6%60.0%30,493 → 8,469Middle truncation, same budget: 48.3%

LongBench v1 uses LLMSlim without the reranker. Full context is the ceiling, not a competitor: the point is how close LLMSlim gets on a fraction of the tokens. Weak spots, such as preference questions in LongMemEval, are listed in the full results.

Platform evaluation

Doubled task success, with a third fewer tokens.

This is the private Platform's own benchmark: 180 synthetic cases scored by a deterministic oracle, which rewards the temporal labelling the Platform adds. It tests a different layer from the real-model results above, and no production customer outcome is claimed.

Task success on 180 synthetic cases
  • Raw history44.4%
  • Truncation33.3%
  • RAG only44.4%
  • Core (prior)50.0%
  • LLMSlim Core83.3%
  • LLMSlim Platform88.9%

LLMSlim Platform benchmark, October 2026. Synthetic cases in English, Hindi and Hinglish across 18 categories, 3,000-token budget, deterministic oracle. Most of the gain comes from temporal labelling, which this oracle rewards by design. These are not production customer outcomes; real-model results for Core are reported separately.

Selected metrics, same 180 synthetic cases
MetricRaw historyCorePlatform
Stale-fact error85.7%85.7%14.3%
Wrong context29.4%28.6%5.9%
Mean tokens583429392

Long sessions: in an in-memory benchmark, Platform context levelled off near 2,000 tokens, 83% fewer than raw history at 1,000 turns. Below about 140 turns, Platform's state and trace headers cost more than short raw history; the value case is long-running agents.

In their words

What early users said.

“got 50% fewer tokens on my rag pipeline with no quality drop on my eval set, super easy drop-in replacement”

Their own result, reported on Product HuntJul 2026Source ↗ (comment by Naz on Product Hunt, opens in a new tab)

Unedited public comments on LLMSlim's first Product Hunt launch (v0.2.0, 16 July 2026). See them on Product Hunt ↗

In the product

LLMSlim Studio showing the Agent Context Runtime form with target model, objective, token budget and quality floor inputs.
LLMSlim Studio, Agent Context Runtime. Unedited capture, 10 Oct 2026.
LLMSlim benchmarks page describing evaluations and their limitations.
llmslim.app/benchmarks. Unedited capture, 10 Oct 2026.

Timeline

Compression library to context platform in sixteen weeks.

  1. 16 Jun 2026

    First release on PyPI

  2. Jul 2026

    Entity rules, rewrite and hybrid modes

  3. Aug 2026

    Provenance locks and safe tool schemas

  4. 12 Sep 2026

    MCP catalogs, new site and Studio

  5. 20 Sep 2026

    Adaptive Context Planner

  6. 30 Sep 2026

    Agent runtime and cache planning

  7. 2 Oct 2026

    Private Platform control plane

  8. 9 Oct 2026

    Context Intelligence beta

  9. 10 Oct 2026

    Planner keeps the most relevant evidence (0.7.2)

  10. 11 Oct 2026

    Query-focused selection and reranker; head-to-head vs LLMLingua-2 and LongLLMLingua (0.8.0)

  11. 11 Oct 2026

    LangChain, LlamaIndex and Haystack adapters (0.8.1)

Ecosystem & status

Startup programs, not investors.

  • OpenAI for Startups
  • Claude for Startups
  • Sarvam Startup Program
  • Zoho for Startups
  • MongoDB for Startups
  • Auth0 for Startups
  • Zendesk for Startups
  • Mixpanel for Startups
  • Sentry for Startups
  • Descope Hello World
  • Pulumi for Startups

LLMSlim has been accepted into these programs, which offer cloud and API credits, software licences, technical resources and community access. None is an investor, lender, customer or funder, and membership implies no technical endorsement or commercial partnership.

Commercial status, October 2026

Core is free under the MIT licence. Platform is a private beta, by invitation. LLMSlim has no paying customers or revenue today, and no paid plan is live.

Taking on new projects

Building agents that need better context?

Ask about LLMSlim Platform's private beta and enterprise deployment, or hire AMEYOR to design the context and evaluation layer of your own AI product.

Or book a free 30-minute call (opens in a new tab) with the founder.

Prefer email? hello@ameyor.in