Conceptsv3 featuresMeta-cognition

Meta-cognition

Beta in docs/STATUS.md. Mnemosyne is alpha, on the 3.6.x line, and the API can still change within 3.x.

An agent that knows what it knows can decide when to trust a recall, when to ask the user and when to look elsewhere. The self-model is computed in SQL with no model call, and it exposes aggregates only, never the content of a memory.

The confidence map

The materialized view mv_confidence_map has one row per entity, built from the active facts linked to it.

Coverage, how much is known:

LevelRule
expert10 or more facts with an average worth above 0.7
familiar5 or more facts with an average worth above 0.5
aware2 or more facts
minimal1 fact
blindNo facts

Freshness, by the newest fact:

LevelNewest fact created
currentIn the last 7 days
recentIn the last 30 days
agingIn the last 90 days
staleEarlier, or never

A daily job (mnemo.metacognition.refresh, 07:00 UTC) refreshes the views, so the map can be up to a day behind.

Reading the self-model

curl "http://localhost:3939/metacognition?aspect=gaps&limit=10" \
  -H "Authorization: Bearer mns_live_..."

aspect is coverage, trends, gaps, strengths or all (the default). entity filters by name and limit caps each list.

interface SelfModel {
  workspaceId: string;
  generatedAt: string;
 
  confidenceMap: Array<{
    entity: string;
    coverage: "expert" | "familiar" | "aware" | "minimal" | "blind";
    freshness: "current" | "recent" | "aging" | "stale";
    factCount: number;
    avgWorth: number;
  }>;
 
  strengths: Array<{ topic: string; avgWorth: number; factCount: number }>;
 
  gaps: Array<{
    topicKey: string;
    gapScore: number;
    recallHits30d: number;
    avgWorth: number;
    memoryCount: number;
    suggestedAction: "ask_user" | "search_codebase" | "wait_for_data";
  }>;
 
  trends?: {
    recallHitRate:          { current: number; previous: number; delta: number };
    avgRecallLatency:       { current: number; previous: number; delta: number };
    sessionCollapseQuality: { current: number; previous: number; delta: number };
    strategySuccessRate:    { current: number; previous: number; delta: number };
  };
 
  summary: {
    totalTopics: number;
    strongTopicsCount: number;
    gapsCount: number;
    blindCount: number;
    avgWorthAcrossWorkspace: number;
  };
}

Source: buildSelfModel in packages/core/src/cognitive/metacognition.ts.

  • Strengths are entities with an average worth of 0.7 or more, at least 3 facts and enough evidence.
  • Gaps are computed per topic key. The gap score grows with how often the topic was recalled in the last 30 days and with how low its average worth is. suggestedAction is wait_for_data under 5 recalls, search_codebase when the topic was recalled 5 or more times with an average worth below 0.2, and ask_user otherwise.
  • avgRecallLatency is a proxy: the recall log has no latency column, so the value is an average activation score, not a time.
  • sessionCollapseQuality averages the ratings sent with POST /session/{id}/feedback.

From MCP

memory_introspect takes aspect, entity and limit (default 10). Besides the five aspects above it accepts five aliases: health (maps to all), worth (strengths), drift (trends), types (coverage) and recent_changes (trends).

See also