Ralph Integration
How Ralph's autonomous iteration patterns integrate with the Nity agent system.
Ralph's Role
Ralph provides the learning layer — cross-adapter effectiveness tracking, the SimpleMem memory substrate, and the Voyager brain/skills integration. Ralph doesn't execute tasks; it optimizes how they're executed.
Integration Points
1. Cross-Adapter Learning
Ralph tracks adapter performance across task categories and feeds recommendations into strategy planning:
StrategyPlanner.plan(analysis)
└─→ RalphUniversal.getRecommendation(taskCategory)
→ { adapter: 'claude-sonnet', confidence: 87, reason: '...' }The effectiveness matrix is updated after every episode:
EpisodeRecorder.record(episode)
└─→ RalphUniversal.recordUsage(category, adapter, outcome)
→ update matrix, recalculate success rates2. SimpleMem Memory Substrate
SimpleMem provides the persistence layer that both Ralph and Nity depend on:
┌─────────────────┐ ┌─────────────────┐
│ Nity Memory │ │ Ralph Universal │
│ (brain, eps) │ │ (effectiveness) │
└────────┬────────┘ └────────┬─────────┘
│ │
└───────────┬───────────┘
│
┌──────▼──────┐
│ SimpleMem │
│ Bridge │
└──────┬──────┘
│
┌──────▼──────┐
│ Python CLI │
└─────────────┘Both systems write to and read from the same SimpleMem instance, using different namespaces:
episodes— Nity's episode recordingsbrain— Session brain stateralph— Adapter effectiveness data
3. Voyager Brain/Skills Integration
Ralph's Voyager module extends the brain concept with skill-level context:
| Feature | Nity Brain | Ralph Voyager |
|---|---|---|
| Scope | Session | Cross-session |
| Content | Observations, decisions | Skills, patterns, strategies |
| Persistence | .voyager/brain.md | .voyager/skills/ |
| Loading | On session start | On skill activation |
The integration works through the skill registry:
TaskAnalyzer.analyze(task)
└─→ SkillRegistry.match(task)
└─→ loads from .voyager/skills/
└─→ injects skill-specific contextData Flow
task completion
│
├─→ Nity records episode
│ └─→ SimpleMem.store('episodes', ...)
│
├─→ Ralph records adapter usage
│ └─→ SimpleMem.store('ralph', ...)
│
└─→ next session starts
│
├─→ Ralph loads effectiveness matrix
│ └─→ SimpleMem.query('ralph', ...)
│
└─→ StrategyPlanner uses recommendations
└─→ better adapter selectionRalph's learning is cumulative. Each session contributes data that improves future sessions. The effectiveness matrix converges over time — early sessions use heuristics, later sessions use data-driven recommendations.