Configuration

⚙️ Configuration

Complete reference for every VexAI configuration option, from the config file schema to runtime slash commands covering all 81 configurable paths.

Config File Structure

VexAI stores its configuration in data/config.json. The file is auto-created on first boot with all default values when you run the setup wizard. The schema is validated at startup using Zod, so any invalid values will prevent the bot from starting.

Location: data/config.json (relative to project root). This file is created by the setup wizard and should not be committed to version control.

Complete Example

{
  "discord": {
    "token": "MTIz...your-bot-token",
    "adminUserIds": ["123456789012345678"]
  },
  "llm": {
    "provider": "openai",
    "apiKey": "sk-...",
    "model": "gpt-4o",
    "baseUrl": "https://api.openai.com/v1"
  },
  "security": {
    "enabled": true,
    "exemptTools": [],
    "alertChannelId": "987654321098765432",
    "llm": {
      "provider": "openai",
      "apiKey": "sk-...",
      "model": "gpt-4o-mini"
    }
  },
  "conversationWindow": 50,
  "integrations": {
    "webhookServer": {
      "enabled": false,
      "port": 3847,
      "baseUrl": "https://hooks.example.com"
    },
    "github": {
      "token": "ghp_..."
    },
    "openmail": {
      "enabled": false,
      "apiKey": "om_...",
      "inboxId": "inbox-id",
      "approvalChannelId": "111222333444555666",
      "autoCreateApprovalChannel": true,
      "wsEnabled": false
    }
  },
  "voice": {
    "enabled": false,
    "tts": {
      "enabled": false,
      "provider": "openai",
      "apiKey": "sk-...",
      "model": "tts-1",
      "voice": "alloy"
    },
    "stt": {
      "enabled": false,
      "provider": "whisper-api",
      "apiKey": "sk-...",
      "model": "whisper-1"
    },
    "assistant": {
      "enabled": false,
      "wakeWord": "hey vex",
      "wakeAliases": [],
      "respondWithText": false,
      "maxHistoryTurns": 10,
      "idleTimeout": 300
    }
  },
  "database": {
    "type": "sqlite",
    "url": "postgresql://user:pass@localhost:5432/vexai",
    "pool": { "min": 2, "max": 10 }
  },
  "embeddings": {
    "enabled": false,
    "provider": "builtin",
    "model": "Xenova/all-MiniLM-L6-v2",
    "dimensions": 384,
    "batchSize": 50
  },
  "subAgents": { "enabled": false },
  "workflows": { "enabled": false },
  "thinking": {
    "enabled": true,
    "pollIntervalMs": 4000,
    "model": null
  }
}

Runtime Configuration Commands

VexAI exposes a /config slash command for live configuration management without editing files.

Command Description
/config view [section] View current config. Sensitive values are masked: tokens show first/last 4 characters only.
/config set <key> <value> Set a config value using dot notation (e.g. voice.enabled true, llm.model gpt-4o). Autocomplete for all 81 paths with type validation.
/config reset <key> Reset a config value to its schema default.
Restart required: Changes to llm, database, and embeddings require a bot restart to take effect. Changes to security, voice, subAgents, and workflows take effect immediately.

Examples

# View the full config (masked)
/config view

# View just the voice section
/config view voice

# Change the LLM model
/config set llm.model gpt-4o

# Enable the security observer
/config set security.enabled true

# Reset conversation window to default (50)
/config reset conversationWindow

All Configuration Paths

Complete reference for every configurable path. Paths use dot notation for nested values. A dash (-) in the Default column means the value is required or has no default.

Discord

PathTypeDefaultDescription
discord.tokenstring-Bot token (read-only, set during setup)
discord.adminUserIdsarray-Admin user IDs (read-only, set during setup)

LLM

PathTypeDefaultDescription
llm.providerenum-openai, anthropic, openrouter, openai-compatible
llm.apiKeystring-Provider API key
llm.modelstring-Model name (e.g. gpt-4o, claude-sonnet-4-20250514)
llm.baseUrlstring-Custom base URL (required for openai-compatible)

Security

PathTypeDefaultDescription
security.enabledbooleantrueEnable security observer
security.exemptToolsarray[]Tools that skip security review
security.alertChannelIdstring-Channel ID for security alerts

Security LLM

Optional separate LLM provider for the security observer. If omitted, the main LLM is used.

PathTypeDefaultDescription
security.llm.providerenum-Observer LLM provider
security.llm.apiKeystring-Observer API key
security.llm.modelstring-Observer model
security.llm.baseUrlstring-Observer base URL

General

PathTypeDefaultDescription
conversationWindownumber50Max messages kept in conversation context

Webhooks

PathTypeDefaultDescription
integrations.webhookServer.enabledbooleanfalseEnable webhook server
integrations.webhookServer.portnumber3847Webhook server port
integrations.webhookServer.baseUrlstring-Public URL for inbound webhooks

GitHub

PathTypeDefaultDescription
integrations.github.tokenstring-Personal access token for GitHub tools

OpenMail

PathTypeDefaultDescription
integrations.openmail.enabledbooleanfalseEnable OpenMail integration
integrations.openmail.apiKeystring-OpenMail API key
integrations.openmail.inboxIdstring-Inbox ID
integrations.openmail.approvalChannelIdstring-Approval channel ID
integrations.openmail.autoCreateApprovalChannelbooleantrueAuto-create approval channel if missing
integrations.openmail.wsEnabledbooleanfalseEnable WebSocket real-time updates

Voice

PathTypeDefaultDescription
voice.enabledbooleanfalseEnable voice features

TTS (Text-to-Speech)

PathTypeDefaultDescription
voice.tts.enabledbooleanfalseEnable text-to-speech
voice.tts.providerenum-openai, google, elevenlabs, local
voice.tts.apiKeystring-TTS provider API key
voice.tts.baseUrlstring-TTS endpoint URL
voice.tts.modelstring-TTS model name
voice.tts.voicestring-Voice name/ID

STT (Speech-to-Text)

PathTypeDefaultDescription
voice.stt.enabledbooleanfalseEnable speech-to-text
voice.stt.providerenum-whisper-api, google, local
voice.stt.apiKeystring-STT provider API key
voice.stt.baseUrlstring-STT endpoint URL
voice.stt.modelstring-STT model name

Voice Assistant

PathTypeDefaultDescription
voice.assistant.enabledbooleanfalseEnable voice assistant
voice.assistant.wakeWordstring"hey vex"Primary wake word
voice.assistant.wakeAliasesarray[]Alternative wake words
voice.assistant.respondWithTextbooleanfalseAlso send responses to a text channel
voice.assistant.textChannelIdstring-Text channel for written responses
voice.assistant.maxHistoryTurnsnumber10Conversation history turns to keep
voice.assistant.idleTimeoutnumber300Idle timeout in seconds before auto-disconnect

Database

PathTypeDefaultDescription
database.typeenumsqlitesqlite or postgres
database.urlstring-PostgreSQL connection URL
database.pool.minnumber2Minimum pool connections
database.pool.maxnumber10Maximum pool connections

Embeddings

PathTypeDefaultDescription
embeddings.enabledbooleanfalseEnable embedding-based semantic search
embeddings.providerenumbuiltinbuiltin, openai, openrouter, local
embeddings.apiKeystring-Embedding provider API key
embeddings.baseUrlstring-Custom embedding endpoint
embeddings.modelstringXenova/all-MiniLM-L6-v2Embedding model name
embeddings.dimensionsnumber384Vector dimensions
embeddings.batchSizenumber50Batch size for bulk embedding
embeddings.dailyLimitnumber-Daily API call limit

Sub-Agents

PathTypeDefaultDescription
subAgents.enabledbooleanfalseEnable the sub-agent system

Workflows

PathTypeDefaultDescription
workflows.enabledbooleanfalseEnable workflow automation

Thinking

PathTypeDefaultDescription
thinking.enabledbooleantrueShow thinking indicator while processing
thinking.pollIntervalMsnumber4000Indicator poll interval (ms, min 2000)
thinking.modelstring-Summarizer model (null = main chat model)

Voice Configuration Example

Full voice setup with local TTS (Kokoro), local STT (faster-whisper), and the voice assistant.

{
  "voice": {
    "enabled": true,
    "tts": {
      "enabled": true,
      "provider": "local",
      "baseUrl": "http://localhost:8880",
      "model": "kokoro",
      "voice": "af_heart"
    },
    "stt": {
      "enabled": true,
      "provider": "local",
      "baseUrl": "http://localhost:8000",
      "model": "large-v3-turbo"
    },
    "assistant": {
      "enabled": true,
      "wakeWord": "hey vex",
      "wakeAliases": ["yo vex", "okay vex"],
      "respondWithText": true,
      "textChannelId": "123456789012345678",
      "maxHistoryTurns": 15,
      "idleTimeout": 600
    }
  }
}
Tip: When using local providers, you don't need API keys. Just point baseUrl to your local TTS/STT server. Kokoro and faster-whisper both expose OpenAI-compatible endpoints.

Provider Comparison

ProviderTTSSTTNotes
openai-Best quality, cloud-only, requires API key
googleCloud-based, good multilingual support
elevenlabs-Premium voice cloning, cloud-only
whisper-api-OpenAI Whisper API endpoint
localSelf-hosted, no API key needed, lowest latency

Database & Embeddings

VexAI supports SQLite (default, zero-config) and PostgreSQL for multi-instance deployments. Embeddings enable semantic search over conversation history and documents.

{
  "database": {
    "type": "sqlite"
  },
  "embeddings": {
    "enabled": true,
    "provider": "builtin",
    "model": "Xenova/all-MiniLM-L6-v2",
    "dimensions": 384,
    "batchSize": 50
  }
}

SQLite uses a file at data/vexai.db with WAL mode for concurrent reads. No additional setup required.

Embedding Provider Comparison

ProviderModelDimensionsNotes
builtinXenova/all-MiniLM-L6-v2384Runs locally, no API key, good for small servers
openaitext-embedding-3-small1536Best quality, cloud-based, costs per token
openroutervariesvariesMultiple providers via single API key
localcustomcustomSelf-hosted embedding server

Integration Configuration

Webhook Server

The inbound webhook server lets external services trigger VexAI actions via HTTP.

{
  "integrations": {
    "webhookServer": {
      "enabled": true,
      "port": 3847,
      "baseUrl": "https://hooks.example.com"
    }
  }
}
baseUrl is the publicly-accessible URL that external services will use to send webhooks to VexAI. This is typically your server's domain or a reverse proxy URL.

GitHub

A personal access token enables GitHub tools (repository management, issue tracking, PR reviews).

{
  "integrations": {
    "github": {
      "token": "ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
    }
  }
}
Tip: Create a fine-grained personal access token with only the permissions VexAI needs. See GitHub docs.

OpenMail

OpenMail integration adds email management with approval workflows, including send, reply, and manage emails through Discord.

{
  "integrations": {
    "openmail": {
      "enabled": true,
      "apiKey": "om_xxxxxxxxxxxxxxxxxxxx",
      "inboxId": "inbox_abc123",
      "approvalChannelId": "111222333444555666",
      "autoCreateApprovalChannel": true,
      "wsEnabled": true
    }
  }
}
Approval required: All outbound emails go through the approval channel before being sent. An admin must react with the approval emoji to send the email.