Skip to main content
OMNI uses a modular architecture with clear separation of concerns.

System Overview

┌─────────────┐    ┌─────────────┐    ┌─────────────┐
│   Web App   │    │  Desktop    │    │   Mobile    │
│  (Next.js)  │    │  (Electron) │    │  (Future)   │
└──────┬──────┘    └──────┬──────┘    └──────┬──────┘
       │                  │                  │
       └──────────────────┼──────────────────┘


┌─────────────────────────────────────────────────────┐
│                 Agent Backend                        │
│  ┌───────────┐  ┌───────────┐  ┌───────────┐       │
│  │  Claude   │  │   Tools   │  │   MCP     │       │
│  │  Agent    │  │  System   │  │  Client   │       │
│  └───────────┘  └───────────┘  └───────────┘       │
└─────────────────────────┬───────────────────────────┘

       ┌──────────────────┼──────────────────┐
       ▼                  ▼                  ▼
┌─────────────┐    ┌─────────────┐    ┌─────────────┐
│  PostgreSQL │    │     R2      │    │   Claude    │
│  (Sessions) │    │  (Storage)  │    │   (API)     │
└─────────────┘    └─────────────┘    └─────────────┘

Agent Backend

The agent backend is the core service that powers OMNI’s AI capabilities.

Request Flow

1

Connect

Client connects via WebSocket
2

Authenticate

Authentication via JWT token
3

Route

Messages routed to agent
4

Process

Agent processes with Claude API
5

Execute

Tool calls executed
6

Stream

Responses streamed back

Key Components

ComponentPurpose
OmniAgentMain agent orchestration
ToolRegistryTool discovery and execution
McpManagerMCP server connections
PermissionManagerAccess control
SessionStorageSession persistence

Web App

Next.js application with:
  • Server components for initial render
  • Client components for interactivity
  • WebSocket for real-time updates
  • IndexedDB for offline support

Desktop App

Electron application that:
  • Embeds the web app
  • Provides native features (notifications, file access)
  • Secure token storage via OS keychain
  • Auto-updates via GitHub releases

Data Flow

Message Flow

User Input → WebSocket → Agent → Claude API

UI Update ← WebSocket ← Agent ← Response

Storage

Sessions

PostgreSQL for cross-device sync

Attachments

R2 for file storage

Credentials

OS keychain (desktop) or secure cookie (web)