How yoheinakajima/pippin works
Main Components
a) Core Framework Layer:
• Activity Management System
• State Management System
• Memory System
• Web Server
• Main Loop Controller
b) External Integration Layer:
• OpenAI API Integration
• Twitter API Integration
• WebSocket Connection
c) Storage Layer:
• SQLite Database (memory.db)
• File System (for images/static content)
[Client Layer]
• ↑↓
[Web Server Layer]
• ↑↓
[Core Processing Layer]
• ↑↓
[Storage Layer]
Component Details
a) Client Layer:
• WebSocket connection for real-time updates
• Static asset serving (CSS, JS, images)
b) Web Server Layer:
• Flask server component (framework/server.py)
• WebSocket handler
• Route handlers for dashboard and logs
c) Core Processing Layer (Most Complex):
Activity System
• Activity Loader
• Activity Selector
• Activity Constraints Handler
• Individual Activities (show as grouped components)
State Management
• State Variables (energy, happiness, XP)
• State Update Handlers
Memory System
• Memory Storage Manager
• Embedding Generator
• Memory Query Engine
d) Storage Layer:
• SQLite Database
• File System Storage
Specific Implementation Details
Processes like:
Activity Selection Flow
Activity Selector → State Check → Constraint Check → Probability Calculation → Activity Execution
Memory Operation Flow
Activity → Memory Storage → Embedding Generation → Database Storage
Real-time Update Flow
Activity Updates → State Changes → WebSocket → Client Dashboard
Additional Elements
Include:
• Version information
• External API dependencies
• Configuration requirements (YAML files)
• Key file locations