Skip to main content
The service is OpenBunny’s core component. It connects to messaging channels, processes conversations with an LLM agent, and manages tasks, contacts, and reminders through a REST API.

What it does

  • Listens to 5 messaging channels: Slack, WhatsApp, iMessage, Telegram, Gmail
  • Processes conversations using a multi-turn LLM agent with tool use
  • Manages tasks with priorities, labels, requesters, and reminders
  • Tracks contacts across channels with identity linking
  • Searches tasks using hybrid search (BM25 + semantic embeddings + LLM reranking)
  • Exposes a REST API on port 3100 and an MCP server

Tech stack

ComponentTechnology
RuntimeNode.js 22+
FrameworkHono
DatabaseSQLite 3 (WAL mode)
LLMOpenRouter API
SearchQMD (hybrid search)
Buildesbuild + tsx

How processing works

The service uses a scheduler that runs on a configurable interval (default: 60 seconds). Each tick:
  1. Scans for conversations that have been quiet for the debounce period (default: 5 minutes)
  2. Claims conversations atomically to prevent double-processing
  3. Sends conversation context to the LLM agent
  4. The agent uses tools to create tasks, update tasks, manage contacts, or ignore the conversation
  5. Results are persisted to the configured backend
The agent can make up to 10 tool-use iterations per conversation before finalizing its decision.

Project structure

service/
├── src/
│   ├── index.ts              # Startup orchestration
│   ├── cli.ts                # CLI for channel management
│   ├── agent/                # LLM agent loop and tools
│   ├── api/                  # Hono REST API + MCP server
│   ├── channels/             # Channel listeners
│   ├── contacts/             # Contact backend abstraction
│   ├── tasks/                # Task backend abstraction
│   ├── db/                   # SQLite + migrations
│   ├── llm/                  # OpenRouter client
│   ├── search/               # QMD search client
│   ├── scheduler/            # Conversation processing loop
│   ├── reminders/            # Decision + schedule engines
│   ├── prompts/              # Agent system prompts
│   ├── lib/                  # Logger, utilities
│   └── types/                # TypeScript interfaces
├── data/                     # SQLite DB, contacts, policies
└── scripts/                  # Setup and maintenance

Startup sequence

When the service starts, it runs these steps in order:
  1. Validate environment variables
  2. Initialize SQLite database and run migrations
  3. Initialize QMD search index
  4. Start enabled channel listeners
  5. Start SSE bridge for remote email notifications
  6. Start the conversation processing scheduler
  7. Start the reminder decision engine (if enabled)
  8. Start the task-level schedule poller
  9. Start the REST API server on port 3100