Your AI Soul Companion — Chat, Collaborate, Create
Self-hosted AI agent gateway across WhatsApp, Telegram, Discord, Slack, iMessage, and 30+ channels.
One gateway, multiple channels, full control over data, routing, and extensibility.
Overview • What's New • Features • Architecture • Repository Layout • Tech Stack • Quick Start • Configuration • Developer Workflow • Testing • Extensions • Troubleshooting • Docs
OpenSoul is a self-hosted AI agent gateway. Run one gateway process and talk to the same agent across WhatsApp, Telegram, Discord, Slack, iMessage, and many more channels.
It is a local-first control plane: channel adapters connect into one runtime where you control model routing, memory, tools, and security boundaries.
Based on recent updates in CHANGELOG:
- Session transcripts: load and review past conversation history directly from the Control UI.
- Create Soulmate modal: streamlined agent creation workflow in the Control UI.
- Gateway reconnect: automatic WebSocket reconnection after connection drops.
- Onboarding improvements: better MiniMax support, empty-response error visibility, and localized config forms.
- Developer experience: enhanced CLI dev defaults, GitHub workflow validation, and repo cleanup.
- Windows desktop client: native installer with system proxy detection (v0.2.3).
| Category | Channels |
|---|---|
| Messaging | WhatsApp · Telegram · Signal · iMessage · Matrix · Mattermost · Zalo |
| Collaboration | Slack · Discord · Microsoft Teams · Lark (Feishu) · LINE |
| Web + API | Web Control UI · WebChat · REST API · WebSocket |
| Voice + Media | Voice Call · Audio · Images · Documents |
- Multi-model routing (OpenAI, Anthropic, Gemini, Bedrock, Ollama, MiniMax, OpenRouter, and more)
- Session isolation by sender/workspace
- Long-term memory with vector search
- Tool execution, sandboxing, and plugin-driven extensibility
- 50+ built-in skills in skills/
- Integrations for GitHub, Notion, Obsidian, Canvas, tmux, browser automation, and more
- Public plugin SDK for custom channels, tools, hooks, and providers
- Native apps for macOS, iOS, Android, and Windows
- Web Control UI plus CLI/TUI workflows
flowchart LR
A["Channels / Channel Plugins"] --> B["Gateway"]
B --> C["Agent Runtime (pi-ai)"]
B --> D["Memory & Storage"]
B --> E["Skills & Tools"]
B --> F["Web Control UI"]
B --> G["CLI / TUI"]
B --> H["Native Apps"]
| Module | Path | Responsibility |
|---|---|---|
| Gateway | src/gateway | HTTP/WS server, orchestration, sidecars |
| Agent Runtime | src/agents | Session execution, tool injection, runtime integration |
| Routing | src/routing | Message-to-agent/session resolution |
| Plugins | src/plugins | Discovery, loading, registry, runtime API |
| Channels | src/_ + extensions/_ | Channel adapters and protocol integration |
| Memory | src/memory | Long-term memory and storage |
| Web UI | ui/ | Control UI (Lit + Vite) |
| Apps | apps/ | Native mobile/desktop clients |
src/ Core gateway, agent runtime, routing, config, plugins
extensions/ External channel/provider/hook plugins
ui/ Web Control UI assets and app
skills/ Built-in skills
docs/ User and reference documentation
apps/ Native clients (Android/iOS/macOS/Windows)
scripts/ Build, release, test, and tooling scripts
| Layer | Version |
|---|---|
| Node.js | >= 22.12.0 |
| pnpm | 10.23.0 |
| TypeScript | 5.9.3 |
| Web UI | Lit 3.3.2 + Vite |
| API Server | Hono 4.11.10 / Express 5.2.1 |
| Testing | Vitest 4.0.18 |
| Lint / Format | Oxlint 1.43.0 + Oxfmt 0.28.0 |
- Node.js >= 22
- pnpm
git clone https://github.com/NJX-njx/opensoul.git
cd opensoul
pnpm install
pnpm build# Skips channels that require external credentials
export OPENSOUL_SKIP_CHANNELS=1
export OPENSOUL_GATEWAY_TOKEN=dev-token
pnpm gateway:dev$env:OPENSOUL_SKIP_CHANNELS = "1"; $env:OPENSOUL_GATEWAY_TOKEN = "dev-token"; node scripts/run-node.mjs --dev gatewayopensoul onboard
opensoul gateway runYou can place these in .env or ~/.opensoul/.env:
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
OPENROUTER_API_KEY=
GEMINI_API_KEY=
MINIMAX_API_KEY=
OPENCODE_API_KEY=
ZAI_API_KEY=
OPENSOUL_GATEWAY_TOKEN=See Environment for loading order and precedence.
OPENSOUL_GATEWAY_TOKEN(orgateway.auth.token) is required for gateway startup.- Prefer
OPENSOUL_SKIP_CHANNELS=1for local development unless channel credentials are configured. - Config supports JSON5, includes, and
${ENV}substitution.
pnpm install
pnpm build
pnpm dev
pnpm gateway:dev
pnpm check
pnpm testAfter changing ui/:
- Run
pnpm ui:build - Restart gateway to refresh served control UI assets
pnpm check= type-check + lint + format-checkpnpm check:locuses repository limits:--max 2000 --max-function 150
- Main test entry:
pnpm test - Config variants:
vitest.config.ts,vitest.e2e.config.ts,vitest.gateway.config.ts,vitest.extensions.config.ts,vitest.live.config.ts - Docker/e2e suites are available under
scripts/e2e/andtest:docker:*scripts
- Place extensions under
extensions/<name>/ - Use
opensoul/plugin-sdkas the public API surface - Do not import internal
src/*modules from external extensions - Typical extension package includes
opensoul.plugin.jsonandindex.ts
| Symptom | Likely Cause | Fix |
|---|---|---|
| Gateway exits immediately | Missing gateway token | Set OPENSOUL_GATEWAY_TOKEN or gateway.auth.token |
| Gateway dev fails on channel startup | Missing external channel credentials | Use OPENSOUL_SKIP_CHANNELS=1 for local dev |
| Port conflict | Port already in use | Change gateway.port or run pnpm test:force cleanup |
| API keys not available in service run | Shell env not inherited | Put keys in ~/.opensoul/.env or enable env.shellEnv |
- Wiki — Comprehensive project knowledge base
- Getting Started
- Gateway Configuration
- Channels
- Skills & Tools
- Model Providers
- Web Control UI
- Contributing Guide
- Code of Conduct
- Maintainer: NJX-njx
- Contributors: GitHub Contributors
MIT License — see LICENSE for details. Built upon OpenClaw (MIT).
If OpenSoul helps you, please consider giving the project a ⭐ on GitHub.
