Rensei docs
Memory

Drift Alerts

Cross-agent contradiction detection.

Drift Alerts detect and flag contradictions - situations where two or more agents (or the same agent at different times) record conflicting observations about the same topic. This is a key quality metric for your memory system.

What Contradictions Mean

A contradiction arises when observations conflict on the same subject. Examples:

ScenarioIssue
Agent-A says "use async/await" but Agent-B says "use Promises"Pattern inconsistency
Same agent records "deploy-every-day" then later "deploy-weekly"Possible rule change or memory regression
"This endpoint is stable" vs. "This endpoint crashes under load"Safety or correctness concern
Cross-project: Project-A says "use React 18" but Project-B learned "use React 19"Knowledge transfer gap

How Contradictions Are Detected

The platform uses SimHash clustering and content analysis to identify near-duplicate observations with conflicting tags or content. Detection is conservative - it aims for high precision (few false positives) over recall (some contradictions may not be caught).

Factors That Increase Sensitivity

  • Larger time window (90d vs. 7d) - More observations to compare
  • Cross-agent scope - More sources to disagree
  • High-change domains - Architecture, security, performance shift frequently

Viewing Alerts

On the Memory Dashboard, the Drift Alerts panel shows:

  • Total contradiction count - Sum of all flagged conflicts in your time range
  • Alert list - Top contradictions, sorted by severity
  • Metadata - Which agents disagree, when the conflict was detected, related observation IDs

Interpreting Severity

Drift alerts are scored by:

  1. Recency - Recent contradictions are higher priority
  2. Domain - Safety-critical (security, compliance) contradictions score higher
  3. Confidence gap - If one observation is much lower confidence than the other, lower alert score
  4. Frequency - Repeated contradictions on the same topic raise severity

Common Causes

CauseSolution
Legitimate change (rule, tech stack evolved)Mark older observation as outdated via feedback; encourage agents to generate new observation
Agent error (hallucination, bad training data)Review the agent's learning process; provide corrective feedback or retrain
Incomplete observation (too narrow scope, missing context)Add more complete observation or merge with conflicting one
Cross-project inconsistency (different standards in different projects)Document the intentional divergence or drive convergence

Resolving Contradictions

Via Feedback

  1. Locate the conflicting observations (linked in the alert)
  2. Review both to determine which is more accurate
  3. Mark the incorrect one as misleading or downweight it
  4. The dashboard will reflect the change on next refresh

Via New Observations

Generate a new, higher-confidence observation that supersedes the conflicting pair. The old observations will age out naturally.

Via Manual Review

For safety-critical contradictions (security, compliance), escalate for manual review:

  1. Document the contradiction in your internal wiki/issue tracker
  2. Assign a human expert to resolve
  3. Use memory export to create a compliance report

Spike Detection

A sudden spike in contradictions may indicate:

  • Mass feedback - You enabled feedback on many observations (temporary, resolves as you curate)
  • Policy change - A major architectural or procedural change that invalidates old observations
  • Agent malfunction - One or more agents generating inaccurate observations
  • Data corruption - Rare; contact support if you suspect this

Action: Check the Trends chart to see if observation volume also spiked. High volume + high contradictions = quality issue.

API Reference

Endpoint: GET /api/memory/analytics/drift

Query Parameters:

  • projectId (optional) - Filter to a specific project
  • since (optional) - ISO-8601 date lower bound (default: 30 days ago)

Response:

{
  alerts: Array<{
    subject: string           // topic keyword extracted from contradiction detection
    observationAId: string    // first conflicting observation
    observationBId: string    // second conflicting observation
    agentAId: string
    agentBId: string
    contentSnippetA: string   // first 200 chars of observation A
    contentSnippetB: string   // first 200 chars of observation B
    detectedAt: string        // ISO-8601
  }>
  totalContradictions: number
  projectId: string | null
  since: string
}

Example:

curl -X GET "https://api.rensei.ai/api/memory/analytics/drift?since=2026-05-01T00:00:00Z" \
  -H "Authorization: Bearer rsk_..."

Response:

{
  "alerts": [
    {
      "subject": "async",
      "observationAId": "obs_abc",
      "observationBId": "obs_def",
      "agentAId": "agent-dev",
      "agentBId": "agent-research",
      "contentSnippetA": "Use async/await for all async operations",
      "contentSnippetB": "Never use async/await in request handlers; prefer callbacks",
      "detectedAt": "2026-05-15T10:30:00Z"
    }
  ],
  "totalContradictions": 1,
  "projectId": null,
  "since": "2026-05-01T00:00:00Z"
}

Best Practices

  1. Monitor regularly - Check the dashboard weekly to catch new contradictions early
  2. Prioritize safety-critical - Always resolve security and compliance contradictions first
  3. Document resolutions - Link your feedback/corrections to internal tracking for audit trails
  4. Involve domain experts - For contradictions in specialized areas, get expert input before resolving
  5. Track trends - Use the Trends chart to see if your contradiction rate is improving over time

Rate Limits

The drift API enforces a 100 req/min quota per organization.

On this page