đŗ Deployment
VexAI can be deployed via Docker (recommended) or natively with Node.js. Choose the method that fits your infrastructure.
Docker with SQLite (Recommended)
The fastest way to get VexAI running in production. SQLite requires zero database configuration.
git clone https://github.com/mrelmida/vexai.git
cd vexai
cp .env.example .env
# Edit .env with your Discord token + LLM API key
docker-compose up -d --build
docker-compose logs -f
docker-compose.yml
services:
vexai:
build: .
restart: unless-stopped
env_file: .env
volumes:
- ./data:/app/data
- ./skills:/app/skills
ports:
- "3847:3847" # webhook server (if enabled)
The data/ volume persists your database, config, and identity files across container restarts and upgrades.
Docker with PostgreSQL + pgvector
For production deployments that need advanced full-text search and native vector embeddings.
docker-compose -f docker-compose.postgres.yml up -d --build
docker-compose -f docker-compose.postgres.yml logs -f
This compose file includes a PostgreSQL + pgvector container alongside the bot, pre-configured with connection pooling and automatic schema migration.
The PostgreSQL compose file automatically sets DATABASE_TYPE=postgres and configures the connection URL. No manual database setup required.
Native Node.js
Run VexAI directly on your machine without containerization.
Prerequisites
- Node.js v22+: required for ESM and modern API support
- npm: ships with Node.js
npm install
npm run build
npm start
# Development with hot-reload:
npm run dev
Build Commands
| Command | Description |
|---|---|
npm run build | Compile TypeScript â dist/ |
npm run dev | Run with hot-reload (tsx watch) |
npm start | Run compiled dist/index.js |
npm run typecheck | Type check without emitting (npx tsc --noEmit) |
Project Structure
src/
bot/ # Core Discord client, message handling
agents/ # Specialized agent system
sub-agents/ # Background agent execution
workflows/ # Workflow automation engine
events/ # Event-driven reaction system
llm/ # Multi-provider LLM abstraction
skills/ # Modular skill framework (22 built-in)
integrations/ # External service connectors
voice/ # Voice and audio processing
security/ # Security observer and access control
cache/ # Performance caching layer
database/ # Database abstraction (SQLite + PostgreSQL)
identity/ # Bot personality and memory files
config/ # Zod-validated configuration
logging/ # Winston structured logging
utils/ # Shared utilities
types/ # TypeScript declarations
data/ # Runtime data (database, identity, user data)
skills/ # User-created hot-loadable skills
Production Tips
- Use Docker: consistent environment, automatic restarts, and simple upgrades
- Enable PostgreSQL: recommended for high-traffic servers with concurrent users
- Cheaper observer model: configure a separate, less expensive model for the security observer to reduce costs
- Reverse proxy: place the webhook server behind nginx or Caddy with HTTPS termination
- Monitor logs: VexAI uses Winston structured logging; pipe to your preferred log aggregator
Always back up your data/ directory before updates. It contains your database, configuration, identity files, and user memory.