Use this file to discover all available pages before exploring further.
The cortex is the agent’s inner monologue. The only process that sees across all channels, workers, and branches simultaneously. Its primary job: generate the memory bulletin — a periodically refreshed, LLM-curated summary of the agent’s knowledge injected into every conversation.
Runs on a configurable interval (default 60 min). Uses memory_recall to query across multiple dimensions (identity, events, decisions, preferences), synthesizes into a ~500 word briefing.
2
Supervise running processes
Monitors channels, branches, and workers. Detects hanging workers, cleans up stale branches.
You are the cortex. Generate a brief memory bulletin.Recall memories across these dimensions:- Identity (who the user is, who the agent is)- Recent events (what happened recently)- Active goals (what the user wants to achieve)- Important decisions (choices that were made)- Key preferences (what the user likes/dislikes)Synthesize into a 500-word briefing.Focus on:- High-importance memories- Recent activity- Ongoing goals- Core identity factsExclude:- Low-importance observations- Stale events- Forgotten memories
The cortex uses memory_recall to query each dimension:
# Memory BulletinGenerated: 2024-03-15 14:30:00 UTC## IdentityThe user is a software engineer based in San Francisco. Works primarily with Rust and TypeScript. Prefers functional programming patterns.## Recent Activity- Completed refactor of authentication module (2024-03-14)- Researching best practices for distributed systems (ongoing)## Active Goals- Launch new API v2 by end of month- Learn more about consensus algorithms## Preferences- Prefers tabs over spaces- Uses Neovim as primary editor- Likes detailed technical explanations
If the same fact appears in multiple channels, consolidate:
let similar_across_channels = store .find_similar_across_channels(0.9) .await?;for cluster in similar_across_channels { let canonical = pick_highest_importance(cluster); for duplicate in cluster { if duplicate.id != canonical.id { create_association( duplicate.id, canonical.id, RelationType::Updates ); store.forget(&duplicate.id).await?; } }}
The cortex creates observations from repeated behaviors:
if user_asked_about_rust_5_times_this_week { memory_save( "User is actively learning Rust", MemoryType::Observation, 0.6 );}if user_mentions_timezone_in_multiple_channels { memory_save( "User is based in America/New_York timezone", MemoryType::Identity, 0.9 );}
Branches inherit the bulletin from their channel’s context (it’s part of system prompt).Workers do not get the bulletin (they have no channel context).