SessionZero
Trust-weighted memory for AI coding agents

Trust-weighted memory for AI coding agents — real Cognee Cloud graph, verified live.

Live demo facts

16
real memories ingested
4
trust signals
0.31 vs 0.97
real confidence gap on a contradicted decision

Memory Timeline

dataset shiftlog_demo
HIGH confidence MEDIUM confidence LOW — verify before trusting forgotten (pruned)
AI LOGIC DECISION FLOW

Memory is not enough. Agents need judgment.

SessionZero is a trust-weighted memory layer for AI coding agents, built on Cognee's real knowledge-graph lifecycle. It doesn't just recall — it checks whether a memory is still true before an agent ever sees it.

About the project

  • SessionZero gives AI coding agents persistent, trust-checked memory across sessions — past architecture decisions, bug fixes, and reverted approaches, carried forward instead of re-explained every time.
  • It's built directly on Cognee's real knowledge-graph lifecycleremember(), recall(), and forget() all run against a live, hosted Cognee Cloud tenant, not a local simulation.
  • What sets it apart from a plain memory bot is judgment: every recalled memory is scored for confidence before an agent ever acts on it.
  • Built for the Cognee × WeMakeDevs hackathon as a working, end-to-end demo — ingestion, trust scoring, a live Claude Code integration, and this dashboard, all wired to the same real graph.

System architecture

Pipeline, with real numbers pulled from the live API

Every box names a real file, and the trust-scoring stage shows an actual scored case — not placeholder numbers.

demo-data/commits.jsonl 16 synthetic-realistic commits ingest/ — git_reader.py, memory_units.py decision, bug_fix, revert, contradiction, deletion parses commit history into structured memory units Cognee Cloud — remember() dataset shiftlog_demo · 16 ingested → 14 live, 2 forgotten recall_service/api.py — recall() real graph query, ranked by relevance trust_score.py — 4 signals, real values shown for one case Path 1.00 Similarity 0.90 Recency 0.29 Contradiction 0.60 penalty Real case: "Use JWT for auth" (d5b6e13) — flat path, high similarity, but a real 0.60 contradiction penalty pulls the final score down Pulled live from the running API, not hardcoded — recency drifts daily by design Weighted combination reasoned weights, not empirically tuned d5b6e13 → 0.31 LOW — verify before trusting 8c5f0d7 → 0.97 HIGH confidence claude_code_bridge/bridge.py both labels injected together, live-tested · 28/28 tests, CI green

How it works

  • Every commit becomes a memory unit — tagged by kind, timestamp, and files touched, then written into Cognee's graph via a real remember() call.
  • A query — from the dashboard or a live Claude Code session — triggers a real recall() against that graph, returning semantically ranked results.
  • Nothing reaches an agent unscored. Every result passes through trust_score.py first, producing one number and a HIGH / MEDIUM / LOW label.
  • High-confidence memory is injected straight into agent context. Low-confidence memory is surfaced with an explicit warning — never silently trusted.
  • Superseded or dead memory is pruned from the graph with a real forget() call, so stale context doesn't haunt the next session.

Trust signals — how confidence is calculated

  • Path — how directly connected a memory is in the graph, via Cognee's real topological_rank. At this dataset's current size (16 units), this signal returns the same baseline value for every result — it's a real, live-sourced signal that has room to grow more expressive as the graph scales up.
  • Similarity — how relevant a memory is to the query. Cognee Cloud's CHUNKS search does not expose a raw score in this API version, so rank position is used as a proxy instead.
  • Recency — exponential decay on the memory's age, 30-day half-life. Keeps a six-month-old decision from being treated as equally current as yesterday's.
  • Contradiction — the strongest signal. A 60% multiplicative discount when a newer memory supersedes an older one. Real, verified result: the same query about JWT auth returns the old decision at 0.31 (LOW) and the current one at 0.97 (HIGH) — same topic, opposite trust.
  • The demo dataset is intentionally scoped for clarity: 16 memory units, one contradiction pair, one revert — enough to prove the mechanism end-to-end.
  • improve()/memify() are available on Cognee's SDK rather than as hosted Cognee Cloud endpoints, confirmed directly against the live API spec.
  • The Codex bridge is real, working code, structurally verified against Cognee's own Codex plugin — the Claude Code integration is the one live-tested end-to-end in an actual session.

Why this matters

  • Every new agent session starts with total amnesia — the same architecture decision gets re-explained, and a rejected approach gets suggested again next week.
  • Bolting memory onto an agent does not fix this. It just makes the agent confidently repeat whatever it remembers, right or wrong.
  • The real failure mode is not forgetting. It is trusting a memory that is no longer true with full conviction.
  • Contradiction-awareness is the actual differentiator — knowing two memories disagree, and telling the agent which one to believe, instead of averaging or guessing.
  • Walk the JWT case end-to-end: without this system, an agent confidently tells you the project uses JWT. With it, that memory is flagged LOW and the current session-cookie decision is surfaced HIGH — verified with real scores, not a hypothetical.
  • The pitch is not "an agent that remembers." That's table stakes now. It is an agent that knows when its own memory might be wrong.