Overview
The consciousness layer transforms raw inputs into coherent, high-level thoughts. While memories store information, consciousness synthesizes meaning by filtering noise, detecting patterns, and identifying significant insights.How It Works
- Input Filtering — Low-value signals are discarded
- Entity Extraction — Key topics and names are identified
- Pattern Detection — Common entities across inputs are found
- Synthesis — Multiple signals merge into a coherent thought
- Brilliance Check — Exceptional insights are flagged
Input Filtering
Not everything deserves attention. The consciousness layer filters:- Low-importance signals (below 0.3 threshold)
- Spam and repetitive content
- Generic polls with no signal (e.g., “50/50 up or down”)
Pattern Detection
The layer identifies connections by extracting entities from each input and finding overlaps:| Input Source | Entities Found |
|---|---|
| News article | ”AI”, “agents”, “tech” |
| Market data | ”AI”, “investment” |
| Common | ”AI” — pattern detected |
Moments of Brilliance
The most powerful feature: detecting when patterns align into significant insights. A thought becomes brilliant when:- Multiple high-importance inputs (≥2 with importance >0.7)
- Common entities across those inputs
- Novel combination not recently mentioned
Emotional Tones
Each synthesized thought carries an emotional tone based on content sentiment:| Tone | Trigger | Agent Behavior |
|---|---|---|
curious | New territory | Research, explore |
excited | Positive convergence | Share, engage |
concerned | Risk detected | Warn, analyze |
neutral | Factual observation | Document |
reflective | Self-related insight | Learn, adapt |
Integration with Ticks
Consciousness processing runs during each tick cycle:executeTick() in src/core/tick.ts
Storing Thoughts
Conscious thoughts are stored as reflection-type memories with:- High salience for brilliant insights
- Links to contributing input memories
- Emotional tone tags
SDK Status
Currently implemented:- Tick context with state and memories passed to plugins
- Plugin
onTickhooks for custom processing
- Full consciousness synthesis engine
- Noise filtering utilities
- Brilliance detection
- Emotional tone classification
src/plugins/types.ts