Skip to main content
Glama

What is Entroly? (in plain English)

Entroly is a local-first context control plane for AI coding tools. It selects evidence within a token budget, preserves recoverable omissions, and records selection decisions in receipts. Three properties to evaluate on your task:

๐Ÿ’ฐ Avoidable input cost

Smaller requests can reduce input cost when they reach a provider through an Entroly-controlled route. The result depends on the workload and provider cache โ€” see the real numbers below.

๐Ÿ” Recoverable originals

Receipt-backed recovery retains source material locally. Exact recovery requires the referenced store and source bytes to remain available; it does not guarantee answer quality.

๐Ÿงพ You can check its work

Every decision comes with a receipt: what was kept, what was left out, and why.

Do I have to change my code? No. On hosts with a verified prompt hook, Entroly runs before the model plans. MCP-only integrations remain callable tools that an agent may skip; API traffic is intercepted only when it is routed through the Entroly proxy. Check entroly activation status --json instead of assuming an installed integration is active.

Do I need to pay for anything to try it? No. The two commands in the Install section below run on your own machine, with no API key, and show you real numbers on your own project before you connect anything paid. (Missing native-engine support is reported without downloading packages โ€” see the note under Install.)

Switching coding agents mid-task? entroly-work resume reconstructs unfinished work from durable repository evidence, even if the previous agent left no handoff. The receiving agent must review the inferred state and acknowledge it before claiming work through Entroly. Start with entroly-work --project . --json resume --to-agent codex; the agent continuity guide shows the complete flow and how to measure whether it actually saves rediscovery work on your tasks.


Related MCP server: Smart Context MCP

Contributing

Start with development setup and repository layout, then follow the architecture, style guide, and test instructions for the surface being changed. Source, delivery adapters, and benchmark evidence have different review requirements; the contributor guide explains their boundaries.

Install

Not sure which one? Pick Python. It's the complete version and what most people use. The other packages expose different runtime surfaces.

Platform

Install

What you get

๐Ÿ Python (pip) โ€” recommended

pip install -U entroly

Everything: the command-line tool, the server your AI editor talks to, and the code library

๐Ÿ“ฆ Node / npm

npm install -g entroly

Local Node/WASM CLI; the Python package has a broader CLI, SDK, and proxy surface

๐Ÿฆ€ Rust (source build)

cd entroly-core && cargo build --release --bin entroly-rs --features proxy

One self-contained program, no Python or Node needed

๐Ÿบ Homebrew

brew install juyterman1000/entroly/entroly

The command-line tool on macOS/Linux

๐Ÿณ Docker

docker pull ghcr.io/juyterman1000/entroly:latest

Runs in a container, nothing installed on your machine

Prefer a package runner instead of a global install? These commands use the same published artifacts in an isolated tool cache:

# Node or Bun / WASM runtime
npx -y entroly@latest --help
pnpm dlx entroly@latest --help
bunx --bun entroly@latest --help

# Complete Python runtime
uvx --from entroly entroly --help
pipx run --spec entroly entroly --help

The Node commands provide the local WASM CLI. The Python commands provide the complete CLI, SDK, MCP, proxy, verification, and native-engine path described above. Entroly's release workflow smoke-tests all five runners against the exact version before a release is considered complete.

Now check that it worked โ€” free, no API key:

cd /your/repo
entroly verify-claims
entroly simulate

Both run locally. Neither calls an AI or proves answer quality, activation, or a lower provider bill. Use a task-specific --query with simulate; if it reports Relevance ranking is OFF, run entroly doctor before evaluating the selection.

Runtime package repair is off by default. If the native engine is missing, query-conditioned selection is unavailable and reduction figures are labelled unearned. Install it explicitly with python -m pip install -U entroly-core, call entroly.repair() from Python, or set ENTROLY_ENABLE_SELF_HEAL=1 to permit startup repair. This downloads through the configured package index (normally PyPI). ENTROLY_NO_SELF_HEAL=1 and ENTROLY_AIR_GAP=1 override repair consent. See Privacy and recovery-data security.

Extras (entroly[proxy], entroly[native], entroly[full]), the standalone Rust binary, and uninstall steps: Engine & install options.

Contributing from source? Follow the reproducible development setup. Local installation and the normal test suite need no API key; .env.example documents only optional workspace, offline, provider, and proxy settings.


Quickstart โ€” by how you work

Start with the local check. entroly go registers an MCP server for a detected editor and starts a proxy and dashboard. Route API traffic through that proxy or use a supported host hook, then verify that the integration actually ran. The table below shows the available paths.

Your situation

Do this

What it gets you

๐ŸŸข "I control my app's API base URL." (pip / Python user)

pip install -U entroly && entroly go

Starts the local proxy and dashboard; point your app at the displayed URL and check observed requests with entroly value --json

"I use Node, not Python." (npm user)

npm install -g entroly && entroly init

Node/WASM CLI and local MCP path; use Python for the full proxy and SDK path

"I want one binary, no runtime." (Rust user)

cargo build --release --bin entroly-rs --features proxy (from entroly-core/)

A single native program with no dependencies

"I use Claude Code, Codex, Gemini CLI, or VS Code agent plugins." (plugin user)

Install the Entroly plugin/extension for that host, submit one prompt, then run entroly activation status --json

A trusted prompt hook performs bounded local selection before planning; a receipt proves the hook ran

"I use Cursor with third-party configs enabled."

entroly activation install --host cursor --project .

Merges a reversible Claude-compatible prompt hook; native Cursor MCP remains advisory

"I use Kiro IDE 1.x or CLI 3.x."

entroly activation install --host kiro --project .

Installs a reversible project PromptSubmit hook whose stdout is added to agent context

"I use another MCP host."

entroly attach create --client claude --project . --ttl 4h --install or the client-specific command in the compatibility matrix

Scoped Entroly tools and receipts; the model can still skip MCP unless the host has a verified lifecycle hook

"I'm building my own app in Python." (SDK user)

from entroly import compress, compress_messages, optimize

Call it straight from your code, anywhere you assemble a prompt

"I have an API key and my own app." (proxy user)

entroly proxy โ†’ point ANTHROPIC_BASE_URL / OPENAI_BASE_URL / GOOGLE_GEMINI_BASE_URL at localhost:9377

Requests sent through the proxy are eligible for optimization; inspect receipts and provider-observed usage after a real request

Cursor MCP users can also use this one-click install link (no marketplace account required): Add Entroly to Cursor.

Runaway-session rescue โ€” automatic on the proxy, callable everywhere else. When a long agent session approaches the provider's context limit, bulky tool output is compacted in flight: no manual /compact, the prompt prefix stays byte-stable so your warm provider cache survives, and every omitted span is recoverable. The proxy does it for you because it sees the outbound request. Anywhere else โ€” pip, SDK, a provider-SDK wrapper, or an MCP host that passes its transcript โ€” hand the conversation over and get the same policy: from entroly import rescue_session. entroly capabilities reports which protections apply to how you are running. See session rescue.

Why bother: less unnecessary context reaches the model (lower bill, less distraction for the model), drops come with receipts and, where a recovery handle is issued, an exact way back (see what each path keeps below), and you can prove it โ€” entroly verify-claims and entroly simulate show real numbers on your own repo before you connect a paid key.

import json
from entroly import compress, compress_messages, optimize

api_response = json.dumps({"items": [{"id": i, "status": "ok"} for i in range(500)]})
compressed = compress(api_response, budget=2000)   # text in, text out
messages = compress_messages(
    [{"role": "user", "content": "build log:\n" + "step ok\n" * 3000},
     {"role": "user", "content": "Why did the login test fail?"}],
    budget=30000,
)
context = optimize(
    [{"content": "def login(user):\n    return check(user)\n", "source": "auth.py"}],
    budget=8000, query="fix the login bug",
)
entroly compress response.json --out small.json
entroly recover sha256:0b957c79... --out restored.json

What is recoverable: entroly recover returns the complete original for JSON, logs, tables/CSV and shell output. For source code, prose documents, API schemas and chat transcripts it returns only the omitted parts (function bodies, sentences, turns), without their positions, so keep the original file if you need it back whole; the compress receipt says which one you got. compress() and compress_messages() return text only and keep no recovery copy; proxy and rescue_session compaction store the complete original of every block they shorten.

Full setup paths for every agent, IDE, and CI use case: Get started in depth ยท Command reference.


Integration hub

Use Entroly at the SDK, framework, proxy, MCP, plugin or agent boundary. A listed name is not automatically a claim that hosted subscription inference is intercepted; provider-bound savings exist only when the request traverses an Entroly-controlled route.

Open the complete verified integration and operations hub โ†’


See it work in 30 seconds

Not mocked recordings โ€” each video is rendered from a checked-in command that verifies its source artifact before printing a number.

Full protocols, sample sizes, and every caveat: docs/BENCHMARKS.md.


Benchmarks

The question that matters: if you send less, does the AI start getting things wrong? These are standard public tests, run with and without Entroly.

How to read this: Retention is how well the AI still answered โ€” 100% means it did just as well on far less text. Token savings is how much less was sent (and therefore paid for). Measured with gpt-4o-mini; intervals are Wilson 95% CIs.

Benchmark

Baseline

With Entroly

Retention

Token savings

NeedleInAHaystack

100%

100%

100%

99.5%

LongBench (HotpotQA)

64%

66%

103%

85.3%

Berkeley Function Calling

100%

100%

100%

79.3%

SQuAD 2.0

80%

72%

90%

43.8%

GSM8K

85%

85%

100%

pass-through*

*pass-through: context already fit the budget, left unchanged. n=20โ€“50 per row. Reproduce: python benchmarks/run_readme_benchmarks.py (needs OPENAI_API_KEY).

Being straight with you: look at the SQuAD 2.0 row โ€” accuracy went down (80% โ†’ 72%). Compression is a trade, not magic, and it doesn't win everywhere. That's why entroly simulate exists: run it on your own project and see your own numbers before you commit to anything.

Hallucination detection (WITNESS, local, no API): 84.92% accuracy / 0.7976 AUROC on 20,000 HaluEval-QA decisions โ€” within the reported uncertainty of gpt-4o-mini as an API judge on the same shared sample.

Frozen evidence-selection benchmark (opt-in PRISM-R research prototype, not the default compressor): a disagreement guard kept the answer-bearing passage in 298 of 300 cases while selecting an average of 1.02 of 16 passages (paired exact McNemar p=0.21875 vs. BM25 alone) โ€” this experiment measures retrieval of the known-answer passage, not generated-answer quality. Full protocol: PRISM-R neural evidence frontier.

Recovery, latency, and head-to-head frontier results are in docs/BENCHMARKS.md with raw artifacts linked. None of these numbers are a universal or production-savings guarantee for your workload โ€” reproduce them on your own repo with entroly simulate and entroly value.


Accuracy Retention

Historical maintainer-reported experiment, not a quality guarantee. The table below reports one 50K-token-budget run. Overlapping confidence intervals do not establish equivalence or rule out degradation. These results have not been independently reproduced here.

Model: gpt-4o-mini ยท Budget: 50K tokens ยท Wilson 95% CI ยท Reproduce: python -m bench.accuracy --benchmark all

Benchmark

n

Baseline (95% CI)

Entroly (95% CI)

Retention

Benchmark Delta

NeedleInAHaystack

20

100.0% [83.9โ€“100%]

100.0% [83.9โ€“100%]

100.0%

Baseline

GSM8K

100

85.0% [76.7โ€“90.7%]

86.0% [77.9โ€“91.5%]

101.2%

+1.0%

SQuAD 2.0

100

84.0% [75.6โ€“89.9%]

83.0% [74.5โ€“89.1%]

98.8%

-1.0%

MMLU (4-way MCQ)

100

82.0% [73.3โ€“88.3%]

85.0% [76.7โ€“90.7%]

103.7%

+3.0%

TruthfulQA (MC1)

100

72.0% [62.5โ€“79.9%]

73.0% [63.6โ€“80.7%]

101.4%

+1.0%

LongBench (HotpotQA)

100

57.0% [47.2โ€“66.3%]

59.8% [49.8โ€“69.0%]

104.9%

+2.8%

The reported SQuAD score fell from 84% to 83%. Retention ratios above 100% can reflect sampling or model variability. The displayed intervals are historical reported values, not a validated paired comparison; Wilson intervals require binary outcomes and do not justify uncertainty for averaged partial-credit scores. Establishing non-inferiority needs a predefined tolerance, paired per-task outcomes, appropriate uncertainty estimates, and adequate sample size. These results cannot be extrapolated to more aggressive compression or other models.

Context Selection Quality

19-fragment synthetic corpus ยท 300-token budget ยท 3 fixture queries ยท Reproduce: entroly benchmark

Metric

RAW (Naive FIFO)

TOP-K (local baseline)

ENTROLY (Knapsack)

Avg fragments selected

6.0

6.0

8.7

Avg module coverage

3.0

3.7

8.7

Total SAST catches

0

0

3

Entroly sees 8.7 modules where TOP-K sees 3.7 โ€” it includes auth, payments, AND rate limiting. TOP-K misses the rate limiter. Full methodology, CIs, and reproduce commands โ†’


Research

Entroly includes the following research-oriented implementations. A module's presence does not establish production reliability, mathematical novelty, or independent validation; consult its implementation and evaluation limitations.

Algorithm

What it does

Implementation

BIPT

Byte-level hallucination detection via Kolmogorov-inspired provenance tracing

provenance_tracer.py

NKBE

Nash-KKT multi-agent token budget equilibrium

nkbe.rs

Causal Context Graph

Intervention-aware fragment feedback learning

causal.rs

Cognitive Bus

ISA event routing with KL-divergence priority

cognitive_bus.rs

Resonance Matrix

Supermodular pairwise fragment value learning

resonance.rs

System 1 <> 2

Dual-process verified-belief bridge (proxy <> vault)

coupling.py

Read the full research documentation ยท Cite Entroly


Features

  • Picks first, shrinks second โ€” it works out which files actually answer your question, then compresses them.

  • Gives you the original back, exactly โ€” anything left out can be restored character-for-character and checked against a fingerprint.

  • Shows its work โ€” a receipt for every decision: what was kept, what was left out and why, and what risk remains.

  • Fact-checks answers โ€” compares what the AI said against the evidence it was given, on your machine, without paying for a second AI call.

  • Doesn't wreck your caching โ€” keeps the unchanging parts of your prompt stable so your provider's discount for repeated text still applies.

  • Rescues sessions before they crash โ€” when a conversation grows too big, it trims recoverable output instead of letting the provider reject the request mid-task.

  • Can route cheap work to cheap models โ€” optional and fail-closed when uncertain.

  • Cross-agent shared memory โ€” Claude, Codex, Cursor, and Gemini can read and write the same compressed context store with automatic SimHash deduplication and agent provenance tracking.

  • Output token reduction โ€” effort-based routing classifies query complexity and steers model verbosity, reducing output tokens alongside input tokens.

  • Shell hook compression โ€” transparent CLI output compression for git, npm, cargo, docker, pytest, kubectl, and terraform. Preserves errors and warnings, strips progress bars and boilerplate.

  • Image compression โ€” 40-90% reduction on screenshots and diagrams for vision API calls, with optional OCR text extraction.

  • Failure mining โ€” entroly learn --deep mines session data for recurring failure patterns and writes corrections to CLAUDE.md, .cursorrules, and other agent configs.

Runs as a CLI, Python/TypeScript SDK, MCP server, HTTP proxy, or library import. Full surface map: docs/product-surface.md. Architecture and Rust internals: docs/DETAILS.md.


How Entroly compares

Entroly combines budgeted selection, source-span receipts, and optional verification. These are distinct guarantees: a receipt records retained and omitted material; recovery checks source integrity; WITNESS/EICV checks can still produce false positives or false negatives. Solver objectives approximate useful context and do not prove that the chosen context is sufficient for a task.

Compare tools on the same task set, version, model, token budget, and quality criterion. The local TOP-K fixture does not measure any commercial product. We do not provide an independently reproduced cross-product comparison here.


Works with your stack

Install the public Codex plugin from the Entroly repository:

codex plugin marketplace add juyterman1000/entroly --ref main
codex plugin add entroly@entroly-public

Restart Codex, review and trust the hook, then run entroly activation status --json after a task. The marketplace installs the local Node/WASM runtime with the plugin; the model does not have to remember to call an MCP tool before Entroly runs. A receipt proves that the hook executed and selected local context or made an explicit no-match decision. It does not prove token or cost savings without a matched provider-bound baseline.

Install the same public repository as a Gemini CLI extension:

gemini extensions install https://github.com/juyterman1000/entroly --ref main --consent

Restart Gemini CLI after installation. The repository root contains gemini-extension.json and GEMINI.md, so the command works without navigating into an integration subdirectory.

For VS Code or Kiro, download the entroly-vscode-*.vsix asset from the latest GitHub release, then install it with Extensions: Install from VSIX or code --install-extension. The extension is self-contained and does not require an API key.

JetBrains AI Assistant users can add the same server globally at Settings โ†’ Tools โ†’ AI Assistant โ†’ Model Context Protocol (MCP):

{
  "mcpServers": {
    "entroly": {
      "command": "npx",
      "args": ["-y", "entroly-mcp@1.0.91", "serve"],
      "env": {
        "ENTROLY_NO_DOCKER": "1",
        "ENTROLY_MCP_PASSIVE": "1",
        "ENTROLY_MCP_PROFILE": "public",
        "ENTROLY_MAX_FILES": "200"
      }
    }
  }
}

The repository also ships a free, open-source JetBrains plugin that guides this setup from Tools โ†’ Configure Entroly for AI Assistant, checks the local runtime on request, and keeps the evidence boundary visible. See extensions/jetbrains.

MCP marketplace and plugin manifests select the compact public profile so agents see the core context, receipt, continuity, recovery, and verification tools first. A direct entroly serve invocation remains backwards compatible and exposes the full tool surface. You can choose either behavior explicitly with ENTROLY_MCP_PROFILE=public or ENTROLY_MCP_PROFILE=full.

Cross-agent review from a source checkout

The bundled entroly-agent-review skill guides a local Claude-to-Codex (or other agent) code review. With both agents pointed at the same repository and local Entroly state, ask the writer to claim the task, use work_state to get its workstream_id, and call work_handoff for the reviewer. The reviewer uses work_pending_handoffs, work_resume, and work_acknowledge_recovery before claiming further work, then independently inspects the diff and calls work_record_review. work_reviews reports whether the reviewed source is still current. Start with work_capabilities in each host to check the actual repository root; MCP registration by itself does not establish that the right checkout is selected.

For a source checkout without an MCP client, the agent continuity guide shows the equivalent entroly-work handoff, inbox, and review commands.

If the writer's model budget ends before it calls work_handoff, the reviewer can call work_resume(to_agent=...) to obtain a reconstructed no-handoff proof and current changed-file evidence. It must treat previous-agent intent as unknown, acknowledge the recovered state, and review the source independently. It cannot create or record a Claude-authored handoff after Claude is gone.

The handoff and review are local Work Graph records. They bind a reviewer statement to observed Git state and file digests; they do not attest the reviewer's model identity or prove the verdict correct. This flow currently requires shared local state. A customer-hosted multi-machine service, identity policy, and audit administration are separate enterprise work.

The MCP path is provider-neutral: the host can use OpenAI, Anthropic, Google, Mistral, DeepSeek, Kimi, GLM, or a local model. There is no separate plugin marketplace for each model provider; the host's MCP or extension contract is the integration boundary.

Agent / platform

Path

Status

Claude Code

Bundled UserPromptSubmit hook + scoped MCP

Deterministic after plugin enablement

Codex CLI / app

Bundled UserPromptSubmit hook + scoped MCP

Deterministic after hook trust

Gemini CLI

Bundled BeforeAgent hook + scoped MCP

Deterministic after extension enablement

OpenClaw

Context-engine plugin + scoped MCP

Native

Cursor

Claude-compatible project hook; MCP or proxy fallback

Deterministic only when third-party configs are enabled

Kiro IDE 1.x / CLI 3.x

Project PromptSubmit hook

Deterministic after project install

VS Code / Copilot agent mode

Agent-plugin hook where supported; MCP fallback

Host-version dependent

IntelliJ / JetBrains AI

MCP or supported custom endpoint

Advisory until a lifecycle hook is verified

GitHub Copilot CLI

MCP (subscription) / proxy (BYOK)

Supported

Cortex Code

SDK/library boundary only

Not validated as a wrap target

Aider, OpenCode, and 30+ more

Session-scoped OpenAI-compatible proxy

One command

Hook enforcement belongs to the host, so it is independent of whether that host runs an OpenAI, Anthropic, Gemini, Kimi, DeepSeek, Mistral, or GLM model. Status describes integration depth, not a savings guarantee. Provider-observed savings require requests to traverse an Entroly proxy route. Entroly does not claim interception of GitHub-hosted subscription inference on Copilot's native path. Full compatibility matrix: docs/agent-compatibility.md.

Entroly carries verified metadata for current models from OpenAI, Anthropic, Google, Meta, and others. It auto-discovers local Ollama models. Model-specific details: docs/DETAILS.md.


When to use it ยท when to skip it

Great fit: large repos where the agent only sees a few files at a time ยท chatty multi-turn agents ยท anywhere you want answers checked against evidence ยท cutting a real, growing AI bill.

Skip it: tiny repos or short prompts that already fit the budget ยท judgment-heavy tasks where you always want the full flagship model.


More commands

For evidence-led optimization rather than a synthetic savings estimate:

entroly learn --history --json
entroly shrink -- pytest -q
entroly trial --experiment checkout-fix --arm baseline -- codex exec "fix the checkout test"
entroly trial --experiment checkout-fix --arm optimized -- codex exec "fix the checkout test"
entroly trial --report checkout-fix
entroly browser https://example.com --query "billing settings"
entroly find docs/product-surface.md --query "exact source evidence" --json
entroly response set evidence --scope project

Trials run one explicitly selected arm at a time so a stateful or paid agent task is never repeated implicitly. With three or more matched runs per arm, entroly trial --report adds exact small-sample statistics and says plainly what the runs do and do not support (method and limits); alternate baseline and optimized runs rather than running each arm as a block. Response contracts shape agent instructions; they do not truncate responses or count as measured savings. Browser and command reductions keep exact local recovery handles and pass through when their safety gates cannot be met.

For teams that need to say who an agent is and what it was allowed to do:

entroly govern status                          # identity, policies, audit chain
entroly govern policy check write --risk high  # evaluate one authorization
entroly govern audit verify                    # exit non-zero on a broken chain

Authorization is deny-by-default and every denial names the policy and the reason it gave. audit verify checks that recorded entries were not altered after the fact โ€” it does not prove every action was recorded, and govern status reports the state of the local control plane only, not an attestation that each agent action passed through it. Identity tokens are unsigned unless ENTROLY_IDENTITY_KEY is set, and the credential is never printed.

Proof bundles: evidence someone else can check.

entroly export-proof --sign --format html --out audit.json   # Context Commits + session chain, Ed25519-signed
entroly verify-proof audit.json --public-key <KEY>           # offline; exits non-zero on any change

A reviewer recomputes every Context Commit from its own bytes, the session chain, one Merkle root over all evidence, and the signature, with no access to your stores. verify-proof says how far that goes: verified only when the bundle is signed by the key you supplied, otherwise signed_unpinned, integrity_only or invalid. A bundle shows which context was selected and that omitted context is recoverable; it does not vouch for the model's output, carries no trusted timestamp, and is technical evidence rather than a compliance certification. Details: proof bundles.

Also available: entroly memory, entroly wrap, entroly unwrap, entroly serve, entroly daemon, entroly dashboard, entroly demo, entroly capabilities, entroly ingest, entroly select, entroly receipt, entroly explain, entroly context-commit, entroly proof, entroly benchmark, entroly cache, entroly ravs, entroly perf, entroly batch, entroly usage. Full description: command reference.


Common questions

Cross-agent shared memory

Content-addressed store with SimHash deduplication and BM25 search. Multiple agents (Claude Code, Codex, Cursor) write and query the same knowledge base with provenance tracking.

from entroly import shared_memory_write, shared_memory_search
shared_memory_write("Auth uses JWT with RS256", agent_id="claude-code", tags=["auth"])
results = shared_memory_search("authentication tokens")  # finds it, from any agent

Output token reduction

Through the proxy, post-generation distillation trims filler from answers (on by default; ENTROLY_DISTILL=0 turns it off). Effort budgets are yours to apply: entroly.sdk.classify_effort() and steer_output(), and the steer_output MCP tool, return a verbosity directive and a max_tokens budget (150 for a "yes/no" question, 16,384 for a detailed architecture review). The proxy does not set max_tokens on your requests.

Shell output compression

Command-specific patterns for git, npm, cargo, docker, pytest, kubectl, and terraform strip progress bars, deprecation warnings, and boilerplate while preserving errors and key results. Run a command through it, and the full output stays recoverable through a content-addressed handle:

entroly shrink -- pytest -q

entroly hook install in earlier versions appended a block to your shell config that compressed nothing and, in bash, replaced any existing DEBUG trap. It now installs nothing; entroly hook uninstall removes a block an earlier version added, and entroly hook status shows where one remains.

Failure mining

entroly learn --deep mines PRISM feedback, vault beliefs, evolution daemon, and checkpoint data for recurring failure patterns, then generates corrections for agent config files.


Documentation

Available Tools

89 tools
advance_proof_guided_contextB

Verify one model round and return exact evidence or a final answer.

The operation is durable and idempotent. A continuation response has status=awaiting_model and a new request whose committed prefix is byte-identical. A terminal response returns a locally verified output. Echo the revision and request digest issued for the actual model call. Missing or invalid bindings are rejected. No provider call is performed by Entroly.

Inputs: session_id (required), model_output (required), idempotency_key (required), request_sha256, +1 more. Returns: result

analyze_codebase_healthA

Analyze the health of the ingested codebase.

Runs 5 analysis passes over all fragments in the current session:

  1. Clone Detection โ€” SimHash pairwise scan for Type-1/2/3 code clones

  2. Dead Symbol Analysis โ€” defined but never referenced symbols

  3. God File Detection โ€” files with > ฮผ+2ฯƒ reverse dependencies

  4. Architecture Violation Detection โ€” cross-layer imports

  5. Naming Convention Analysis โ€” Python/Rust/React convention breaks

Returns a JSON HealthReport with: - code_health_score [0โ€“100] and health_grade (A/B/C/D/F) - Per-dimension scores: duplication, dead_code, coupling, arch, naming - clone_pairs, dead_symbols, god_files, arch_violations, naming_issues - summary (human-readable) and top_recommendation (most impactful action)

Inputs: no named parameters. Returns: result

blast_radiusA

Analyze the blast radius of file changes on existing beliefs.

Given a list of changed files, determines which beliefs need re-verification, which may be invalidated, and the overall risk level (low/medium/high).

Args: changed_files: Comma-separated list of changed file paths

Inputs: changed_files (required). Returns: result

cache_align_promptB

PAC-KV prompt alignment and economic break-even gating.

Quantizes prompt boundary to provider KV cache page grid (Anthropic 1024, OpenAI 128, DeepSeek 64, vLLM 16, SGLang 32) and evaluates whether freezing warm prefix is cheaper than re-compression. Returns aligned text and PACReceipt.

Inputs: prefix (required), client_key (required), dynamic_tail (required), provider, +1 more. Returns: result

checkpoint_stateD

Save state plus explicit decisions needed for safe continuation.

Inputs: project, decisions, current_step, modified_files, +1 more. Returns: result

compile_beliefsA

Compile source code into belief artifacts (Truth โ†’ Belief pipeline).

Scans a directory for source files (.py, .rs, .ts, .js), extracts code entities (classes, functions, structs, traits, imports), resolves cross-file dependencies, and writes belief artifacts to the vault with full frontmatter (claim_id, entity, status, confidence, sources, last_checked, derived_from).

Args: directory: Path to scan. Defaults to the project root. max_files: Maximum files to process (default: 200)

Inputs: directory, max_files. Returns: result

compile_docsA

Compile markdown documentation files into belief artifacts.

Ingests project-level docs (README.md, ARCHITECTURE.md, docs/, CONTRIBUTING.md, etc.) into the vault as documentation beliefs with confidence 0.80 (human-authored > machine-inferred code beliefs).

Args: directory: Project root to scan. Defaults to the project root. max_files: Maximum doc files to process (default: 50)

Inputs: directory, max_files. Returns: result

compress_imageC

Compress an image for vision model input, with optional OCR text extraction.

Inputs: image_path (required), quality, extract_text, max_dimension. Returns: result

compress_shellB

Compress CLI output (git, npm, cargo, pytest, etc.) preserving errors and key info.

Inputs: text (required), command, max_lines. Returns: result

coverage_gapsA

Find source files with no corresponding belief in the vault.

Scans a directory for source files (.py, .rs, .ts, .js) and checks which ones have no belief artifact. Useful for identifying blind spots before running compile_beliefs.

Args: directory: Path to scan. Defaults to the project root.

Inputs: directory. Returns: result

create_context_receiptA

Create a Context Receipt from supplied documents.

documents_json may be:

  • a JSON object mapping source path to text

  • a JSON array of [source_path, text] pairs

  • a JSON array of objects with source_path/text or source/content keys

The receipt records selected context, omitted relevant context, dependency links, fingerprints, token ratio, warnings, and risk controls. It does not call an LLM.

Set recoverable=True to also persist a project-local recovery bundle, so any omitted chunk can later be recovered byte-exact and verified via recover_receipt_omission.

Inputs: query (required), documents_json (required), recoverable, chunk_tokens, +2 more. Returns: result

create_context_receipt_from_pathB

Create a Context Receipt from a local document file or directory.

Supports text-like documents currently handled by the local receipt ingester (.md, .txt, .rst). The result is deterministic and local.

Inputs: path (required), query (required), chunk_tokens, token_budget, +1 more. Returns: result

create_skillA

Create a new skill from a capability gap (Evolution layer).

When the system repeatedly fails on a topic, this generates a full skill package in vault/evolution/skills//:

  • SKILL.md โ€” procedure/SOP

  • tool.py โ€” executable Python tool

  • metrics.json โ€” fitness tracking

  • tests/test_cases.json โ€” regression tests

Args: entity_key: The entity this skill handles (e.g., 'protobuf_analysis') failing_queries: Pipe-separated list of failing queries intent: The intent class for this skill

Inputs: entity_key (required), failing_queries (required), intent. Returns: result

eicv_suppress_hallucinationsA

Verify an LLM response and optionally rewrite hallucinated claims.

Returns the (possibly rewritten) output and per-claim audit trail. Computation is fully local โ€” no neural model, no LLM calls.

Modes: audit โ€” analyze only; no rewrite. Use for telemetry/dashboards. annotate โ€” keep output; append verification warnings at end. strict โ€” graduated 4-action policy: supported โ†’ PASS (no change) abstain โ†’ HEDGE (append "[unverified]") hallucinated โ†’ SUPPRESS (remove claim sentence)

Profiles tune the abstain band: rag (default) โ€” strict, for retrieval-augmented generation qa โ€” moderate-strict for QA outputs summarization โ€” tolerant of paraphrase dialogue โ€” broader abstain band fact_check โ€” hardest (FEVER-like setting)

Returns SuppressionResult with:

  • rewritten_output: the (possibly modified) response

  • n_claims / n_supported / n_abstained / n_hallucinated

  • suppressed_count / warned_count

  • hallucination_rate: 0..1 (n_hallucinated / n_claims)

  • certificates: list of per-claim EICVCertificate

  • latency_ms

Accuracy on public datasets is documented in benchmarks/results/. False-positive and false-negative rates are non-zero โ€” a truthful claim can be wrongly suppressed, and a false claim can pass through. Audit-mode is the safe default for compliance- sensitive applications.

Args: context: The grounding evidence the LLM was supposed to use output: The LLM's response text to verify and possibly rewrite profile: Suppression profile (default "rag") mode: "audit" | "annotate" | "strict" (default "strict")

Inputs: output (required), context (required), mode, profile. Returns: result

eicv_verify_claimA

Verify a single claim against evidence using the EICV pipeline.

Returns a structured EICVCertificate with:

  • phi: epistemic support density [0=fully hallucinated, 1=fully grounded]

  • hallucination_score: 1 - phi

  • decision: "supported" | "abstain" | "hallucinated"

  • layer_scores: per-layer breakdown (T(G), NLI, RNR, gamma, H_sem)

  • n_claim_atoms / n_ev_atoms: structural decomposition counts

  • unsupported_fraction: fraction of claim atoms with no support

  • contradiction_fraction: fraction with active contradiction

  • elapsed_ms: per-call latency

Computed locally with no neural model and no LLM calls. Accuracy on public benchmarks (FEVER, SQuAD v2, HaluEval-QA) is documented in benchmarks/results/. False-positive and false-negative rates are non-zero โ€” review those JSONs before relying on the output for compliance-sensitive decisions.

Args: evidence: The grounding context (retrieved passages, source material) claim: The single claim to verify against evidence profile: "rag" | "qa" | "summarization" | "dialogue" | "fact_check" | "default". Selects the abstain decision band.

Inputs: claim (required), evidence (required), profile. Returns: result

entroly_dashboardA

Show the real, live value Entroly is providing to YOUR session right now.

Pulls from actual engine state โ€” not synthetic data. Shows: Money saved: exact $ amounts from token optimization Performance: sub-millisecond selection speed vs API latency Bloat prevention: context compression ratio and memory footprint Selection quality: per-fragment scoring and context sufficiency Safety: duplicates caught, stale fragments filtered

Call this anytime to see exactly what Entroly is doing for you.

Inputs: no named parameters. Returns: result

entroly_retrieveA

Retrieve exact source content omitted by compressed context.

Use the retrieval handle attached to a skeleton/reference fragment for exact historical recovery. A visible source path also works and lazily resolves the latest ingested version. With no argument, lists currently materialized CCR entries without returning their content.

Args: source_or_handle: Source path or content-addressed ccr:... handle.

Inputs: source_or_handle. Returns: result

epistemic_routeA

Route a query through the CogOps Epistemic Ingress Controller.

Inspects 4 signals (intent, belief coverage, freshness, risk) and selects one of 5 canonical flows:

โ‘  Fast Answer: Belief โ†’ Action (fresh, verified, low-risk) โ‘ก Verify Before Answer: Belief โ†’ Verification โ†’ Action (stale/risky) โ‘ข Compile On Demand: Truth โ†’ Belief โ†’ Verification โ†’ Action (no beliefs) โ‘ฃ Change-Driven: Event โ†’ Truth โ†’ Belief โ†’ ... (PR/commit/incident) โ‘ค Self-Improvement: Misses โ†’ Evolution โ†’ Belief (repeated failures)

Call this BEFORE optimize_context to understand how the system should approach your query. Existing tools work exactly as before.

Args: query: The user query or event description is_event: True if this is a change-driven event (PR, commit, etc.) event_type: Type of event (pr, commit, release, incident, scheduled)

Inputs: query (required), is_event, event_type. Returns: result

execute_flowA

Execute a full canonical epistemic flow end-to-end.

Routes the query through the Epistemic Ingress Controller (4 signals: intent, belief coverage, freshness, risk), then chains the appropriate pipeline steps automatically:

โ‘  Fast Answer: Belief โ†’ Action โ‘ก Verify Before Answer: Belief โ†’ Verification โ†’ Action โ‘ข Compile On Demand: Truth โ†’ Belief โ†’ Verification โ†’ Action โ‘ฃ Change-Driven: Event โ†’ Truth โ†’ Belief โ†’ Verification โ†’ Action โ‘ค Self-Improvement: Misses โ†’ Verification โ†’ Evolution โ†’ Belief

Args: query: The user query or event description diff_text: Raw diff for change-driven flows (Flow โ‘ฃ) is_event: True if this is a change-driven event event_type: Type of event (pr, commit, release, incident, scheduled)

Inputs: query (required), is_event, diff_text, event_type. Returns: result

explain_contextA

Explain why each fragment was included or excluded in the last optimization.

Shows per-fragment scoring breakdowns with all dimensions visible: recency, frequency, semantic, entropy, feedback multiplier, dependency boost, criticality, and composite score.

Also shows context sufficiency (what % of referenced symbols have definitions included) and any exploration swaps.

Call this after optimize_context to understand selection decisions.

Inputs: no named parameters. Returns: result

explain_receipt_omissionC

Explain why a chunk was omitted from a Context Receipt.

Inputs: chunk_id (required), receipt_json (required). Returns: result

export_training_dataA

Export vault beliefs as JSONL training data for LLM finetuning.

Generates instruction-following pairs from compiled beliefs: question about entity โ†’ belief body as answer. Filters out stale and low-confidence beliefs. Output is OpenAI-compatible JSONL.

Uses PRISM scoring dimensions for quality-weighted sampling: only beliefs with confidence >= 0.5 and non-stale status are included in the training set.

Args: output_path: Path to write JSONL file (default: training_data.jsonl) format: Output format, currently only 'jsonl' supported

Inputs: format, output_path. Returns: result

get_statsB

Get comprehensive session statistics.

Shows token savings, duplicate detection counts, entropy distribution, dependency graph stats, checkpoint status, and cost estimates.

Inputs: no named parameters. Returns: result

ingest_diagramA

Ingest an architecture or flow diagram into the context memory.

Converts Mermaid, PlantUML, DOT/Graphviz, or informal diagram text into a structured semantic fragment capturing nodes, edges, and relationships. The result is stored as a normal context fragment and is retrievable by optimize_context and recall_relevant.

Args: diagram_text: Raw diagram source (Mermaid/PlantUML/DOT/text description). source: Identifier (e.g., 'arch_overview.mmd', 'db_schema.puml'). diagram_type: 'mermaid', 'plantuml', 'dot', 'text', or 'auto' (default).

Returns JSON with ingestion result (same as remember_fragment).

Inputs: source (required), diagram_text (required), diagram_type. Returns: result

ingest_diffA

Ingest a code diff/patch into the context memory.

Converts a unified diff (git diff output) into a structured change summary: intent classification (bug-fix/feature/refactor), symbols changed, files modified, and line delta. Particularly useful for understanding recent changes and their architectural impact.

Args: diff_text: Raw unified diff text (git diff output). source: Identifier (e.g., 'pr_42_auth_refactor.diff'). commit_message: Optional commit message for better intent classification.

Returns JSON with ingestion result plus: - intent: bug-fix/feature/refactor/test/security/performance - files_changed, added_lines, removed_lines - symbols_changed: functions/classes modified

Inputs: source (required), diff_text (required), commit_message. Returns: result

ingest_voiceA

Ingest a voice/meeting transcript into the context memory.

Converts pre-transcribed text (from Whisper, AssemblyAI, etc.) into a structured fragment capturing decisions, action items, open questions, technical vocabulary, and key discussion excerpts.

Args: transcript: The full transcript text. source: Identifier (e.g., 'design_meeting_2026-03-07.txt').

Returns JSON with ingestion result plus: - decisions, actions, open_questions (counts) - tech_terms_identified

Inputs: source (required), transcript (required). Returns: result

inspect_proof_guided_contextA

Inspect the last durable proof-guided response without advancing it.

Inputs: session_id (required). Returns: result

learn_from_failuresC

Mine failure patterns from PRISM, vault, and evolution data. Optionally apply corrections.

Inputs: deep, auto_apply, min_occurrences. Returns: result

locate_evidenceA

Locate exact spans inside text without generating an answer.

text is the corpus. This tool does not read the workspace and has no index behind it: pass it content you already hold, typically from read_source_file. A natural-language query ranks spans within that text; it does not search for the text.

That boundary is worth stating twice because the obvious reading is the wrong one. Nothing here falls back to repository search, so calling it without text is an error rather than a whole-repository query, and a caller expecting otherwise receives nothing and cannot tell whether the evidence was absent or merely never searched for.

The ranker can select only passage and sentence identifiers created from text. Entroly derives returned text, offsets, and hashes from the original source, so a span is checkable against what was supplied. Invalid ranker output abstains rather than guessing.

Inputs: text (required), query (required), min_score, source_id, +3 more. Returns: result

manage_skillsA

Manage the CogOps skill lifecycle (Evolution layer).

Actions:

  • list: Show effective status after promotion-evidence validation

  • benchmark: Run development cases (not sufficient for promotion)

  • validate: Run caller-held-out cases supplied in validation_cases_json

  • promote: Apply the latest caller-held-out evidence decision

Args: action: list | benchmark | validate | promote skill_id: Required for benchmark/validate/promote actions validation_cases_json: JSON array of independent cases for validate

Inputs: action, skill_id, validation_cases_json. Returns: result

memory_graph_queryC

Traverse the deterministic entity-relationship memory graph.

Implements associative recall (HippoRAG 2). Returns reachable memory IDs, entity paths, and Merkle traversal receipts.

Inputs: seeds (required), max_hops, include_superseded. Returns: result

memory_recallB

Recall agent memories with temporal reasoning, hybrid ranking, and graph traversal.

Filters superseded historical facts and boosts current state. Optional temporal_filter: 'current_state', 'past_event', 'future_plan', 'preference', 'relationship'.

Inputs: query (required), top_k, use_hybrid, traverse_graph, +1 more. Returns: result

optimize_contextA

Select a high-value context subset for a token budget.

Uses 0/1 Knapsack dynamic programming to maximize relevance within the budget. Scores fragments on four dimensions: recency (Ebbinghaus decay), access frequency (spaced repetition), semantic similarity (SimHash), and information density (Shannon entropy).

QUERY REFINEMENT: Vague queries like "fix the bug" or "add feature" are automatically expanded into precise master prompts using the files already in memory. This improves context selection accuracy and reduces hallucination from selecting wrong files. The response includes query_refinement.refined_query so you can see what drove selection.

Output is ordered for optimal LLM attention: pinned/critical first, high-dependency foundation files early, then by relevance.

This is the core tool โ€” call it before sending context to the LLM.

Args: token_budget: Maximum tokens allowed (default: 128K) query: Current query/task for semantic relevance scoring (can be vague)

Inputs: query, token_budget. Returns: result

prepare_proof_guided_contextA

Prepare a durable proof-guided model request from local documents.

This tool performs only local selection, security checks, exact-recovery commitments, and signed auditing. It does not call a model. Send the returned request through the host's configured model route, then pass the model text and this response's revision/request_sha256 to advance_proof_guided_context. Retain that binding beside the model call; do not substitute a newer binding. The path must remain inside the attached project root.

Inputs: path (required), query (required), max_rounds, token_budget, +3 more. Returns: result

prepare_task_dreamA

Prepare an expiring, receipt-backed task skill before agent work.

The capsule combines safe cross-session MemoryOS recall, optional hippocampal long-term memory, current repository fragments, non-stale beliefs, and already-promoted skills. Recalled text is evidence rather than authority and is prompt-injection scanned. Root AGENTS.md and CLAUDE.md files are never modified.

Args: task: The concrete task the agent is about to perform. agent_id: MemoryOS identity used for scoped recall. token_budget: Approximate maximum capsule tokens (256-8000). persist: Write SKILL.md and receipt.json under .entroly/task_dreams.

Inputs: task (required), persist, agent_id, token_budget. Returns: result

process_changeA

Process a code change through the Change-Driven pipeline (Flow โ‘ฃ).

Full pipeline: Diff โ†’ ChangeSet โ†’ Review โ†’ Blast Radius โ†’ Vault

Classifies intent (bugfix/feature/refactor/test/security/performance), runs code review (hardcoded secrets, TODOs, broad exceptions, unsafe), computes belief impact, and returns a structured PR brief.

Args: diff_text: Raw unified diff text (git diff output) commit_message: Optional commit message for intent classification pr_title: Optional PR title

Inputs: diff_text (required), pr_title, commit_message. Returns: result

recall_relevantA

Semantic recall of the most relevant stored fragments.

Uses BM25 relevance ranking (recall_auto) with a feedback loop (fragments that previously led to successful outputs are boosted).

Returns a slim ranked pointer list by default โ€” source, score, and a locating snippet โ€” because full fragment bodies overflow the tool result cap (a top_k=8 recall is ~90KB). Pass full=True only when you need the complete text of every hit.

Args: query: The search query top_k: Number of results to return full: Return complete fragment bodies instead of the slim view

Inputs: query (required), full, top_k. Returns: result

record_ci_resultA

Record an externally produced CI pass/fail result for an optimization request.

Use this only after CI actually ran. It appends a strong RAVS outcome event and may promote the request-bound result into verified task memory. It does not run CI, fetch url, inspect the repository, or prove that the supplied pipeline name or URL is genuine. Repeated calls append repeated events; callers should submit one result per request.

Use record_test_result for a test-suite result and record_command_exit for one subprocess exit code. The returned JSON reports recorded, skipped (event log unavailable), or error.

Args: request_id: Exact trace ID from the relevant optimize_context call. passed: Whether every required CI check passed. pipeline: Optional CI provider or pipeline identifier. url: Optional provenance link; it is stored but never fetched.

Inputs: passed (required), request_id (required), url, pipeline. Returns: result

record_command_exitA

Record the exit code of a command that was generated and executed.

STRONG signal: a real subprocess produced a real exit code. Convention: exit_code == 0 โ†’ "success", anything else โ†’ "failure".

Args: request_id: the "request_id" field from the optimize_context response exit_code: subprocess exit code; 0 = success command: optional short representation of what was run

Inputs: exit_code (required), request_id (required), command. Returns: result

record_edit_outcomeB

Record whether the user accepted, reverted, or retried an AI edit.

STRONG signal: user behavior directly indicates whether the generated code was successful.

Args: request_id: the "request_id" field from the optimize_context response outcome: "accepted", "reverted", or "retried" files_modified: number of files touched by the edit

Inputs: outcome (required), request_id (required), files_modified. Returns: result

record_outcomeA

Record whether selected fragments led to a successful output.

This feeds the reinforcement learning loop: fragments that contribute to successful outputs get boosted in future selections, while unhelpful fragments get suppressed.

Args: fragment_ids: Comma-separated fragment IDs success: True if output was good, False if bad

NOTE on RAVS v1: this tool's success flag is also recorded into the RAVS event log as an agent_self_report event with strength=weak and include_in_default_training=False. Default labeling rules ignore it. Use the structured record_test_result / record_command_exit / record_ci_result tools for honest signals you want offline evaluation to actually train against.

Inputs: fragment_ids (required), success. Returns: result

record_test_resultA

Record that tests RAN and either passed or failed for a request.

This is a STRONG signal โ€” distinct from record_outcome which is the agent's self-report. Call this when actual test execution produced a real pass/fail outcome.

Args: request_id: the "request_id" field from the optimize_context response passed: True if all tests passed, False if any failed suite: optional name of the test suite (e.g. "pytest", "cargo test") details: optional short summary of what was tested

Inputs: passed (required), request_id (required), suite, details. Returns: result

recover_receipt_omissionA

Recover the full text of context a Context Receipt omitted.

Receipts explain what was dropped; this hands back the exact content, byte-for-byte. Works on receipts created with recoverable=True โ€” the recovery bundle is read from the local store. Pass chunk_id to recover one chunk, or leave it empty to recover everything that was omitted.

Each result carries verified=true only when the returned text is provably identical to what was omitted (matched against the chunk's recorded fingerprint and a storage-integrity hash) โ€” never a guess.

Inputs: receipt_json (required), chunk_id. Returns: result

recover_shellB

Recover full CLI output from a compression handle.

Inputs: handle (required). Returns: result

refresh_beliefsA

Mark beliefs as stale after file changes (Flow โ‘ฃ doc-refresh).

Given changed files, finds related beliefs and marks their status as 'stale' so the next verify_beliefs pass will flag them for re-compilation.

Args: changed_files: Comma-separated list of changed file paths

Inputs: changed_files (required). Returns: result

remember_fragmentA

Store a context fragment with automatic dedup and entropy scoring.

Fragments are fingerprinted via SimHash for O(1) duplicate detection. Each fragment's information density is scored using Shannon entropy. Duplicates are automatically merged with salience boosting.

Args: content: The text content to store (code, tool output, etc.) source: Origin label (e.g., 'file:utils.py', 'tool:grep') token_count: Token count (auto-estimated if 0) is_pinned: If True, prioritize exact inclusion within the pinned budget reserve; excess pinned content remains a high-priority compressed candidate so the total token ceiling stays honest.

Inputs: content (required), source, is_pinned, token_count. Returns: result

render_context_receiptA

Render a Context Receipt JSON artifact as a Markdown audit report.

Use this after create_context_receipt when a human-readable report is needed. The conversion is local and read-only: it does not call a model, reread source files, recover omitted content, or modify the receipt store. For one omitted chunk use explain_receipt_omission; for exact original content use recover_receipt_omission. The result is Markdown on success and a bounded error string when the JSON is malformed or the receipt shape is unsupported.

Args: receipt_json: The complete JSON receipt artifact, not a receipt ID, excerpt, or already-rendered Markdown.

Inputs: receipt_json (required). Returns: result

repo_file_mapA

Return the canonical Entroly file map across the Python, Rust core, and WASM repos.

Use this to understand ownership boundaries and where logic currently lives. Supported formats: markdown, json.

Inputs: format. Returns: result

resume_stateA

Restore a local checkpoint into the current engine and return continuity metadata.

Use this after a restart or context loss when prior task state should be restored. Supplying query selects a relevant checkpoint; leaving it empty loads the latest checkpoint. project narrows relevance matching. The tool changes in-memory Entroly state and reads the local checkpoint store, but does not edit source files or call a model. It returns resumed, no_checkpoint_found, or no_relevant_checkpoint_found with bounded metadata and recovery context.

Use checkpoint_state to create a checkpoint and recall_relevant when you only need read-only fragment search without restoring state.

Args: query: Optional task description or terms for relevance matching. project: Optional project scope for relevance matching.

Inputs: query, project. Returns: result

scan_for_vulnerabilitiesA

Scan code content for security vulnerabilities (SAST analysis).

Uses a 151-rule engine with taint-flow simulation and CVSS-inspired scoring. Detects hardcoded secrets, SQL injection, path traversal, command injection, insecure cryptography, unsafe deserialization, XSS, and authentication misconfigurations.

Args: content: The source code to scan. source: File path / identifier (used for language detection and confidence scoring). E.g. "auth/login.py".

Returns JSON with: - findings: [{rule_id, cwe, severity, line_number, description, fix, confidence, taint_flow}] - risk_score: CVSS-inspired aggregate [0.0, 10.0] - critical_count, high_count, medium_count, low_count - top_fix: most impactful remediation action

Inputs: content (required), source. Returns: result

security_reportA

Generate a session-wide security audit across all ingested fragments.

Scans every fragment in the current session and returns an aggregated report showing: which fragments are most vulnerable, overall risk posture, finding distribution by category, and the single most important fix.

Returns JSON with: - fragments_scanned, fragments_with_findings - critical_total, high_total, max_risk_score - most_vulnerable_fragment (fragment_id) - findings_by_category: {category: count} - vulnerable_fragments: sorted list by risk_score

Inputs: no named parameters. Returns: result

security_scanA

Scan content for prompt injection attacks and security threats.

Detects:

  • Direct instruction overrides ("ignore previous instructions")

  • Role reassignment attempts ("you are now a...")

  • Unicode steganography (zero-width chars, directional overrides)

  • Base64-encoded instruction payloads

  • Repetition flooding (context window domination)

  • XML/tag-based role spoofing

Use this to verify untrusted content before including it in prompts.

Args: content: The text content to scan source: Source identifier for threat location reporting

Inputs: content (required), source. Returns: result

shared_memory_forgetC

Remove a shared memory entry by ID.

Inputs: entry_id (required). Returns: result

shared_memory_listC

List shared memory entries, optionally filtered by agent or tag.

Inputs: tag, limit, agent_id. Returns: result

shared_memory_statsB

Get cross-agent shared memory statistics.

Inputs: no named parameters. Returns: result

shared_memory_writeB

Write to cross-agent shared memory. Deduplicates near-identical entries via SimHash.

Inputs: content (required), tags, agent_id, session_id. Returns: result

smart_readA

Read a file at an automatic or caller-chosen resolution.

By default SRP selects the optimal resolution per code block from query relevance and token budget:

  • Blocks matching the query โ†’ FULL (complete source)

  • Related blocks โ†’ MEDIUM (signature + docstring)

  • Peripheral blocks โ†’ LOW (name only)

  • Irrelevant blocks โ†’ SKIP (omitted)

This reduces output by prioritizing query-relevant blocks. Use resolution="full" whenever exact source text is required.

Automatic selection is the right default and cannot be right for every question. Measured on this repository, a signature-level view answered 12/12 questions whose evidence lives in a signature and 0/20 whose evidence lives in a function body. Pass resolution when you already know which kind of question you are asking.

Args: file_path: Path to the file to read query: What you're looking for (improves relevance scoring) budget: Target token budget for the output (default: 1000) resolution: Choose "full", "medium", "diff", "structure", or "low"; empty means automatic. "full" returns the complete original text. "diff" requires previous_source and returns a whole-file unified diff. "structure" returns declarations, signatures, and imports while eliding implementation bodies when a useful native outline is available; otherwise it returns full source and reports structure_backend="full-fallback". Pinned output is not demoted to fit the budget; the response reports over_budget instead. previous_source: Required baseline when resolution is "diff". line_start: First line of an exact inclusive range (1-indexed). Must be supplied together with line_end and cannot be combined with resolution. line_end: Last line of an exact inclusive range (1-indexed). fresh: Bypass same-session re-read suppression and return the rendered output in full. read_scope: Optional caller scope for isolating parallel agents that intentionally share one MCP connection.

An exact repeated delivery returns only an opaque ~NNN handle. That handle means the rendered output is byte-identical to content already delivered in this MCP session. Pass fresh=true to expand it. Caller-selected FULL and line ranges return raw text on cache miss; they are not wrapped in JSON, so their text remains exact.

Inputs: file_path (required), fresh, query, budget, +5 more. Returns: result

start_workspace_listenerA

Start one daemon-scoped background listener for workspace changes.

Use this when periodic change detection is required across the current MCP process. It is a long-running bridge into CogOps/Belief CI, not a one-shot sync; use sync_workspace_changes for a single pass. Each poll reads supported files within the selected root and may write local beliefs, verification results, a sync report, and listener state. It never edits source files or calls a model. Starting an already-running listener is safe and returns already_running. Because the listener is daemon-scoped, stop it by shutting down the MCP process; a later process starts with no running background thread.

Args: directory: Optional root-confined workspace directory. interval_s: Poll interval in seconds. force_initial: Whether to run a full initial scan. max_files: Positive changed-file limit per poll.

Inputs: directory, max_files, interval_s, force_initial. Returns: result

steer_outputC

Classify query effort and return output steering directives + max_tokens budget.

Inputs: query (required), effort. Returns: result

sync_workspace_changesA

Reconcile workspace changes into Entroly's local belief and verification layers.

Use this for one explicit synchronization pass after edits. It detects new, modified, and deleted supported source files, marks affected beliefs stale, recompiles changed files, runs verification, and writes a bounded sync report plus listener state under the local Entroly vault. It never writes source files. force requests a full rescan and max_files limits changed files processed in this pass; unprocessed changes remain pending for a later pass. Invalid or outside-root directories return a structured error.

Use start_workspace_listener for periodic background polling, refresh_beliefs when only invalidation is needed, and verify_beliefs when files are already compiled and only verification is required. The JSON result includes status, counts, verification summary, action path, and per-file errors.

Args: directory: Optional root-confined workspace directory. force: Whether to ignore the saved snapshot and rescan. max_files: Positive per-pass changed-file limit (1-10000).

Inputs: force, directory, max_files. Returns: result

vault_hygiene_scanA

Scan vault beliefs against each other for knowledge decay.

Report-only living-context maintenance: pairwise ESG contradiction detection between beliefs, near-duplicate merge suggestions, staleness flags, and confidence flapping (entities whose recorded confidence keeps reversing across ledger versions). Never rewrites or deletes a belief โ€” act on the suggestions explicitly.

Args: contradiction_threshold: min ESG contradiction_fraction to flag a belief pair (default 0.5) max_age_days: beliefs unchecked for longer are flagged stale (default 30)

Inputs: max_age_days, contradiction_threshold. Returns: result

vault_queryA

Query the CogOps Knowledge Vault for existing beliefs.

Use this to check what the system already knows before compiling new understanding. Supports lookup by entity name or listing all.

Args: entity: Entity name to look up (fuzzy match) list_all: If True, return all beliefs with frontmatter summary

Inputs: entity, list_all. Returns: result

vault_statusA

Show the current state of the CogOps Knowledge Vault.

Initializes the vault directory structure if needed, then returns a coverage index: total beliefs, verification status, confidence distribution, and routing statistics.

The vault is the persistent Living Exocortex โ€” the system's machine-auditable understanding of your codebase.

Inputs: no named parameters. Returns: result

vault_time_travelA

Query the vault's bitemporal belief ledger โ€” memory time travel.

Every belief write is versioned in an append-only, hash-chained ledger. This tool answers questions like "what did the vault know last Tuesday?" and "what changed between two dates?".

Args: action: One of: as_of โ€” snapshot of beliefs visible at when diff โ€” what changed between from_when and to_when timeline โ€” version history for entity verify_chain โ€” tamper-check the ledger hash chain seed โ€” backfill the ledger from pre-ledger belief files redact โ€” erase belief bodies (by entity or claim_id) via a chained tombstone; content is deleted, the hash chain stays verifiable when: ISO-8601 instant for as_of (e.g., '2026-07-14T00:00:00+00:00') from_when: ISO-8601 start instant for diff to_when: ISO-8601 end instant for diff entity: Entity name for timeline time_axis: 'transaction' = what the vault knew at that instant (default); 'valid' = what had been verified as of that instant

Inputs: action (required), when, entity, reason, +4 more. Returns: result

vault_write_actionB

Write a task output or report to the CogOps Knowledge Vault.

Action artifacts are developer-facing outputs: PR briefs, answers, architecture diagrams, slide decks, task reports. They live in actions/ and are timestamped for traceability.

Args: title: Title of the output content: Full markdown content action_type: Type tag (report, pr_brief, answer, diagram, context_pack)

Inputs: title (required), content (required), action_type. Returns: result

vault_write_beliefA

Write a belief artifact to the CogOps Knowledge Vault.

Beliefs are durable system understanding โ€” what Entroly thinks the codebase is. Each belief carries machine-auditable frontmatter: claim_id, entity, status, confidence, sources, last_checked.

Args: entity: The system entity this belief is about (e.g., 'auth::token_rotation') title: Human-readable title body: The belief content (markdown) confidence: Machine-assigned confidence 0.0-1.0 (default: 0.7) status: observed|inferred|verified|stale|hypothesis (default: inferred) sources: Comma-separated source paths (e.g., 'src/auth.rs:142,src/token.rs:58') derived_from: Comma-separated component names that produced this belief

Inputs: body (required), title (required), entity (required), status, +3 more. Returns: result

verify_and_repairA

Verify LLM-generated code and suggest repairs for hallucinations.

Combines BIPT verification with rejection analysis to identify hallucinated identifiers and suggest which real APIs/symbols from the context should be used instead.

This is a single-shot verification + feedback tool โ€” it does NOT call an LLM. For the full repair loop (FORGE), use the Python SDK: from entroly.verifiers import forge_loop

Args: prompt: The original user request that generated the code code: The LLM-generated code to verify context: The repository context provided to the LLM

Inputs: code (required), prompt (required), context. Returns: result

verify_beliefsB

Run a full verification pass on all beliefs in the vault.

Checks for:

  • Staleness (beliefs past their freshness window)

  • Contradictions (conflicting claims about the same entity)

  • Confidence divergence between same-entity beliefs

  • Low confidence scores

Writes verification artifacts to vault/verification/.

Inputs: no named parameters. Returns: result

verify_provenanceA

Verify that LLM-generated code is grounded in the provided context.

Uses BIPT (Byte-level Information Provenance Tracer) to measure how much of each identifier in the generated code originates from the context. Returns an Identifier Provenance Deficit (IPD) score:

IPD = 0.0 โ†’ fully grounded (all identifiers come from context) IPD = 1.0 โ†’ fully invented (no identifiers match context)

Use this after an LLM generates code to check for hallucinated APIs, invented function names, or fabricated imports before accepting output.

Args: code: The LLM-generated code to verify context: The repository context that was provided to the LLM

Inputs: code (required), context. Returns: result

verify_responseA

Verify an AI-generated response for hallucination using the 4-signal fusion cascade.

Runs the same hallucination detection pipeline as the proxy (WITNESS + ECE + EPR + Spectral) but callable directly from any MCP client. Use this after generating a response to check for factual claims that aren't grounded in the provided context.

Returns a structured verification report with:

  • fused_risk: Combined hallucination probability [0.0 = safe, 1.0 = hallucinated]

  • verdict: "pass", "warn", or "flag"

  • per-signal scores (entity_coverage_gap, ece_curvature, epr_rate, spectral_consistency)

  • flagged_claims: List of specific claims that may be hallucinated

  • recommendation: Suggested action (accept / review / reject)

All computation is 100% local โ€” zero LLM calls, zero API calls.

Args: response: The AI-generated text to verify context: The source context that was provided to the AI prompt: The original user prompt/query (helps calibrate verification)

Inputs: response (required), prompt, context. Returns: result

work_acknowledge_recoveryC

Accept responsibility for recovered work state so acting is allowed.

Inputs: token (required), project. Returns: result

work_capabilitiesC

Confirm the active repository and available local review operations.

Inputs: project. Returns: result

work_claimC

Record explicit agent work plus a bounded advisory scope lease.

Inputs: agent_id (required), task_title (required), project, task_id, +4 more. Returns: result

work_compile_contextC

Compile verified code context and record its Work Graph receipt.

Inputs: query (required), project, agent_id, max_hops, +4 more. Returns: result

work_context_faultC

Fault exact omitted code from a context token or verified context object.

Inputs: context (required), context_ref (required), recovery_handle (required), project, +4 more. Returns: result

work_handoffC

Create a graph-bound handoff receipt and complete continuation proof.

Inputs: to_agent (required), from_agent (required), workstream_id (required), project. Returns: result

work_modificationsB

Modifications recorded between observations by the workspace watcher.

A point-in-time refresh shows what a file looks like now. This shows that it changed at 14:02 and again at 14:07, which a refresh cannot. Empty when the watcher is disabled.

Inputs: drain, project. Returns: result

work_pending_handoffsC

Find compact local handoffs addressed to this agent.

Inputs: to_agent (required), project. Returns: result

work_record_contextC

Attach a canonical ContextReceipt to its exact WorkScope.

Inputs: receipt (required), project, agent_id, session_id. Returns: result

work_record_executionC

Atomically record route, observable execution and exact-head verification.

Inputs: route (required), outcome (required), verification (required), project, +1 more. Returns: result

work_record_memoryC

Attach provenance-bearing memory without trusting raw model prose.

Inputs: memory (required), now_ms, project, superseded_ids. Returns: result

work_record_reviewC

Record an agent review bound to the handoff and exact source state.

Inputs: handoff (required), summary (required), verdict (required), findings (required), +3 more. Returns: result

work_resumeC

Recover unfinished work and optionally seal a no-handoff proof.

Inputs: project, to_agent, max_evidence, workstream_id. Returns: result

work_reviewsC

Read review findings with a current or stale source marker.

Inputs: project, workstream_id. Returns: result

work_session_statusC

Report the automatic takeover performed when this server started.

Inputs: project. Returns: result

work_stateA

Inspect persisted shared work state without appending a polling event.

Inputs: now_ms, project. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    C2.7/5.0

    Scored across 89 tools

    Disambiguation2/5

    The set contains multiple clusters of overlapping tools: shared_memory_search/list/forget, memory_recall, recall_relevant, memory_graph_query, vault_search, and entroly_retrieve all involve memory retrieval; verify_provenance, verify_and_repair, verify_response, eicv_verify_claim, and eicv_suppress_hallucinations all verify generated content; record_outcome/test/command/CI/edit tools all record feedback. Descriptions distinguish them somewhat, but the volume and overlap make misselection likely.

    Naming Consistency3/5

    Most names are snake_case, but the conventions are mixed: verb_noun (get_stats, create_skill), noun_verb (memory_recall, vault_query), prefixed namespaces (work_*, vault_*, shared_memory_*), and irregular names like smart_read and entroly_dashboard. The pattern is readable but not predictable across the full set.

    Tool Count1/5

    Eighty-nine tools is far beyond the appropriate range for a single MCP server and creates an overwhelming surface. The server spans many domainsโ€”context compression, memory, vault beliefs, verification, security, work sessions, skills, and operationsโ€”each with multiple overlapping operations.

    Completeness3/5

    The surface is broad and covers many workflows across context optimization, memory, belief vault, verification, and work state, so it is not severely incomplete. However, there are notable gaps and inconsistencies, such as limited update/delete lifecycle for primary context fragments and a sprawling, non-uniform set of operations rather than complete CRUD per domain.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers