juyterman1000/entroly

🧠 Knowledge & Memory
0 Views
0 Installs

🐍 πŸ¦€ 🏠 🍎 πŸͺŸ 🐧 - Auditable context control plane and MCP server for AI coding agents. Compresses context 70–95% (BM25 + entropy + dep-graph knapsack), stabilizes prompt prefixes for provider cache discounts, routes easy tasks to cheaper models (RAVS Bayesian router), and verifies answers locally with WITNESS hallucination guard (0.844 AUROC, $0, 3 ms). MemoryOS adds local budget-aware working/episodic/semantic memory with decay, safety scanning, and durable persistence. 38 agent integrations (Cursor, Claude Code, Codex, Aider, and more). Ships as MCP server (entroly serve), HTTP proxy, or Python/Rust library. Apache-2.0, local-first. pip install entroly

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "juyterman1000-entroly": {
      "command": "npx",
      "args": [
        "-y",
        "juyterman1000-entroly"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

Entroly

Entroly β€” Drop-In Context Assurance to Lower AI Operational Cost

Reduce unnecessary context without losing control of critical evidence.
Entroly uses budgeted context selection, content-addressed evidence, exact recovery, and auditable receipts to lower provider-bound inference expenditureβ€”without rewriting your codebase or agent architecture.

Works through supported proxy, MCP, plugin, wrapper, and SDK paths with Claude Code, Codex, OpenClaw, GitHub Copilot, Cursor, Aider, local models, and OpenAI/Anthropic-compatible applications.

Context selection + recoverable compression Β· receipts record what was used, omitted, and risky Β· local-first Β· Python with optional Rust acceleration Β· Node/WASM runtime

Entroly on PyPI Entroly on npm Apache-2.0 license

Context Commit conformance evidence WITNESS HaluEval-QA evidence Python, optional Rust, and WASM runtimes Measure token savings on your workload

Entroly GitHub stars Entroly Discord community

Registry badges show distribution metadata. Evidence badges link to committed results with scope and caveats. Community and marketplace status are not treated as technical proof.

pip install -U entroly && cd /your/repo && entroly verify-claims && entroly simulate

Get started Β· See value Β· AI cost guide Β· Proof videos Β· Proof Β· Integrations Β· What's inside Β· Architecture Β· For teams Β· Limitations

Deciding whether to star? Run the no-key proof first: entroly verify-claims && entroly simulate.
If it finds meaningful savings or gives you auditable receipts on your repo, star it so other agent builders can find it. If it does not, open an issue with the verification JSON.


See value in your first session

Entroly should answer three questions quickly: Did it reduce the context? Did that reduction reach a provider-bound request? What evidence and risk remained?

entroly verify-claims   # prove the installed trust/recovery path; no API key
entroly simulate        # estimate reduction on this repo; no model call
entroly value           # print the evidence-classified lifetime value receipt
entroly value --json    # the same receipt for CI, audits, or a dashboard

The value receipt deliberately keeps unlike evidence separate:

Evidence classWhat Entroly reportsDollar claim
Provider-bound proxy requestsRequests observed, pre/post input-token reduction, active days, and configured model-rate provenanceModeled API input cost avoided; not an invoice. Unknown/unmatched models remain unpriced
SDK, MCP, and npm operationsLocal operations and tokens reduced$0 claimed because delivery to a paid provider is not observable
Legacy or unknown-source historyPreserved tokens and operations$0 claimed; excluded from provider savings

simulate compares selected context with its stated local 32K dump baseline. It is a fast estimate, not provider billing or final-answer quality. Once a request travels through a supported proxy path, entroly value reports measured pre/post provider-bound token counts and labels the result with the pricing source and date.


One measured job of the Context OS

Entroly selected 1.02 of 16 candidate passages on average while keeping the answer-bearing passage in 298 of 300 held-out retrieval questions

Entroly is much more than a compressor: it also ships memory, recovery, verification, provider controls, security, receipts, and guarded outcome learning. This frozen benchmark isolates one job in that system: choosing the answer-bearing evidence before a model request.

In this frozen retrieval test, Entroly selected 1.02 of 16 passages on average while keeping the answer-bearing passage in 298 of 300 held-out questions. This demonstrates one Context OS primitive: selecting a small evidence set without blindly discarding the passage needed to answer.

Under the hood, traditional BM25 found the passage in 297 of 300 questions and a local transformer found it in 293 of 300. They disagreed six times; the guard kept both candidates only on those cases. The point difference was not statistically conclusive (p=0.21875), and this experiment measures retrieval, not generated answers, token savings, or production cost.

python -m benchmarks.neural_evidence_frontier verify benchmarks/results/neural_evidence_frontier.json

Audit every trial in under a minute Β· inspect the raw artifact Β· submit a counterexample


What it does

Entroly is a local Context OS for AI agents. It unifies the full lifecycle of the information surrounding a model request. That makes it the observability, governance, and decision layer around contextβ€”not another general-purpose chat runtime.

Frontier models reason. OpenClaw and Hermes run agents. Entroly manages what those agents read, remember, trust, recover, spend, and learn. The same boundary applies to Claude Code and Codex: Entroly augments the agent you already use instead of becoming another chat client.

Context OS jobWhat Entroly does
ReadDiscovers, ranks, deduplicates, compresses, and secures evidence under an explicit budget.
RememberMaintains working, episodic, semantic, checkpoint, and knowledge-vault context locally.
TrustChecks prompts, code, provenance, and generated claims with layered security and verification.
RecoverKeeps omitted originals reachable through content-addressed handles and replayable Context Commits.
SpendKeeps changing evidence in a live zone after stable history, accounts from provider usage, and applies explicit routing and budget policy.
LearnUses tests, CI, command exits, edits, and user outcomes to improve guarded local policies and skills.

Most compression tools shrink whatever text the agent already chose. Entroly starts one step earlier: it chooses the highest-value evidence first, compresses only after selection, keeps originals recoverable, then verifies the answer against the evidence.

  • Receipts - every selection run can explain selected chunks, omitted nearby evidence, dependency links, fingerprints, token ratio, and residual risks.
  • Select - ranks your repo or document set, then sends the answer-relevant context under a token budget.
  • Verify - WITNESS can check an answer against supplied evidence locally, without an additional model call. See the scoped benchmark under Proof.
  • Route - sends easy, repeated tasks to a cheaper model and keeps the flagship for hard ones (opt-in, fail-closed).
  • Cache-safe live zone - keeps stable system/history bytes ahead of changing Entroly evidence; exact matches may be reused, but changed evidence is never replaced by a merely similar stale block.
  • Learn - adapts local ranking signals from recorded outcomes. No embeddings API or training job is required for that path.

Use it however you work: wrap your agent, run it as a proxy, plug it in as an MCP server, or import the library.

Why teams care

What usually breaks AI coding at scaleWhat Entroly adds
Autonomous loops keep appending logs until the provider rejects or the session crashesAn in-proxy high-water guard that compacts old tool output recoverably, preserves the recent tail, and blocks unsafe overflow before it reaches the provider
Token savings look good but quality silently dropsAccuracy-retention benchmarks, receipts, and WITNESS verification
Agents lose the exact line, stack trace, or omitted file they later needReversible compressed fragments and retrieval handles
First-time setup depends on one IDE or one providerCLI, SDK, MCP, proxy, npm, PyPI, Docker, and local simulation paths
Enterprise teams need proof, not screenshotsCommitted JSON artifacts, local self-tests, and reproducible commands

Product surface

Entroly ships as a full local runtime, not one proxy command:

SurfaceWhat users get
CLIattach, context-commit, verify-claims, simulate, value, perf, wrap, proxy, serve, daemon, benchmark, witness, receipt, audit, doctor, health, batch, learn, ravs, cache, and more
SDKcompress, compress_messages, optimize, verify, hallucination detection, Context Receipts, localizers, cache alignment, cost cortex, Memory OS
MCP serverContext optimization, exact retrieval, receipts, recovery, feedback, security scans, codebase health, smart reads, belief verification, response verification
ProxyOpenAI, Anthropic, Gemini, and compatible local optimization paths for API-key users and custom apps
Node/WASMentroly, entroly-mcp, and entroly-wasm packages for npm users
Trust layerWITNESS, EICV, STAVE, receipt proofs, provenance checks, prompt-injection scanning, and local verification reports
Proof-guided recoveryDurable prepare/advance sessions turn unsupported claims into evidence obligations, recover exact omitted chunks, and stop under explicit round/token bounds
Memory/session intelligenceMemory OS, Memory Fabric, long-term memory, session digests, checkpoint relevance, cache-retention forecasting, and lifetime value tracking
Multimodal intakeDiff, diagram, voice, image, and structured-context ingestion with provider-aware image token estimates and compliance-gated optimization
Gateway/accountingProvider capability planning, failover policy, redaction receipts, usage ledger, cache routing, spend math, and budget harnesses
Model intelligenceBundled trust-labelled model metadata plus opt-in OpenRouter and local Ollama/LM Studio discovery; remote credentials are never persisted
Knowledge vault/CogOpsBelief compilation, vault search, workspace change sync, epistemic routing, verification engines, and flow orchestration
Framework/event gatewaysLangChain helpers, Ebbiforge provenance auditing and optional learned-dynamics adapter, AgentSkills export, Hermes, Slack, Discord, and Telegram gateway hooks for teams that want operational feedback loops
Self-improvementPRISM/RAVS feedback, autotune, verified model-based dreaming, skill crystallization, promotion gates, evolution logging, and budget-gated skill synthesis
ObservabilityDashboard, daemon supervisor, control plane, health reports, value tracker, release-surface checks, and local JSON proof reports

Under the hood, the Python control plane has a pure-Python path and can use the optional Rust extension for supported operations. The separate Node runtime uses WASM. The implementation includes BM25, entropy scoring, SimHash dedup, dependency graphs, budgeted selection, caching, verification, and memory primitives; installed capabilities depend on the selected package and extras.

See the full code-derived map in docs/product-surface.md.


How it works (30 seconds)

your agent  ──►  Entroly (local)  ──►  LLM provider
                 β”‚
                 β”œβ”€ rank the repo        (BM25 + entropy + dep-graph)
                 β”œβ”€ select under budget  (knapsack, reversible)
                 β”œβ”€ emit receipt         (included, omitted, risks)
                 β”œβ”€ stable prefix + live zone (protect native cache boundaries)
                 β”œβ”€ rescue runaway logs  (recoverable high-water checkpoints)
                 └─ verify the reply      (WITNESS hallucination guard)

Critical files go in full. Supporting files can become signatures. Other material can become a reference that can be expanded on demand. Exact recovery is available only while the corresponding receipt and recovery store are retained; deleting that state deletes Entroly's recovery path.

Runaway-session rescue without cache churn

When traffic passes through entroly proxy, Entroly now guards every outbound request before the provider sees it:

  • repetitive terminal, test, and function output is compressed in the live zone while errors, failures, paths, and structural metadata remain visible;
  • the complete original tool block is persisted locally before mutation, and the forwarded block carries an entroly-recovery receipt/span handle;
  • stable system and historical bytes stay ahead of changing Entroly context, rather than rewriting the system prefix on every turn;
  • at soft pressure, a provider-observed warm cache defers optional reshaping; a detected loop or hard pressure overrides that deferral to prevent overflow;
  • recent user/tool turns are preserved; if recoverable compaction still cannot get below the safety watermark, the proxy returns an actionable 413 instead of forwarding a request that is expected to fail upstream.

The guard supports OpenAI messages and Responses input, Anthropic tool_result, and known textual Gemini functionResponse / codeExecutionResult fields. Gemini IDs, part order, and thought signatures are not rewritten. Unknown or ambiguous structures pass through unchanged and can trigger the explicit capacity error rather than being guessed at.

This protects only requests routed through the Entroly proxy; it does not mutate an agent application's saved transcript in the background. Provider-reported cached-token and cache-write usage remains the source of truthβ€”Entroly does not convert an internal exact-match counter into a dollar-savings claim.

Configuration, recovery, and operational limits


Proof in 30 seconds

Three short, reproducible checks show the value before asking you to trust the product. These are not mocked terminal recordings: each video is rendered from a checked-in command that verifies its source artifact before printing a number. Click an animation for the MP4, or run the command below it yourself.

1. Prove the installed path worksβ€”without an API key

Entroly local verification: twelve checks pass without an API key

The packaged verifier exercises import, compression, receipts, witness checks, recovery, proxy routing, and replay, then writes a machine-readable JSON report. It is an install smoke testβ€”not a savings or model-quality benchmark.

entroly verify-claims

2. Prove tighter context can preserve more answers

Using Headroom today? Run Entroly against the same workload and compare answer retention, recoverability, state size, and context cost locally. The results below use the published Headroom 0.31.0 package as a versioned baseline; they are not a verdict on every Headroom or Entroly workload.

Frozen model-recovery holdout comparing Entroly with the published Headroom 0.31.0 baseline

On the frozen 24-case holdout, Entroly answered 24/24 cases; the published Headroom 0.31.0 baseline answered 18/24, at 28.88% versus 42.97% effective context. This is a synthetic local Qwen2.5-1.5B test at temperature 0, not a universal product or model claim. The six discordant cases favored Entroly (exact McNemar p=0.03125).

python scripts/readme_proof.py model-recovery

Protocol and limitations Β· raw holdout artifact

3. Prove omitted evidence remains recoverable after restart

Fresh-seed restart recovery comparing Entroly with the published Headroom 0.31.0 baseline

The prior v2 run tied at 66/66 and remains published. In the fresh-seed v4 Windows revalidation, both Entroly and the published Headroom 0.31.0 baseline recovered 66/66 payloads byte-exactly after restart β€” both satisfy the recovery-integrity gate. This is parity, not leadership: an earlier v3 run recorded a single transient competitor store-lock failure (55/66) that a clean re-run did not reproduce. This is one reproducible run, not a universal durability claim.

python scripts/readme_proof.py restart-recovery

Protocol, prior tie, and limitations Β· current raw artifact Β· prior tie artifact

The animations, MP4s, static frames, source hashes, and commands are bound in the proof media manifest. Maintainers can rebuild them with python scripts/render_readme_proof_videos.py generate and reject stale media with python scripts/render_readme_proof_videos.py verify. Rebuilding requires Pillow, tiktoken, and FFmpeg; a missing frozen-tokenizer dependency fails with an actionable install command instead of weakening the artifact check.


Get started

The best first run is local and proof-driven. It should work before you connect an API key, proxy, paid model, or enterprise setup.

pip install -U entroly     # or: npm i -g entroly  Β·  brew install juyterman1000/entroly/entroly

1. Prove the package works on your machine:

entroly verify-claims      # SDK import, indexing, optimization, exact recovery, engine mode
entroly simulate           # local no-LLM savings estimate on your current repo

2. Pick one integration path:

You are usingRun thisWhy
Claude Code subscriptionentroly attach create --client claude --project . --ttl 4h --installInstalls scoped, expiring MCP access without placing a bearer token in process arguments
Codex or OpenClawentroly attach create --client codex --project . --ttl 4h --installBinds Entroly to this project with revocable least-privilege access; replace codex with openclaw as needed
Cursor, VS Code, Windsurf, or another MCP cliententroly init, or register entroly as a stdio command with no argumentsLocal MCP tools without requiring Docker
Pay-as-you-go API keys or a custom appentroly proxyTransparent Anthropic/OpenAI-compatible optimization path
Python appfrom entroly import compress, compress_messages, optimizeDirect SDK control
Node/npm workflownpm install -g entrolyWASM runtime without a Python-first setup
CI or release gateentroly batch --budget 8000 --fail-over-budgetEnforce prompt budgets before merge

3. Best setup for Claude Code subscription users:

entroly attach create --client claude --project . --ttl 4h --install

Claude Code stays your client. Entroly adds only the granted tools for compression, retrieval, receipts, and verification. Revoke access at any time with entroly attach revoke <grant-id> --uninstall; every tool call re-checks the grant, expiry, project, and scope.

4. One command β€” auto-detects your IDE, wraps your agent, opens the dashboard:

cd /your/repo && entroly go

5. Or wrap a specific agent:

entroly wrap claude     # Claude Code
entroly wrap cursor     # Cursor
entroly wrap codex      # Codex CLI
entroly wrap aider      # Aider

6. Or run the proxy β€” best for pay-as-you-go API keys and custom apps:

entroly proxy                                   # http://localhost:9377
ANTHROPIC_BASE_URL=http://localhost:9377     your-app
OPENAI_BASE_URL=http://localhost:9377/v1     your-app
GOOGLE_GEMINI_BASE_URL=http://localhost:9377/v1beta     your-app

7. Or measure it on your own repo first:

entroly demo            # before/after token + cost estimate
entroly simulate        # local no-LLM savings estimate
entroly perf            # local no-LLM savings + optimizer latency
entroly value           # provider value, local reductions, and legacy history kept separate
entroly verify-claims   # runs the packaged self-test, writes a JSON report

Local-first: Entroly performs indexing and selection on-device. The selected prompt is sent only through the model integration you configure. Entroly does not send outbound analytics by default. Apache-2.0.

First-run success contract

Entroly should feel useful before you connect a paid model key:

  • entroly verify-claims proves SDK import, local indexing, optimization, exact recovery, and native/pure-Python engine mode.
  • entroly simulate shows the likely token reduction on your repo without making an LLM call.
  • entroly value reports measured provider-bound reduction separately from local-only SDK/MCP/npm reductions, with $0 claimed for paths that cannot prove provider delivery.
  • MCP setup works for Claude Code subscription users who do not want proxy/API-key mode.
  • Proxy mode is available when you control the provider key and want transparent request optimization.
  • npm/WASM is available for Node-first users, but Python remains the fullest CLI/SDK path.

If your repo is tiny or already under budget, Entroly should say so and pass through rather than invent fake savings.


Context Commits

A Context Commit is a portable JSON artifact for the exact context selected for an agent request. It binds the ordered selected text, omitted evidence, exact recovery data, engine/version identity, and optional parent lineage to one content-addressed ctx_... identifier.

entroly context-commit ./repo --query "Where is token rotation enforced?" \
  --budget 8000 --out context-commit.json
entroly context-commit --verify context-commit.json
from entroly import create_context_commit, replay_context, verify_context_commit

commit = create_context_commit(
    [("auth.py", open("auth.py", encoding="utf-8").read())],
    query="Where is token rotation enforced?",
    token_budget=8000,
)
assert verify_context_commit(commit).valid
exact_context = replay_context(commit)

The artifact is self-contained and therefore may contain source text in its recovery bundle. Keep it under the same access and retention policy as the source repository. Content addressing proves mutation, not signer identity; use Entroly's optional Ed25519 attestation and Merkle-log APIs when custody or operator identity matters. Contract and threat model.


Proof-guided exact recovery

Entroly can begin with a small committed context, verify the model draft locally, turn unsupported claims into evidence obligations, and recover only the exact omitted chunks that may resolve them. The committed prefix stays byte-identical across rounds; recovery stops under explicit model-round, token, and chunk bounds.

entroly proof prepare ./docs --query "What proves restart recovery?" \
  --budget 8000 --idempotency-key request-001 > prepared.json
# Send prepared.json's request through the model route you already operate.
entroly proof advance pgs_... --output-file draft.txt \
  --idempotency-key model-round-0
entroly proof inspect pgs_...

Prepare, advance, and inspect are local, durable, restart-safe, and perform no provider call. The CLI, MCP tools, and same-origin localhost sidecar share the same state machine. OpenClaw can optionally automate bounded revision passes, but that mode is off by default because each revision can be billable. Entroly never chooses the provider or receives its credentials.

Protocol, limits, integration setup, and executable contract.


Context Receipts

Receipt-producing selection workflows record what was used, what was omitted, why, and what risks remain. This is useful for hard multi-document work such as contracts, policies, addenda, code reviews, and audit evidence where a bare top-k result is not enough.

entroly ingest ./docs
entroly select --query "Does this contract have a change-of-control clause?" --budget 8000
entroly receipt .entroly/receipts/cr_example.json
entroly audit .entroly/session_chain.json
entroly explain --why-omitted chk_example --receipt .entroly/receipts/cr_example.json

The receipt JSON includes selected chunks, omitted relevant chunks, ranking reasons, dependency links, source fingerprints, token ratio, warnings, and a reproducibility hash. The Markdown report is designed for human review before a compressed context is trusted.

Implementation notes:

  • Rust core (entroly-core/src/context_receipts.rs) handles deterministic ingestion, BM25-style ranking, dependency scans, selection, and hashes when the native wheel is available.
  • Python control plane (entroly/context_receipts/) provides CLI wiring and a pure-Python fallback for source checkouts.
  • The semantic/vector scorer and reranker are explicit extension points; the local MVP ships with lexical scoring and dependency heuristics, not a legal-accuracy guarantee.

Examples:


Proof

Context Commit conformance (synthetic deterministic code fixtures, local, no model or network calls):

Integrity propertyCommitted result
Deterministic replay across Python + Rust modes128 / 128
Exact recovery of omitted chunks576 / 576
Tamper mutations detected768 / 768

Reproduce: python -m benchmarks.context_commit_conformance. Raw JSON. These numbers measure artifact integrity, replay, and recovery on the committed fixtures; they do not measure model-answer quality or claim identical Python/Rust selection.

Context Efficiency Frontier research: Entroly is building a paired, model-neutral benchmark for the question token-savings tables cannot answer: does less context preserve real task quality? The preregistered protocol compares raw context, model-native compaction, Entroly, and their combination using provider-observed tokens, cost, latency, task success, evidence recall, and unsupported claims.

Read the preregistered protocol. No headline result will be claimed until the paired confidence bounds pass.

Matched token-cap active-context quality frontier (1.0.59 source candidate): across 60 frozen SQuAD v2 long-context RAG/tool-result trials, without invoking recovery from the published Headroom 0.31.0 baseline's CCR pointers, Entroly retained 95.0%, 93.3%, and 88.3% of accepted answers at the 2x, 4x, and 8x token caps. The published Headroom 0.31.0 baseline retained 1.7% at each cap. The paired two-sided exact McNemar tests pass at every point (p <= 4.45e-16). Entroly met all 180 caps; the baseline met the 2x/4x caps and exceeded the 8x cap, retaining 18.6% of tokens against the 12.5% maximum.

Maximum token capEntroly answer retained / actual keptPublished Headroom 0.31.0 baseline
2x (50%)95.0% / 39.3%1.7% / 18.6%
4x (25%)93.3% / 19.2%1.7% / 18.6%
8x (12.5%)88.3% / 10.4%1.7% / 18.6% (above cap)

A separate eight-question, randomized local qwen2.5:1.5b guard at 4x scored raw context at 62.5% exact match, Entroly at 87.5%, and the published Headroom 0.31.0 baseline at 12.5%, with no errors. This small local-model sample is a veto guard, not the headline or a frontier-model claim.

Generated report Β· full auditable artifact Β· protocol and reproduction. Verify it with python -m benchmarks.compression_frontier verify benchmarks/results/compression_frontier.json.

Scope: extractive answer retention in structured SQuAD-v2 RAG results. The published Headroom 0.31.0 baseline's CCR pointers remain in its output, but retrieval recovery is not run; this measures immediately visible active context, not Headroom's end-to-end CCR workflow. Entroly is measured from the 1.0.59 source candidate; do not call this a released-package result until 1.0.59 is published. This does not establish superiority for every task, model, compressor, or production workload.

Entroly 1.0.59 candidate and published Headroom 0.31.0 baseline on a matched token-cap frontier

Same-input compression gauntlet: on four deterministic agent-tool fixtures, current Entroly source (package version 1.0.59) and the published Headroom 0.31.0 baseline both retained 100% of the preregistered answer evidence. Under the shared o200k_base tokenizer, Entroly reduced weighted input tokens by 95.1% versus 31.4% for the baseline's public compress() pipeline with its documented agent-90 high-savings profile. Entroly compressed all four fixtures; the baseline compressed two and safely passed two through.

Generated report Β· raw inputs and outputs Β· protocol and reproduction. Verify the artifact with python -m benchmarks.compression_gauntlet verify benchmarks/results/compression_gauntlet.json.

This is a synthetic, no-model compression/evidence result. It does not measure downstream answer quality or establish neural/ML superiority. The Context Efficiency Frontier above is the required gate for a real-model claim.

Entroly and the published Headroom 0.31.0 baseline on a same-input compression gauntlet

Cross-process recovery holdout: the preregistered six-writer test first exposed a serious Entroly failure (only 8/32 development payloads survived), which is preserved in the evidence. The original Entroly 1.0.59 holdout and the immutable v2 revalidation both recorded Entroly and the published Headroom 0.31.0 recovering 66/66 payloads. On the fresh-seed v4 revalidation of the current complete-line recovery implementation, both Entroly and the published baseline recovered 66/66 byte-exactly β€” both satisfied the frozen integrity gate. An earlier v3 run recorded a single transient competitor store-lock failure (55/66) that a clean re-run did not reproduce, so this is parity; it does not establish universal recovery superiority.

On the current-implementation Windows/Python 3.10 revalidation, the published Headroom 0.31.0 baseline had lower successful store-call latency (1.524 ms versus 34.848 ms p50). Entroly had lower retrieval latency (0.059 ms versus 0.441 ms p50) and a smaller live state footprint (95,438 versus 1,626,736 bytes). The baseline used SQLite WAL with synchronous=NORMAL; Entroly fsynced its state file on each commit, so this is not a matched power-loss durability comparison. These are scoped workload measurements, not universal claims.

Frozen protocol and full result table | current v4 revalidation | prior v2 tie | original post-repair holdout | original failing artifact.

Quality-gated compression latency holdout: on the same four deterministic agent-tool fixtures and public entry points as the gauntlet, Entroly 1.0.59 source was 2.94x faster than the published Headroom 0.31.0 baseline for warm compressor calls (95% bootstrap CI 2.74x–3.13x) and 2.39x faster for product import plus the first call in a fresh process (1.89x–2.70x). Both systems completed every fixture, retained 100% of preregistered evidence, remained deterministic, and never inflated tokens.

Protocol, per-fixture timings, and limits | full holdout artifact | development artifact.

Scope: Windows/Python 3.10, synthetic local compression, 120 warm and 40 cold observations per participant. Cold excludes interpreter startup and includes product import plus first call. This is not provider latency, downstream answer quality, neural superiority, or universal product superiority.

Model-triggered recovery holdout: after compression for one question, a different future audit question was revealed to a local qwen2.5:1.5b guard. On 24 frozen query-shift cases, raw context and Entroly both scored 24/24 exact; the published Headroom 0.31.0 baseline scored 18/24. All six paired differences favored Entroly (two-sided exact McNemar p = 0.03125). Entroly's mean effective context ratio, including recovery evidence on every triggered retry, was 28.88% versus 42.97% for the baseline.

Every Entroly row triggered retrieval and recovered a complete source-exact JSON object. The published baseline answered 18 rows from active context; its remaining six rows were scored under the frozen no-oracle retrieval rule. The raw artifact retains every response. The complete artifact passed the strengthened verifier with zero execution errors.

Protocol, rejected variants, reproduction, and limits | full holdout artifact | development artifact.

Scope: synthetic 48-record JSON audit logs, Windows/Python 3.10, 24 holdout cases, local Qwen2.5 1.5B Q4_K_M at temperature zero. The published Headroom 0.31.0 baseline uses its public compress() plus persistent CompressionStore contract; MCP transport is excluded. This is a scoped workflow result, not evidence about hosted frontier models, every agent workload, provider cost, or overall product superiority.

PRISM-R neural research preview: a generic MiniLM encoder did not beat BM25 as a primary paragraph scorer (97.7% versus 99.0% held-out evidence recall), so Entroly rejects that neural-primary claim. A disagreement guard reached 99.3% while selecting 1.02 of 16 passages on average. In a separate 200-pair query-shift pilot at a nominal 25% active budget, PRISM-R retained 87.0% of current-query evidence versus lexical selection's 60.5%; when a different future question was revealed, exact receipt-backed rehydration raised its evidence retention from 9.0% to 90.5%. Active plus recovered context was 50.6% of the original.

Research design and prior art Β· held-out retrieval artifact Β· query-shift artifact.

These are offline exact-evidence pilots on frozen SQuAD v2 subsets. They do not measure generated answers and are not downstream answer-quality, latency, production-savings, or general neural superiority claims. PRISM-R is an opt-in research prototype, is not the default compressor, and remains opt-in research code.

The tables below link each reported number to its committed result. Treat them as evidence for those specific datasets, budgets, models, and commitsβ€”not as a guarantee for another repository. entroly simulate uses a local token estimate; use provider-observed usage for a billing or production claim.

Accuracy retention β€” does compression hurt answers? Measured with gpt-4o-mini; intervals are Wilson 95% CIs. Each row links its raw result file.

BenchmarknBudgetBaselineWith EntrolyRetentionToken savings
NeedleInAHaystack202K100%100%100%99.5%
LongBench (HotpotQA)502K64%66%103%85.3%
Berkeley Function Calling50500100%100%100%79.3%
SQuAD 2.05010080%72%90%43.8%
GSM8K2050K85%85%100%pass-through*

*pass-through: context already fit the budget, so Entroly left it unchanged. Reproduce: python benchmarks/run_readme_benchmarks.py (needs OPENAI_API_KEY). Scope, additional artifacts, and limitations are in the public evidence ledger.

Hallucination detection β€” committed HaluEval-QA balanced, both-answers-scored run:

ResultDecisionsAccuracyAUROCScope
WITNESS full benchmark20,00084.92% on the 16,000-decision held-out split0.7976Local, deterministic verifier
WITNESS on the shared GPT sample1,20086.58%0.8132Same sampled decisions used for the GPT rows
gpt-4o-mini on the shared sample1,20086.25%not reportedAPI judge comparison only

Reproduce: python benchmarks/halueval_qa_faithful.py. Protocol and raw result. The shared-sample accuracies overlap within their reported uncertainty; this result does not establish superiority, general hallucination prevention, or production answer quality. The separate STAVE exploratory result is not used for the headline because it follows a different evaluation setup.


Works with your stack

OpenClaw: keep the evidence uniform compression drops

OpenClaw remains the conversation and agent runtime. Attach Entroly as its context control plane with entroly attach create --client openclaw --project . --ttl 4h --install.

The OpenClaw context-engine plugin keeps context assembly separate from provider routing. The same assembly path can be used with OpenAI, Anthropic, Gemini, Nemotron, OpenRouter, Ollama, and custom routes because OpenClaw owns routing and authentication. Its resolved prompt budget is authoritative; when an older or degraded host omits that value, Entroly can derive a conservative input ceiling from verified, operator-supplied, or explicitly discovered model metadata. Unknown and announced limits fail safely instead of being guessed. The receipt binds the discovery trust, registry digest, source, output reserve, and safety margin to the assembly decision. Entroly preserves opaque provider blocks and delegates /compact and overflow recovery back to OpenClaw.

The beta OpenClaw context engine scores older messages against the current request. Matching evidence is pinned verbatim when it fits a bounded reserve; lower-value history is compressed around it, and every decision is written to a local receipt.

For high-stakes answers, the plugin also has an explicit opt-in proof-guided mode: it verifies the draft locally, recovers exact omitted messages, and asks OpenClaw for no more than the configured revision bound. It is disabled by default, requires OpenClaw's conversation-access grant, and may add a paid model call. Unsafe or unverifiable delivery is visibly withheld rather than silently passed through. See the plugin setup.

In the committed synthetic, no-model control below, both strategies fit the same 1,800-token estimated budget. Uniform compression lost the exact old authentication instruction; evidence pinning retained it byte-for-byte.

StrategyEstimated assembled tokensExact evidence retained
Uniform budget compression1,797No
Entroly evidence pinning1,793Yes

Reproduce locally: python -m benchmarks.openclaw_evidence_pinning. Benchmark JSON Β· Plugin setup

Synthetic deterministic normalized multi-provider workload, 23,089 estimated source tokens, 11 messages, zero model calls. Token counts are estimates, not billed usage, and this result does not establish downstream model accuracy.

entroly wrap <agent> chooses the safest available integration: a session-scoped proxy launch, an MCP registration, or guided custom-endpoint setup when a third-party schema should not be mutated automatically.

Agent compatibility

Status describes integration depthβ€”not a blanket quality or savings guarantee. Provider-observed savings require requests to traverse an Entroly proxy route. MCP integrations add context, recovery, receipt, and verification tools but do not automatically intercept every model request.

Agent or platformEntroly pathCurrent statusImportant boundary
Claude CodeScoped MCP attachment; API-key proxyNativeClaude Pro/Max subscription sessions use MCP; public-API proxying requires ANTHROPIC_API_KEY.
Codex CLIScoped MCP attachment; API-key proxyNativeChatGPT-account mode can bypass OPENAI_BASE_URL.
GitHub Copilot CLIMCP for subscription sessions; BYOK custom-provider proxySupported with mode boundaryEntroly does not claim interception of GitHub-hosted subscription inference.
OpenClawContextEngine plugin and scoped MCP attachmentNativeOpenClaw retains provider authentication; Entroly controls context assembly and receipts.
CursorAutomatic project MCP config; optional custom endpointAutomatic MCPProxy accounting exists only when the model route points through Entroly.
Aider / OpenCodeSession-scoped OpenAI-compatible proxyOne commandRequires a provider route that accepts a custom endpoint.
Cline / ContinuePrinted endpoint or provider configurationGuided setupEntroly avoids silently mutating versioned extension schemas.
Grok CLICustom model pointed at EntrolyGuided BYOKDefault signed-in inference is not claimed as intercepted.
Goose / OpenHandsDocumented custom endpointValidation pendingAdded to the registry only with explicit auth boundaries and watchdog verification.
Mistral Vibe / Oh My Pi / ZCodeGenerated custom-provider configurationGuided setupThe user chooses the upstream model and credential contract.
Cortex CodeSDK/library boundary onlyNot validated as a wrap targetNo official tested endpoint contract is currently advertised by Entroly.

See the evidence-bounded compatibility guide, including Copilot subscription vs BYOK behavior and the exact meaning of each status.

Code-backed setup registry
Integration classCurrent targets
CLI proxy launchClaude Code, Codex CLI, Aider, GitHub Copilot CLI BYOK, Gemini CLI, Qwen Code, OpenCode, Charm CRUSH, Hermes, Pi, Ollama, Goose, OpenHands
Automatic MCP configCursor, Windsurf, VS Code MCP clients, Claude Desktop, Claude Code MCP mode, Zed
Guided endpoint setupGrok CLI, Mistral Vibe, Oh My Pi, ZCode, Cline, Roo Code, Continue, Cody, Amp, Kiro, Qoder, Trae, Antigravity, Amazon Q, Verdent, JetBrains AI, Helix, Tabby, Twinny, Sublime, Emacs, Neovim, Fitten Code, Tabnine, Supermaven

Any OpenAI-compatible client can use the proxy only when it supports a custom base URL, the upstream is configured correctly, and its authentication terms permit local routing. Entroly's post-session watchdog reports when a wrapped CLI sends the proxy zero requests.

As a library (LangChain, LangGraph nodes, LlamaIndex, your own code):

from entroly import compress, compress_messages, optimize

compressed = compress(api_response, budget=2000)          # query-agnostic
messages   = compress_messages(messages, budget=30000)    # whole conversation
gentle     = compress_messages(messages, target_ratio=0.90)  # smooth relative operating point
context    = optimize(fragments, budget=8000, query="fix the login bug")  # task-conditioned

compress_messages infers the final user turn as the task and uses it to prioritize answer-relevant evidence in older context. target_ratio is based on Entroly's dependency-free token estimate; measure provider-observed tokens with the Context Efficiency Frontier before publishing a savings claim.

LangChain has a packaged helper. LangGraph and other orchestrators can call the same Python SDK at their context-assembly boundaries; Entroly does not claim a dedicated LangGraph adapter.

In CI β€” fail the build if a prompt blows the token budget:

- run: pip install entroly && entroly batch --budget 8000 --fail-over-budget

When to use it Β· when to skip

Great fit

  • Large repos where the agent only sees a few files at a time
  • Chatty, multi-turn agents (cache alignment compounds the savings)
  • Anywhere you want answers checked against evidence before you trust them
  • Teams trying to cut a real, growing AI bill

Skip it (it'll just pass through)

  • Tiny repos or short prompts that already fit the budget
  • Judgment-heavy tasks where you want the full flagship model every time

What's inside

Entroly exposes 19 local control mechanisms across input, inference, output, verification, and learning. The table describes their role and source location; it does not assign an unmeasured savings percentage to each mechanism.

The 19 mechanisms (and the file that implements each)
#MechanismRoleSource
1Context compression (knapsack + compressors + dep-graph)Select and transform context under an explicit budgetproxy_transform.py, qccr.py
2WITNESS + STAVE verification gatewayProduce local grounding-risk signals; benchmark protocols remain separatewitness.py, verifiers/stave.py
3Cache AlignerPreserve eligible prompt-prefix bytes for provider cache reusecache_aligner.py
4Escalation cascade (conformally calibrated)Gate opt-in escalation under configured confidence policyescalation.py
5Conformal cascadeCalibrate a cost/coverage operating pointconformal_cascade.py
6RAVS Bayesian routerroutes easy tasks to cheaper modelsravs/router.py
7Fast-path crystallized skillsReuse an accepted cached result when its key and policy matchfast_path.py
8Adaptive compression budgetright-sizes budget per queryadaptive_budget.py
9Entropic conversation pruningflattens history-growth costproxy_transform.py
10Shell-output compressionReduce tool output under an explicit policy and budgetproxy_transform.py, shell_codec.py
11Response distillationfewer output tokens billedproxy_transform.py
12Local DeBERTa NLI (opt-in)Run supported NLI checks without an API callwitness.py
13EICV suppressorSuppress content that crosses the configured risk thresholdeicv_suppressor.py
14PRISM 5D adaptive weightsAdapt weights from recorded outcomesonline_learner.py, prism.rs
15Federation (opt-in)Share explicitly enabled weight contributionsfederation.py
16Entropic Shell Codecuniversal tool-output fallbackshell_codec.py
17Semantic Resolution Protocolresolution-aware file readssemantic_resolution.py
18Adversarial Context FirewallDetect and apply policy to prompt-injection patternscontext_firewall.py
19Witness-Verified HandoffCheck handoff claims against supplied evidenceverified_handoff.py

Some levers can compound: input selection, cache alignment, opt-in model routing, and output distillation affect different parts of a request. The dashboard reports each contribution separately. Do not multiply estimated percentages into a billing claim; validate the complete path with provider-observed usage. Implementation details are in docs/DETAILS.md.

Engine & install options

Python is the reference runtime. The optional Rust core accelerates supported compute-heavy paths through PyO3, and a separate Node runtime ships through WASM. The base Python install does not imply that the Rust extension is active; entroly verify-claims reports the engine mode it actually exercised.

pip install entroly            # core: MCP server + Python engine
pip install entroly[proxy]     # + HTTP proxy
pip install entroly[native]    # + Rust engine
pip install entroly[full]      # everything

npm install -g entroly         # WASM runtime, no Python needed
docker pull ghcr.io/juyterman1000/entroly:latest

Single binary, no Python β€” a standalone Rust proxy that auto-detects Anthropic/OpenAI/Gemini and stays cache-aligned:

cd entroly/entroly-core && cargo build --release --bin entroly-rs --features proxy
./target/release/entroly-rs proxy --upstream https://api.anthropic.com

WITNESS β€” check answers before you trust them

entroly witness --context-file evidence.txt --output-file answer.txt --mode strict
entroly proxy --witness strict --witness-profile rag    # suppress unsupported claims inline

Profiles tune false-positive behavior per workload (rag, qa, code fail closed; chat, summary warn). When WITNESS is enabled on a supported non-streaming proxy path, Entroly emits a certificate and the dashboard can show flagged claims, evidence snippets, and suppression counts. Optional offline DeBERTa NLI is enabled with ENTROLY_LOCAL_NLI=1; evaluate it on your workload before making an accuracy claim.


Why Entroly is different

The winning product is not the one that makes the prompt smallest. It is the one that helps the model do the best work for the fewest tokens.

Entroly is built around that trust contract: select the right evidence, compress supporting material, keep originals recoverable, emit a receipt, and verify the answer against the retained evidence.

LayerEntroly answer
Context engineBM25 + entropy + dependency graph + knapsack/IOS selection under budget
Compression/recoveryEvidence-Locked Compression, exact CCR handles, omitted-span retrieval store
TrustContext Receipts, WITNESS, EICV, STAVE, provenance, receipt proofs
GatewayProvider adapters, cache-aware routing, usage ledger, cost cortex, harness budgets
Memory/sessionMemory OS, Memory Fabric, long-term memory, checkpoint relevance, session digests, value tracking
MultimodalDiff, diagram, voice, image, and structured-context ingestion with provider-aware token estimates
CogOps/vaultBelief compiler, vault search, epistemic router, flow orchestrator, verification engine, workspace change sync
LearningFeedback, PRISM/RAVS, archetype adaptation, cache and routing signals
Self-improvementAutotune, real-benchmark-gated dreaming, reward crystallization, skill synthesis, promotion gates, rollback, optional federation
SecuritySAST, prompt-injection scanning, redaction policy, path containment
ObservabilityDashboard, daemon, control plane, health reports, usage accounting, local proof JSON
RuntimePython SDK/CLI/MCP plus Rust native engine and Node/WASM runtime

The goal is same-quality or better model work at materially lower token cost.


Self-improving local runtime

Entroly has a guarded self-improvement loop. It is designed to learn from real outcomes without letting adaptation run wild.

LoopWhat it does
Feedbackrecord_test_result, record_command_exit, record_ci_result, and record_edit_outcome turn real outcomes into learning signals
PRISM/RAVSOnline Bayesian weights and honest-outcome correction move selection toward what actually passes tests, CI, and user acceptance
Autotune/dreamingIdle/offline loops test weight perturbations against real benchmark cases; optional world-model rollouts rank proposals but cannot promote them
Reward crystallizationRepeated high-reward query families become reusable skills with statistical lower-bound checks
Skill synthesisStructural synthesis tries local, deterministic skill generation before any LLM fallback
Promotion gateShadow policies must be non-inferior before promotion; rollback triggers on repair/retry/success regression
Budget guardrailEvolution is intended to stay token-negative by spending only a bounded fraction of provider-classified cost avoidance; local-only and legacy estimates do not fund it
Optional federationWeight contributions can be shared only when explicitly enabled

This is the important distinction: Entroly does not just remember context. It can learn which context-selection strategies, routes, and skills actually produce successful work.

Experimental verified dreaming can additionally learn state + action -> next state + reward from real benchmark transitions and use short, uncertainty-penalized rollouts to choose which experiment to run next. Real and synthetic transitions are hash-chained in separate ledgers, and only real holdout evidence can promote a policy or configuration. It is opt-in via ENTROLY_VERIFIED_DREAMING=1; see Verified dreaming for the evidence contract, Ebbiforge adapter, and non-claims.


Compared to

QuestionEntroly's documented behavior
What happens before compression?Query-aware ranking and budgeted selection
How are omissions handled?Receipts and recovery handles when recoverable state is retained
How are savings reported?Local estimates for exploration; provider-observed usage for production claims
Is answer quality guaranteed?No. Use the linked task benchmarks and validate the target workload
Is an embeddings API required?No for the default local selection path
Is answer verification automatic everywhere?No. WITNESS must be enabled on a supported integration path

Compressing a bad selection is still a bad selection. Entroly ranks first, then compresses β€” so the model gets structure, not just fewer tokens.


Docs & community

  • Context control plane β€” model metadata, secure attachment, gateway recovery, and context-session UI guarantees.
Command reference
CommandWhat it does
entroly goOne shot: detect IDE, wrap your agent, open the dashboard
entroly wrap <agent>Wrap a specific coding agent (38 supported)
entroly attach create/list/revokeGrant, inspect, or revoke scoped and expiring MCP access for Claude Code, Codex, or OpenClaw
entroly proxyStart the HTTP proxy on localhost:9377
entroly as an MCP stdio commandStart the installed Python MCP server when launched by an MCP client
entroly serveStart through the Docker image by default; set ENTROLY_NO_DOCKER=1 for the installed Python runtime
entroly daemonSupervise proxy + dashboard + MCP + file watcher
entroly dashboardOpen the live metrics dashboard
entroly demoBefore/after token + cost estimate on your repo
entroly ingestIngest documents into a local Context Receipt index
entroly selectSelect context under budget and write a Context Receipt
entroly context-commitCreate or verify a replayable, recoverable context artifact
entroly proof prepare/advance/inspect/runRun the durable, bounded proof-guided exact-recovery protocol
entroly receiptRender a Context Receipt as a Markdown report
entroly explainExplain why a chunk was selected or omitted
entroly simulateLocal no-LLM savings estimate with an explicit baseline
entroly perfLocal no-LLM savings and optimizer latency
entroly valueEvidence-classified provider value, local token reduction, and legacy history
entroly benchmarkLocal comparison: Entroly vs raw context vs top-K
entroly healthCodebase health grade (A–F)
entroly cache statsPersistent cross-session cache stats
entroly ravs reportModel-routing cost-savings report
entroly witnessCheck an answer against supplied evidence
entroly verify-claimsRun the packaged self-test β†’ JSON report

Marketplace status

Marketplace pages are discovery surfaces, not release verification. The public LobeHub listing was still showing stale version and capability metadata in the latest recorded audit. Use the live page for current external status and the LobeHub score audit for the dated baseline. Until the listing matches the published package and passes external validation, install from PyPI or npm using the instructions above.

Apache-2.0 Β· local-first Β· no outbound analytics by default

pip install entroly && entroly go

Related MCP Servers

modelcontextprotocol/server-memoryVerified

πŸ“‡ 🏠 - Knowledge graph-based persistent memory system for maintaining context

🧠 Knowledge & Memory2 views
0xshellming/mcp-summarizer

πŸ“• ☁️ - AI Summarization MCP Server, Support for multiple content types: Plain text, Web pages, PDF documents, EPUB books, HTML content

🧠 Knowledge & Memory0 views
20alexl/claude-engram

🐍 🏠 - Persistent memory and session intelligence for Claude Code. Auto-tracks mistakes, decisions, and context via hooks. Mines session history for patterns and cross-session search. Loop detection, pre-edit warnings, context compaction survival. Runs locally with Ollama.

🧠 Knowledge & Memory0 views
a2cr/a2cr

🐍 ☁️ 🏠 🍎 πŸͺŸ 🐧 - MCP server for AI-agent handoffs. Saves client-encrypted WorkBaton checkpoints and WorkStash notes so Codex, Claude Code, Roo Code, and other MCP clients can resume work without passing full chat history.

🧠 Knowledge & Memory0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it β†’
β˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.