-
Notifications
You must be signed in to change notification settings - Fork 5
Configuration
OpenSoul reads an optional JSON5 config from ~/.opensoul/opensoul.json (comments and trailing commas allowed).
If the file is missing, OpenSoul uses safe defaults: embedded agent + per-sender sessions + workspace at ~/.opensoul/workspace.
Place these in .env or ~/.opensoul/.env:
# Model provider API keys
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
OPENROUTER_API_KEY=
GEMINI_API_KEY=
MINIMAX_API_KEY=
OPENCODE_API_KEY=
ZAI_API_KEY=
# Gateway
OPENSOUL_GATEWAY_TOKEN= # Required for gateway startup
OPENSOUL_SKIP_CHANNELS=1 # Skip channel loading for local dev-
OPENSOUL_GATEWAY_TOKEN(orgateway.auth.token) is required for gateway startup. Without it, the process exits immediately. - Use
OPENSOUL_SKIP_CHANNELS=1for local development unless channel credentials are configured. - Config supports JSON5, file includes, and
${ENV}variable substitution.
{
channels: {
whatsapp: {
allowFrom: ["+15555550123"],
groups: { "*": { requireMention: true } },
},
telegram: {
allowFrom: ["username1"],
},
},
}{
agents: {
defaults: {
workspace: "~/.opensoul/workspace",
},
},
}{
agents: {
list: [
{
name: "main",
identity: {
displayName: "Soul",
description: "Your AI companion",
},
workspace: "~/.opensoul/workspace",
},
],
},
}{
messages: {
groupChat: {
mentionPatterns: ["@opensoul"],
},
},
}OpenSoul only accepts configurations that fully match the schema. Invalid config prevents the Gateway from starting.
When validation fails:
- The Gateway does not boot
- Run
opensoul doctorto see issues - Run
opensoul doctor --fixto apply repairs
Validates, writes the full config, and restarts the Gateway:
opensoul gateway call config.apply --params '{
"raw": "{ agents: { defaults: { workspace: \"~/.opensoul/workspace\" } } }",
"baseHash": "<hash-from-config.get>"
}'Merges a partial update without clobbering unrelated keys:
opensoul gateway call config.patch --params '{
"raw": "{ channels: { telegram: { groups: { \"*\": { requireMention: false } } } } }",
"baseHash": "<hash-from-config.get>"
}'The Gateway exposes a JSON Schema via config.schema. The Control UI renders a form from this schema with a Raw JSON editor as fallback.
- Getting Started — Quick setup guide
- Channels — Channel-specific configuration
- Troubleshooting — Common config issues
OpenSoul — Your AI Soul Companion | MIT License | Documentation
Getting Started
Core Concepts
Usage
Development
Links