Cortex Modes
Cortex Modes
Cortex is the memory consolidation engine. It transforms raw memories into structured, organized knowledge through 8 named processing modes. Each mode runs a pipeline of specialized processors with different goals — from gentle tidying to aggressive cleanup.
How Cortex Works
- You trigger a mode — manually via the Cortex tab in the QUI Core dashboard, or via a schedule
- A snapshot is taken — the current memory state is saved so you can revert if needed
- Processors run in sequence — each mode runs its pipeline of processors, transforming memories step by step
- Results persist — consolidated memories, updated associations, and archived originals are saved
Cortex reads from and writes to the same Memory Service database. It uses the character's configured LLM (via Anima) for any processing that requires AI reasoning.
The 8 Modes
Meditation
Gentle consolidation. Decays low-importance memories, resolves duplicates, strengthens associations between related memories, and re-evaluates importance scores. Extracts anxiety patterns and unresolved tensions for insight.
Best for: Regular maintenance. Run weekly to keep memories tidy without aggressive changes.
Psychedelic
Creative association building. Scrambles existing association patterns and creates novel links between distant memories. Merges adjacent clusters and inverts importance (boosting undervalued memories, dampening overvalued ones). Extracts unexpected parallels and hidden metaphors.
Best for: Breaking out of rigid memory patterns. Useful when a character seems stuck in repetitive thinking.
Metalhead
Aggressive cleanup. Prunes weak associations, resolves all duplicates, compresses old memories, applies strong decay, and defragments the database.
Warning: Metalhead is NOT reversible — it permanently deletes memories. Use with caution.
Best for: Characters with bloated memory that need a hard reset to essential knowledge only.
Contemplation
Deep introspection. Runs multiple analysis profiles to extract narrative threads, wisdom, unresolved business, and identity evolution. Synthesizes findings into a reflective narrative.
Best for: Understanding a character's journey. Generates insight documents about patterns, growth, and recurring themes.
Supermind
Comprehensive analysis with large context. Fetches memories based on mode configuration, clusters them by theme, samples representatives, compresses clusters, and creates overview links.
Best for: Building high-level summaries of large memory collections. Good for characters with many memories that need structural organization.
Hyperfocus
Topic-specific consolidation. Requires a topic filter — you specify what topic to focus on (e.g., "database optimization" or "customer feedback"). Fetches only relevant memories, resolves duplicates within the topic, strengthens topic-internal associations, compresses related memories, and extracts deep-dive insights.
Best for: When you want to consolidate knowledge about a specific domain without touching unrelated memories.
Nostalgia
Processes older memories (90+ days). Performs sentiment analysis on old content, boosts positive memories, strengthens positive associations, and generates warm synthesis narratives.
Best for: Characters with long histories. Helps retain and reinforce positive experiences while letting negative ones naturally fade.
Archive
Intelligent archival. Identifies memories eligible for cold storage, compresses them, creates an archive manifest with keywords, and tags them as archived. Archived memories can be restored later.
Best for: Long-running characters accumulating memories they rarely access. Moves old content out of active search while keeping it restorable.
Running Cortex
Manual Execution
- Open the Cortex tab in the QUI Core dashboard
- Select a character
- Choose a mode
- For Hyperfocus: enter the topic filter
- Click Run Now
The execution progress appears in the jobs panel. You can monitor which processors are running and see results as they complete.
Scheduled Execution
Individual processors can be scheduled via cron expressions. Default schedules are configured per processor — for example, decay runs daily at 2 AM, cleanup runs daily at 5 AM, and conversation rollup runs weekly.
Schedules can be customized per character in the Cortex tab or via the Anima Visual Builder's Cortex nodes.
Snapshots and Revert
Before every mode execution, Cortex creates a snapshot of the character's memory state. If a mode produces unexpected results, you can revert to the snapshot from the Cortex tab.
Snapshots auto-expire after 7 days.
Exception: Metalhead mode is NOT reversible — it permanently deletes data rather than archiving it.
Processors Under the Hood
Each mode runs a pipeline of processors. There are 22 processors total, including:
- deep_memory — time-based L0→L1 compression
- compress — semantic similarity grouping
- string_rollup — conversation summarization
- pattern_clustering — association graph management
- straighten — duplicate and contradiction detection
- decay — time-based importance reduction
- focus_melt — AI-powered importance re-evaluation
- topic_cluster — topic-focused consolidation
- cleanup — maintenance and pruning
- analysis — insight extraction using 7 built-in profiles
- sentiment_analysis — emotional content detection
- synthesis — combine analyses into narratives
You don't need to understand individual processors to use modes — modes are pre-configured pipelines designed for specific purposes.
Configuration
Cortex processing is configured per character through the Anima Visual Builder. Add Cortex processor and mode nodes to the character's canvas to:
- Enable or disable specific processors
- Customize processor settings (thresholds, batch sizes, age limits)
- Set up scheduled processing
- Choose which modes are available for manual runs
If no Cortex configuration is set on a character, default settings apply (fail-open).