📦 System Overview

┌─────────────────────────────────────────────────────────┐
│                      Channels                            │
│   (Telegram, WhatsApp, Discord, CLI, Web Gateway)       │
└─────────────────────────┬───────────────────────────────┘
                          ▼
┌─────────────────────────────────────────────────────────┐
│                    Agent Core                            │
│  ┌─────────────┐  ┌──────────────┐  ┌───────────────┐  │
│  │  Decision   │  │   Memory     │  │   Scheduler   │  │
│  │   Engine    │  │   Manager    │  │   (Heartbeat) │  │
│  └─────────────┘  └──────────────┘  └───────────────┘  │
└─────────────────────────┬───────────────────────────────┘
                          ▼
┌─────────────────────────────────────────────────────────┐
│                 Skills & Tools                           │
│   (Browser, File System, Search, Messaging, Plugins)    │
└─────────────────────────┬───────────────────────────────┘
                          ▼
┌─────────────────────────────────────────────────────────┐
│                    Providers                             │
│     (OpenAI, Google, Bedrock, NVIDIA, OpenRouter)       │
└─────────────────────────────────────────────────────────┘

📁 Data Paths

OrcBot stores all data in ~/.orcbot/ by default:

PathPurpose
orcbot.config.yamlMain configuration file
memory.jsonShort-term and episodic memories
action-queue.jsonPending tasks queue
profiles/Contact profiles (per-JID)
plugins/Custom skill plugins
browser-profiles/Persistent browser sessions
downloads/Downloaded media files

🧠 Decision Engine

The decision engine builds context from memories, skills, and channel metadata, then calls the LLM to determine the next action. It supports multi-tool responses.

💾 Memory Manager

Manages short-term memories with automatic consolidation into episodic summaries after 30 entries. Retrieval is capped for context window efficiency.

⏰ Scheduler

Emits scheduler:tick events for background jobs. Heartbeat tasks, polling jobs, and autonomy checks all run through the scheduler.

🔌 Event Bus

Central pub/sub system for decoupled communication. Components subscribe to events like config:changed, action:push, etc.

🔄 Request Flow

  1. Inbound: Message arrives via channel (Telegram, WhatsApp, etc.)
  2. Memory: Message stored in short-term memory with context
  3. Decision: Decision engine builds prompt with memories, skills, channel context
  4. LLM Call: MultiLLM routes to appropriate provider based on model name
  5. Parse: Parser layer extracts tools array from JSON response
  6. Execute: Skills manager executes each tool in sequence
  7. Respond: Results sent back through the originating channel