How erikbjare/gptme works
Main Components
a) Core System Components:
• CLI Interface (Entry Point)
• LLM Provider Integration Layer
• Tool Management System
• Message/Chat Management
• Configuration System
• Web Server (Optional Component)
b) External Integrations:
• LLM Providers (OpenAI, Anthropic, OpenRouter)
• Browser Integration (Playwright)
• File System
• Shell Environment
• Vision Processing
• GitHub Integration
Component Relationships
┌─ User Interface Layer ─────────────────────┐
• CLI Interface │
• Web UI (Optional) │
• ┬────────────────────────┘
• ↓
┌─ Core Service Layer ──────────────────────┐
• Chat Manager │
• Tool Orchestrator │
• Configuration Manager │
• ┬────────────────────────┘
• ↓
┌─ Tool Layer ──────────────────────────────┐
• Shell Python Browser Vision Patch │
• GitHub RAG TMux Save Read │
• ┬────────────────────────┘
• ↓
┌─ Integration Layer ─────────────────────────┐
• LLM Providers (OpenAI, Anthropic, etc.) │
• External Services (GitHub, Browser) │
• ┘
Key Architectural Patterns to Highlight
a) Plugin Architecture:
• How the tool system is extensible
• Demonstrate tool registration and management
b) Message Flow:
• User input → CLI → Chat Manager → LLM → Tool Execution → Response
c) Configuration Management:
• How configuration flows through the system
• Environment variable handling
Specific Implementation Details
• Evaluation system architecture
• GitHub bot integration
• Demonstrate the computer use tool architecture
• Conversation persistence system
Component Details
CLI Interface:
┌─ CLI (gptme/cli.py) ─────────┐
• Command parsing │
• Interactive mode │
• Non-interactive mode │
• Tool management │
• ┬───────────────┘
• ↓
┌─ Chat Manager (gptme/chat.py) ┐
• Message handling │
• Conversation management │
• Tool coordination │
• ┘