feat(phase5): epistemic confidence model#137
Merged
Merged
Conversation
Calibrated uncertainty levels (established/provisional/contested/inferred) on warm-tier memories with auto-promotion via new sleep cycle Phase 5.12. New columns: epistemic_status, evidence_count, last_corroborated_at on warm_tier. New endpoint GET /memory/:id/epistemic and MCP tools memforge_certainty + memforge_epistemic_profile. Phase 5.12 promotes provisional rows with evidence_count >= 3 and multi-namespace positive retrievals to established, stamps last_corroborated_at, and demotes stale established rows back to provisional. Epistemic filter on query() restricts results to the desired confidence tier. TypeScript SDK, Python SDK, tool-definitions, and OpenAPI spec updated. Migration: schema/migration-v3.9.sql Split from #129 (PR-B of 6). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Second of six PRs splitting #129. Ships Feature 1: Epistemic Confidence Model — calibrated uncertainty levels on warm-tier memories with auto-promotion via sleep cycle.
What lands
warm_tier:epistemic_status TEXT NOT NULL DEFAULT 'provisional',evidence_count INTEGER NOT NULL DEFAULT 1,last_corroborated_at TIMESTAMPTZ. Indexwarm_tier_epistemic_idxon(agent_id, epistemic_status).run()loop after deprecated decay, before drift snapshot. Promotesprovisional → establishedwhen bothevidence_count >= 3AND positive retrievals come from ≥2 distinct namespaces (cross-context corroboration required). Stampslast_corroborated_at. Does NOT touchcontestedrows.query({ epistemic: 'established' })or array form filters retrieval by status.GET /memory/:agentId/epistemicreturns per-status counts.memforge_certainty(filtered query) andmemforge_epistemic_profile(counts).epistemicquery param andepistemicProfile()method.Migration:
schema/migration-v3.9.sql.Notes
memforge_certaintyMCP executor builtepistemicOptsbut passed a separate options object toclient.query()that ignored the field. Corrected here so the tool actually filters.evidence_countdefaults to1(not0) — a newly consolidated row counts the consolidation event itself as one unit of evidence, matching PR feat: Phase 5 — Autonomous Knowledge Architecture (7 features) #129's design.Part of the #129 split
Test plan
🤖 Generated with Claude Code