coherra
Coherra is an MCP server that stores structured facts in Sibyl Memory and audits, reports on, and repairs the drift (contradictions, duplicates, stale entries) that accumulates there.
Store & read memory —
coherra_rememberwrites a versioned entity (category, name, value, optional confidence/source);coherra_recallfetches one entity's full body (value, confidence, source, timestamps, version);coherra_listbrowses entities, newest-first, optionally filtered by category (limit ≤ 200).Audit memory health —
coherra_auditscans every entity for three drift classes (contradiction = same fact, different values; duplicate = near-identical values in a category; stale = updated_at past a per-category threshold), returning a 0–100 health score, entity/issue counts, and a detailed issue list with 10-char hex IDs. It also seedscoherra:config, writescoherra:last_auditstate, and appends acoherra_scanjournal event.Repair issues —
coherra_repairapplies one fix by issue ID: archive/refresh for stale, merge for duplicates, and keep_a / keep_b / merge_manual (with a supplied canonical value) for contradictions.Batch-safe repair —
coherra_repair_safeauto-archives stale entries and merges duplicates in one call while never touching contradictions, reporting fixed count and skipped contradictions.Import from other tools —
coherra_onboardtakes an arbitrary JSON export (flat/nested dicts, lists of dicts or strings), categorizes and writes each record, then runs audit → auto-clean → flag-contradictions, returning counts of imported, auto-cleaned, and review-flagged records.Leave a permanent trail — all writes and every audit/repair action are logged inside Sibyl Memory itself (WARM entities, HOT state, COLD journal), so no external database or service is required and the audit trail lives in the memory it manages.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@coherra audit my memory and fix any issues"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Coherra
An AI agent's memory gets messy. Coherra keeps it clean.
After months of use, any long-running agent accumulates contradictions (the same fact stored twice with different values), duplicates (the same value under different key names), and stale entries (facts that were true six months ago but almost certainly aren't now). Coherra audits the entire memory on demand, scores its health, surfaces every issue with a clear explanation, and repairs them — logging every single action permanently inside Sibyl Memory itself. No external database. No separate service. Everything lives inside Sibyl.
Live Production Deployment
Production Domain (Web App & Chat): https://coherra.xyz (or https://coherra.app)
Production API & x402 Server: https://api.coherra.xyz (or https://api.coherra.app)
Base Mainnet Smart Contract (USDC):
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913(Chain ID:8453)Official Payout Address:
0x1BFAe4EE12c8f2bF17B8EEb8Ea0BcB32AdbB240BTrack 1: In-browser hosted multi-model chat with Gemini, OpenAI, Grok, and Claude.
Track 2: Local MCP/CLI memory audit and drift resolution.
Related MCP server: memory-immune-system
Architecture
┌─────────────────────────────────────────────────────────┐
│ Agent / IDE │
│ (Claude Code, Codex CLI, Cursor, …) │
└───────────────────────┬─────────────────────────────────┘
│ MCP (stdio)
┌─────────────▼──────────────┐
│ Coherra MCP Server │
│ coherra_remember │ ← structured writes
│ coherra_recall │ ← single entity read
│ coherra_list │ ← browse memory
│ coherra_audit │ ← run full scan
│ coherra_repair │ ← fix one issue
│ coherra_repair_safe │ ← batch safe fixes
└─────────────┬──────────────┘
│ sibyl-memory-client SDK
┌─────────────▼──────────────┐
│ Sibyl Memory │
│ WARM tier — entities │ ← facts, preferences, people
│ HOT tier — state │ ← coherra:last_audit, coherra:config
│ COLD tier — journal │ ← coherra_scan, coherra_repair events
└─────────────────────────────┘
~/.sibyl-memory/memory.dbCoherra sits between the agent and Sibyl Memory. It adds a schema layer (versioned, confidence-tagged bodies), an audit engine (three detectors: contradiction, duplicate, staleness), and a repair engine that logs every action to Sibyl's own append-only journal — so the audit trail is itself part of the memory being managed.
Quickstart
# 1. Clone and install
git clone <repo>
cd coherra
pip install -e .
# 2. Make sure Sibyl Memory is initialised
# (run once if you haven't already)
sibyl init
# 3. Load the demo dataset
python -m coherra.seed --demo
# 4. Run your first audit
coherra scan
# 5. Browse the issues
coherra issues
# 6. Fix safe issues automatically
coherra fix --all
# 7. Resolve contradictions interactively
coherra fix <issue-id>
# 8. Confirm clean memory
coherra scanCLI reference
Command | What it does |
| Run a full audit — contradiction, duplicate, staleness checks |
| One-line summary of the last scan result |
| List every flagged issue, grouped by severity |
| Fix one issue; contradictions get an interactive prompt |
| Auto-apply all safe repairs (duplicates + stale) |
MCP server
Add to your .mcp.json or Claude Code settings:
{
"mcpServers": {
"coherra": { "command": "coherra-mcp" }
}
}Tools exposed: coherra_remember, coherra_recall, coherra_list,
coherra_audit, coherra_repair, coherra_repair_safe.
The pitch
Most memory systems only answer the question "what do I know?" Coherra answers "what do I know that's wrong?" — and fixes it, permanently, with a complete audit trail stored inside the same memory it's cleaning.
Built for the Sibyl Labs Memory Hackathon · August 2026.
Requires: sibyl-memory-client >= 0.5.0, mcp >= 1.0.0.
Available Tools
7 toolscoherra_auditA
Run a full Coherra memory audit and return the results.
Scans all entities in Sibyl Memory for three classes of drift:
contradiction two names that likely refer to the same fact but carry different values
duplicate two entities in the same category with nearly identical values
stale an entity whose body.updated_at exceeds the per-category threshold from coherra:config
Side-effects:
Seeds coherra:config with default thresholds if absent
Writes results to coherra:last_audit (memory_set_state)
Appends a coherra_scan journal event (memory_record_event)
Returns: { "ok": True, "timestamp": "", "health_score": 0-100, "entity_count": N, "issue_count": N, "issues_found": [ {severity, category, name, detail, ...} ] }
Inputs: no named parameters. Returns: object
coherra_listA
List entities managed by Coherra, optionally filtered by category.
Returns entities most-recently-updated first. Each result includes the structured Coherra body so the caller can inspect value, confidence, source, and timestamps without a separate recall call.
Args: category: Optional category filter. Omit to list all categories. limit: Maximum entities to return (default 50, max 200).
Returns: {"ok": True, "category": ..., "count": N, "results": [...]}
Inputs: limit, category. Returns: object
coherra_onboardA
Import JSON data from another tool into Coherra.
Runs the full onboarding pipeline:
Parse the JSON into individual records
Categorize each record (category, name, confidence)
Write to Sibyl Memory using the Coherra schema
Audit for contradictions, duplicates, staleness
Auto-repair safe issues (duplicates + stale)
Flag contradictions for manual review
Args: import_data: A dict or list representing the JSON export. Accepts flat dicts, nested dicts, lists of dicts (with key/value fields), or lists of strings.
Returns: { "ok": True, "imported": N, # records written "auto_cleaned": X, # safe issues fixed "flagged_for_review": Y, # contradictions needing manual fix }
Inputs: import_data (required). Returns: object
coherra_recallA
Fetch a single Coherra entity by (category, name).
Returns the full entity including the structured Coherra body (value, confidence, source, created_at, updated_at, version). Raises a NOT_FOUND error if the entity does not exist.
Args: category: The category the entity was stored under. name: The unique-within-category key.
Returns: {"ok": True, "category": ..., "name": ..., "body": {...}}
Inputs: name (required), category (required). Returns: object
coherra_rememberA
Store a structured fact in Sibyl Memory using Coherra's schema.
Wraps memory_remember with a versioned body shape so all Coherra
entities are uniform and auditable.
Args: category: Logical grouping, e.g. "people", "projects", "prefs". name: Unique-within-category key, e.g. "alice", "acme-deal". value: The fact to store — any JSON-serialisable value. confidence: Optional float 0.0–1.0 expressing certainty. source: Optional provenance tag: "conversation", "tool", "inference", etc.
Returns: {"ok": True, "category": ..., "name": ...} on success.
Inputs: name (required), value (required), category (required), source, +1 more. Returns: object
coherra_repairA
Apply one repair to a flagged issue from the last audit.
Actions by severity:
stale: "archive" — forget the entity
"refresh" — bump updated_at to now (fact still true)
duplicate: "merge" — keep higher-confidence entry, archive the other
contradiction: "keep_a" — keep primary (category/name), archive related
"keep_b" — keep related_entity, archive primary
"merge_manual" — archive both, write new canonical entity
at primary address using supplied value
Args: issue_id: 10-char hex id from coherra_audit issues_found list. action: Repair action string (see above). value: Required only for contradiction/merge_manual — the correct canonical value to write.
Returns: {ok, issue_id, severity, action_taken, archived, written}
Inputs: action (required), issue_id (required), value. Returns: object
coherra_repair_safeA
Batch-apply all safe repairs from the last audit.
Auto-applies:
stale → archive (entity is old, remove it)
duplicate → merge (keep higher-confidence copy, archive the other)
Contradictions are NEVER auto-resolved — they require explicit human choice via coherra_repair with keep_a / keep_b / merge_manual.
Returns: {ok, fixed_count, skipped_contradictions, results: [...]}
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct operation: remember, recall, list, audit, repair, batch repair, and import. The only possible confusion is between coherra_repair and coherra_repair_safe, but their descriptions clearly separate single-issue repair from batch auto-repair.
All tools share the coherra_ prefix and use snake_case with a verb-oriented style. The naming is mostly consistent, though coherra_repair_safe and coherra_onboard are slightly less parallel than simple verb_noun forms.
Seven tools is a well-scoped count for a memory management server. Each tool serves a clear purpose, covering storage, retrieval, listing, auditing, repair, batch repair, and importing without unnecessary bloat.
The set covers create, read, list, audit, repair, and import workflows, but there is no direct update or delete tool. Agents must work around this by using remember to overwrite or repair actions to archive, which is a notable gap in standard CRUD coverage.
Maintenance
Related MCP Connectors
Long-term memory for AI agents: bitemporal fact ledger, contradiction detection, explainability.
Hosted agent memory with provenance, contradiction surfacing, and snapshot rollback.
Cuts coding agent token burn up to 72% continuously via contradiction-free memory & verification.
Persistent AI memory with semantic search, conflict detection, and ticketing.
Related MCP Servers
AlicenseNot gradedqualityDmaintenanceEnables AI agents to audit and clean their memory files by scanning for duplicates, broken links, stale facts, and conflicts, with non-destructive, reversible fixes and a full audit trail. It also lets the calling agent serve as the conflict judge through MCP tools.Apache 2.0- AlicenseNot gradedqualityCmaintenanceEnables real-time auditing of LLM long-term memory to detect contradictions, user-introduced falsehoods, staleness, and unsourced fabrications, while providing a safe memory store with tools like recall, review, and restore.1MIT
- AlicenseNot gradedqualityBmaintenanceProvides AI agents a shared long-term memory layer with evidence-backed, auditable claims, enabling persistent, explainable, and conflict-aware recall across sessions.8MIT
- AlicenseNot gradedqualityBmaintenanceProvides AI agents with long-term memory that tracks temporal validity and corrections, enabling context-aware retrieval of past facts via MCP tools.MIT