1.7 KiB
1.7 KiB
Pi-Kugetsu Integration: One-Pager
Overview
Replacing OpenCode with Pi (agent-core) in Kugetsu for better memory, reliability, and control.
Key Metrics
| Metric | OpenCode | Pi | Improvement |
|---|---|---|---|
| Memory/agent | 340MB | ~80MB | 70% less |
| Max concurrent | 5 | 15-20 | 3-4x |
| Context isolation | ❌ | ✅ | No poisoning |
| Checkpoint | ❌ | ✅ | Crash recovery |
Architecture
Telegram → Hermes → Kugetsu-Pi → Shadows → Worktrees
What's Implemented
| Level | Status | Description |
|---|---|---|
| Level 1 | ✅ | Basic Pi agent |
| Level 2 | ✅ | Shadow + Manager + Tools |
| Level 3 | ✅ | Queue + Checkpoint + Context |
| Level 4 | ✅ | Hermes HTTP tool |
Components
- Shadow: Isolated agent instance
- Shadow Manager: Spawn/terminate/track
- Queue: Priority + backpressure
- Checkpoint: Save/restore state
- Context Manager: Pruning/compression
Quick Commands
# Test basic agent
npx tsx level1.ts
# Test Shadow + Manager
npx tsx level2.ts
# Test queue system
npx tsx level3c.ts
# Start HTTP server
npx tsx level4.ts
Integration Options
| Option | Description | Best For |
|---|---|---|
| HTTP Server | Hermes → Tool → HTTP → Pi | Production |
| Direct Spawn | Hermes → Tool → Spawn Pi | POC/Simple |
Files
README.md- Full overviewimplementation-plan.md- Roadmaphermes-tool-guide.md- Tool integrationqueue-research.md- Queue optionsllm-compression-research.md- Compression LLMs
Next Steps
- Test Hermes integration
- Direct spawn alternative
- Production hardening
Last updated: 2026-04-08