How OpenSoul is structured — from startup chain to core data flow.
Messages flow from channels through the Gateway to the agent runtime and back.
How the gateway boots from the entry point to a fully running server.
opensoul.mjssrc/entry.tscli/programgateway/server
The gateway process initializes sidecars for channels, cron jobs, hooks, discovery, and
browser control — all orchestrated from src/gateway/server.impl.ts.
How a message travels through the system.
src/routing/resolve-route.ts determines the target agent, workspace, and
session
The building blocks of the OpenSoul monorepo.
HTTP & WebSocket server, orchestration layer, sidecar management (channels, cron, hooks, discovery, browser control).
Session execution, tool injection, model provider integration, context window management.
Message-to-agent/session resolution. Supports identity links, thread parents, channel overrides, and multi-agent routing.
Plugin discovery, loading, registry, and runtime API. Powers the extension system for channels, tools, hooks, and providers.
Channel adapters implementing the ChannelPlugin contract. Each channel is
a separate extension package.
Long-term memory with embedded SQLite + sqlite-vec for vector search. Stores conversations, embeddings, and metadata.
JSON5 config with includes, ${ENV} substitution, Zod validation, and
per-plugin schema merging.
Browser dashboard built with Lit 3 + Vite. Chat, configuration, session management, and node pairing interface.
Commander-based CLI with clack/prompts for interactive flows. Manages gateway, channels, onboarding, and diagnostics.
macOS (SwiftUI), iOS, Android, and Windows desktop clients. Shared protocol layer in
apps/shared/.
Shared error types, logging (createSubsystemLogger), secret redaction,
and cross-cutting utilities.
Public API surface for external extensions. Import from
opensoul/plugin-sdk — never from internal src/* modules.
High-level directory structure of the pnpm monorepo.
opensoul/
├── src/ Core gateway, agent runtime, routing, config, plugins
├── extensions/ Channel/provider/hook extension packages (30+)
├── ui/ Web Control UI (Lit + Vite)
├── skills/ 50+ built-in skills
├── docs/ User and reference documentation
├── apps/ Native clients (Android, iOS, macOS, Windows)
├── packages/ Shared packages and protocol definitions
├── scripts/ Build, release, test, and tooling scripts
├── test/ E2E and integration test suites
└── tools/ Internal development tools
Check out the source code or start building extensions.