How fatduckai/ai works
Main Components
a) Core System Layer:
• AI Core Manager (src/core/ai.ts)
• Character Management System (src/core/managers/character.ts)
• Memory Management System (src/core/managers/memory.ts)
• LLM Provider Interface (src/core/managers/llm.ts)
• Event System (src/core/services/Event.ts)
• Quantum State Manager (src/core/services/quantum-state.ts)
b) Platform Integration Layer:
• Telegram Integration (src/core/platform/telegram)
• Twitter Integration (src/core/platform/twitter)
• API Server (src/core/platform/api)
c) Database Layer:
• SQL Database (using Drizzle ORM)
• Migration System
• Schema Definitions
d) Tools & Utilities:
• Token Management
• Real-time Data Tools (e.g., BTC price)
• IBM Quantum Integration
┌─────────────────────────────────────────────────────────┐
• Client Platforms │
• (Twitter, Telegram, API Endpoints) │
• ┤
• Platform Adapters │
• (Format-specific handlers and response types) │
• ┤
• Core System │
• ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ │
• AI Manager │ │ Character │ │ Memory │ │
• ◄─►│ Manager │◄─►│ Manager │ │
• ┘ └──────────────┘ └──────────────┘ │
• ┌─────────────┐ ┌──────────────┐ ┌──────────────┐ │
• Event │ │ Quantum │ │ Tools │ │
• System │◄─►│ State │◄─►│ Manager │ │
• ┘ └──────────────┘ └──────────────┘ │
• ┤
• Database Layer │
• (Character Data, Interactions, Memory Storage) │
• ┘
Data Flow Indicators
• Character interaction flow
• Memory management processes
• Platform-specific response formatting
• Tool integration points
• Database operations
Component Relationships
• Character Manager ↔ Memory Manager
• AI Core ↔ Platform Adapters
• Tools Manager ↔ External Services
• Event System ↔ All Components
• Quantum State ↔ Character Personality
Additional Elements
• Character creation flow
• Interaction processing pipeline
• Platform-specific response formatting
• Memory management system
• Tool integration process