Read the source code of your memory.
Weekly audit & Galaxy health
Automated knowledge maintenance — deduplication, contradiction detection, confidence decay, and health scoring.
Orion runs a 7-step audit automatically every Sunday at 2:00 AM. The audit maintains knowledge quality without manual intervention.
What the audit does
| Step | Operation | Effect |
|---|---|---|
| 1 | Deduplication | Merges records with >95% cosine similarity |
| 2 | Contradiction detection | Classifies FACTUAL / CONTEXTUAL / TEMPORAL conflicts |
| 3 | Transitive inference | Infers indirect relationships (A→B + B→C = A→C) |
| 4 | Confidence decay | −5% at 30 days, −15% at 90 days without access |
| 5 | Cache promotion | Promotes high-value cache entries to permanent storage |
| 6 | Biome lifecycle | Advances SEED → ACTIVE → MATURE → DORMANT → ARCHIVED |
| 7 | Galaxy strength | Recomputes the 5-dimension health metric |
Running manually
# Trigger an audit
orion audit --run
# Or via API
curl -X POST http://localhost:8000/api/v1/audit/run
# View last results
orion audit
Galaxy strength score
A composite metric computed from five dimensions:
| Dimension | Weight | Measures | Target |
|---|---|---|---|
| Volume | 25% | Records per day | 20/day = 100% |
| Density | 20% | Entity-to-stardust link ratio | Higher = better connected graph |
| Health | 20% | Contradiction resolution rate | 100% = no unresolved conflicts |
| Diversity | 20% | Records with multiple reinforcement sources | Cross-validated knowledge |
| Coverage | 15% | Active biomes / total biomes | No dormant projects |
Grades: A (90+), B (80+), C (70+), D (60+), F (<60). Cached in Redis (1 hour) and stored in strength_history for trend tracking via GET /admin/strength/history.
Agent brain health
Individual agent health is separate from Galaxy health:
orion brain health claude-code-main
Returns: overall health score, knowledge freshness, coverage gaps, stale beliefs, expertise summary, and specific enrichment recommendations ("Write about deployment procedures").
Confidence decay and calibration
Decay is the stick; calibration is the carrot.
- Decay: Records not accessed for 30 days lose 5% confidence. At 90 days, 15%. This gradually pushes stale knowledge down in search rankings.
- Calibration: Records marked as "used" in
brain.calibrategain +0.02 confidence per session. Actively useful knowledge maintains high confidence indefinitely.
The net effect: after a few weeks, search results naturally prioritize knowledge that agents actually use over knowledge that was written once and forgotten.