{"id":51271487,"url":"https://github.com/xyzzylabs/dent8","last_synced_at":"2026-06-29T18:06:27.007Z","repository":{"id":368003772,"uuid":"1283131556","full_name":"xyzzylabs/dent8","owner":"xyzzylabs","description":"A memory firewall for coding agents — provenance-, authority-, and freshness-governed memory with a tamper-evident, replayable event log.","archived":false,"fork":false,"pushed_at":"2026-06-28T17:04:12.000Z","size":228,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-28T17:15:54.926Z","etag":null,"topics":["agent-memory","ai-agents","event-sourcing","llm","mcp","memory","rust","security"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xyzzylabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE-APACHE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"docs/roadmap.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-28T15:26:03.000Z","updated_at":"2026-06-28T17:04:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/xyzzylabs/dent8","commit_stats":null,"previous_names":["xyzzylabs/dent8"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/xyzzylabs/dent8","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyzzylabs%2Fdent8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyzzylabs%2Fdent8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyzzylabs%2Fdent8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyzzylabs%2Fdent8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xyzzylabs","download_url":"https://codeload.github.com/xyzzylabs/dent8/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyzzylabs%2Fdent8/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34937477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-memory","ai-agents","event-sourcing","llm","mcp","memory","rust","security"],"created_at":"2026-06-29T18:06:25.659Z","updated_at":"2026-06-29T18:06:26.998Z","avatar_url":"https://github.com/xyzzylabs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dent8\n\n**A memory firewall for coding agents** — it prevents low-authority or stale project\nfacts from silently overriding trusted state, and can replay exactly *why* an agent\nbelieved something.\n\n![dent8 demo: a trusted fact is asserted, a low-authority override is rejected by the firewall, and explain replays the auditable receipt.](demo.gif)\n\nSee it run: **`cargo run -p dent8-cli -- demo`** — a high-authority fact is asserted, a\nlow-authority source is rejected when it tries to override it, and an integrity receipt\nexplains the result with a verified hash chain.\n\n## Why a firewall? (the one-command proof)\n\nRun **`dent8 eval`** — dent8's adversarial corpus pits each attack against the real firewall\n*and* a recency-only baseline (newest-write-wins, the resolution Zep/Graphiti use):\n\n| attack | family | firewall | recency-only baseline |\n|---|---|---|---|\n| `minja_low_authority_injection` | T1 memory injection | blocked ✓ | **compromised** |\n| `authority_laundering` | T1 memory injection | blocked ✓ | **compromised** |\n| `canonical_contradiction` | T5 canonical contradiction | blocked ✓ | **compromised** |\n| `sybil_corroboration` | earned entrenchment | blocked ✓ | **compromised** |\n| `poisoned_source_retraction` | T2 retraction cascade | blocked ✓ | **compromised** |\n\nThe firewall blocks **5/5** attacks a recency-only memory falls to — including\n`poisoned_source_retraction`: retract a poisoned source and dent8 flags every fact *derived*\nfrom it (`dent8 derive` records the edge, `dent8 verify` surfaces the taint), the\ndependency-cascade integrity recency-only memory structurally cannot express.\n\n## Install\n\n```sh\n# From source (Rust 1.95+):\ncargo install --git https://github.com/xyzzylabs/dent8 dent8-cli   # installs the `dent8` binary\n# …or run from a clone without installing:\ncargo run -p dent8-cli -- demo\n```\n\nThe stock `dent8` binary uses a local file log and needs no services. Opt-in builds add the\noperational **Postgres** backend (`--features postgres`, with `DENT8_DATABASE_URL`) and the\nEd25519 **witness** (`--features witness`).\n\n## Quickstart\n\n```sh\ndent8 eval                                                 # why: 5/5 attacks blocked vs a recency baseline\ndent8 assert repo myproj database postgres high owner      # assert a trusted fact\ndent8 supersede repo myproj database mysql low web-scrape  # a low-authority override → REJECTED by the firewall\ndent8 explain repo myproj database                         # still \"postgres\", with an integrity receipt\ndent8 derive repo myproj deploy_target pg high agent repo myproj database  # derive a fact from it\ndent8 retract repo myproj database high owner              # retract the source…\ndent8 verify                                               # …and verify flags the now-tainted derivative\n```\n\nFacts persist to `./dent8-log.jsonl` by default (override with `DENT8_LOG`). `dent8 --help`\nlists the full surface (`assert`/`supersede`/`retract`/`contradict`/`reinforce`/`expire`/\n`derive`/`explain`/`replay`/`verify`/`conflicts`/`eval`/`authority`/`witness`/`mcp serve`).\n\nThe core primitive is a claim event, not a generic memory item: every accepted write\npreserves provenance, evidence, authority, freshness, contradiction state, supersession\nlineage, and replayability. (Origin: *dentate gyrus*, the hippocampal structure\nassociated with pattern separation.)\n\n## Status\n\nThis is an early open-source project. **[docs/STATUS.md](docs/STATUS.md) is the single\nsource of truth for what is built.** In short:\n\n- **Runnable today:** `dent8 demo` (the firewall + replay/explain loop, registry-driven); the\n  full lifecycle through the firewall — **`assert` / `supersede` / `retract` / `contradict` /\n  `reinforce` / `expire` / `derive` / `explain` / `replay`** — plus the operator surfaces\n  **`verify`** (integrity + retraction-taint check), **`conflicts`**, and **`eval`** (the\n  self-demonstrating benchmark), `dent8 authority` / `dent8 witness` (the latter behind\n  `--features witness`), and `dent8 schema postgres`. State persists to a local file log and\n  **composes across separate invocations**; the file log is a **dev store** (single-writer,\n  non-transactional) — the *operational* backend is Postgres (M2b). `dent8 mcp serve` exposes\n  the full belief surface to agents over MCP (stdio JSON-RPC), through the same firewall —\n  see [examples/mcp/](examples/mcp/) for wiring it into an agent client + a runnable demo.\n- **Implemented as a tested library:** the `ClaimEvent` model and replay fold; the\n  unbypassable write-path firewall (`EventStore::append`) with authority-weighted\n  arbitration + retraction, an anti-laundering challenger check, and the\n  canonical-contradiction hard-alarm; the coding-agent predicate registry; the integrity\n  receipt; a freshness evaluator; policy-counterfactual and entity-level replay with\n  lineage and earned-entrenchment audits; and serde canonicalization + a SHA-256 hash chain.\n- **Validated by an adversarial corpus** (`dent8 eval`, or `cargo test -p dent8-evals`): MINJA\n  injection, authority laundering, canonical contradiction, Sybil corroboration, and\n  **poisoned-source retraction** all **fail against the firewall (0/5)** while **compromising a\n  recency-only baseline (5/5)** — see [docs/evals.md](docs/evals.md).\n- **DB-verified (M2b):** the v0 Postgres adapter (`PostgresEventStore`, behind\n  `--features adapter`) — transactional append, firewall via the shared `arbitrate_events`,\n  JSONB event log, **plus a materialized projection + edge graph** (migration 003) folded in\n  the same transaction with a `projection == fold(log)` check. The `DATABASE_URL`-gated\n  integration tests pass against a live `postgres:16`.\n- **Runnable (v0):** an MCP server (`dent8 mcp serve`) exposing the full belief surface\n  (`assert`/`supersede`/`retract`/`contradict`/`reinforce`/`expire`/`derive`/`explain`/`replay`)\n  as tools, plus `resources/list`/`resources/read` and JSON-RPC batches, over stdio JSON-RPC,\n  through the shared firewall path.\n- **Design-only:** the official MCP `rmcp` SDK / richer transports (the v0 server already does\n  the nine tools above, resources, and JSON-RPC batches) and the richer per-column Postgres\n  event table of migration 001 (the JSONB log, projection, and edge graph are built, above;\n  evidence-dependency edges ship as `EvidenceKind::DerivedFrom` + retraction taint, ADR 0010).\n\nThe runnable surface persists either way: a local file dev log by default, or — with\n`DENT8_DATABASE_URL` set and a `--features postgres` build — the **DB-verified transactional\nPostgres backend** (each multi-event operation committed as one transaction). An opt-in\n**authority ceiling** (`dent8 authority`) caps what each source may assert, rejecting a\nwrite above its registered ceiling. The witness is runnable as a *primitive* — **`dent8\nwitness`** (`--features witness`) emits Ed25519 signed tree heads and detects a history\nrewrite or rollback that an internal chain re-verify cannot. The remaining gap to a hardened\nmulti-user product is **cryptographic caller identity** (signed grants — *which* source is\ncalling is still asserted) and an **operated witness service** that signs on a cadence from\nseparate infrastructure. The [Roadmap](docs/roadmap.md) and\n[docs/STATUS.md](docs/STATUS.md) track exactly that.\n\n## Initial Shape\n\nThis repository starts Postgres-first. Postgres is the operational source of truth for append-only claim events, projections, audit queries, and future multi-user use. DuckDB and Parquet remain a later analytical lane for replay, forensic inspection, benchmark analysis, and debugger workflows.\n\nWorkspace crates:\n\n- `dent8-core`: typed domain model, claim-event state machine, invariants.\n- `dent8-store`: storage and replay traits shared by backends.\n- `dent8-store-postgres`: Postgres schema and migration boundary.\n- `dent8-cli`: operator and developer CLI surface.\n\nCommands (see [docs/STATUS.md](docs/STATUS.md) for what runs today):\n\n- `dent8 demo`: run the firewall + registry + replay/explain loop end to end (in-memory).\n- `dent8 assert \u003ckind\u003e \u003ckey\u003e \u003cpredicate\u003e \u003cvalue\u003e \u003cauthority\u003e \u003csource\u003e`: assert a fact\n  through the firewall, persisted to a file-backed log (`DENT8_LOG`).\n- `dent8 supersede \u003ckind\u003e \u003ckey\u003e \u003cpredicate\u003e \u003cnew-value\u003e \u003cauthority\u003e \u003csource\u003e`: revise the\n  believed fact — rejected unless the revision can out-rank the incumbent.\n- `dent8 retract \u003ckind\u003e \u003ckey\u003e \u003cpredicate\u003e \u003cauthority\u003e \u003csource\u003e`: remove the believed fact —\n  also rejected unless it can out-rank the incumbent.\n- `dent8 contradict \u003ckind\u003e \u003ckey\u003e \u003cpredicate\u003e \u003copposing-value\u003e \u003cauthority\u003e \u003csource\u003e`: flag a\n  conflict (dissent) — contest the fact and keep both, even from low authority.\n- `dent8 explain \u003ckind\u003e \u003ckey\u003e \u003cpredicate\u003e`: print the believed (or terminal) fact's receipt.\n- `dent8 replay \u003ckind\u003e \u003ckey\u003e \u003cpredicate\u003e`: replay the full event history — *why* the fact\n  is what it is.\n- `dent8 schema postgres`: print the initial Postgres schema.\n- `dent8 mcp serve`: expose the full belief surface (tools + resources + JSON-RPC batches)\n  to agents over MCP (stdio JSON-RPC).\n\n## Project Docs\n\n**Status**\n\n- [Implementation Status](docs/STATUS.md) — single source of truth for what is built\n- [Configuration](docs/configuration.md) — env vars + Cargo features in one place\n- [Changelog](CHANGELOG.md)\n\n**Design**\n\n- [Project Brief](docs/project-brief.md)\n- [Architecture](docs/architecture.md)\n- [Domain Model](docs/domain-model.md)\n- [Belief Revision](docs/belief-revision.md) — dent8's formal identity (the lead lens)\n- [Storage \u0026 the Event Log](docs/storage.md)\n- [Interfaces](docs/interfaces.md)\n- [Naming](docs/naming.md)\n\n**Correctness \u0026 security**\n\n- [Formal Verification](docs/formal-verification.md)\n- [Evaluation Strategy](docs/evals.md)\n- [Threat Model](docs/threat-model.md)\n\n**Planning \u0026 research**\n\n- [Roadmap](docs/roadmap.md)\n- [Related Work](docs/related-work.md)\n- [Research Dossier](docs/research/dossier.md)\n- [Open Research Directions](docs/research/novelty.md)\n- [Training Substrate](docs/research/training-substrate.md)\n- [Paper Outline](docs/paper/outline.md) · [Preprint Draft](docs/paper/preprint.md)\n- [Decision Records](docs/decisions)\n\n## Development\n\n```sh\ncargo fmt --all --check\ncargo clippy --workspace --all-targets -- -D warnings\ncargo test --workspace\ncargo run -q -p dent8-cli -- demo\n\n# The Postgres adapter (M2b, DB-verified) is feature-gated; its integration tests are gated\n# on DATABASE_URL (they skip without one). Throwaway DB via Docker:\ndocker compose up -d\nDATABASE_URL=postgres://postgres:dent8@localhost:5432/dent8 \\\n  cargo test -p dent8-store-postgres --features adapter\ndocker compose down\n```\n\nCI ([`.github/workflows/ci.yml`](.github/workflows/ci.yml)) runs the workspace\nfmt/clippy/test gate and the adapter against a Postgres service container.\n\n## Status\n\ndent8 is **pre-1.0 (v0.x)** and experimental — the API, the on-disk event encoding, and the\nstorage schema may change between minor versions. [`docs/STATUS.md`](docs/STATUS.md) is the\nsingle source of truth for what is runnable vs. library-only vs. design-only, and\n[`docs/threat-model.md`](docs/threat-model.md) states precisely what the firewall does and\ndoes not defend against. Security reports: see [`SECURITY.md`](SECURITY.md).\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or\n  \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\nat your option.\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for\ninclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed\nas above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyzzylabs%2Fdent8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxyzzylabs%2Fdent8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyzzylabs%2Fdent8/lists"}