Mirobody uses layered YAML configuration. This guide walks through every option and how to wire it up. Anything whose key contains _KEY, _PASSWORD, _PASS, _PWD, _SECRET, _SK, or _TOKEN is auto-encrypted on first load using your CONFIG_ENCRYPTION_KEY.
Configuration changes require restarting the application to take effect.
The ENV variable determines which config file to load:
ENV=localdb → loads config.localdb.yaml
ENV=production → loads config.production.yaml
2
Create your configuration file
Create config.localdb.yaml (or match your ENV value):
touch config.localdb.yaml
3
Configure essential settings
Add at least one LLM API key and configure agents:
config.localdb.yaml
# ============ LLM API Keys (At least one required) ============GOOGLE_API_KEY: '' # For Gemini modelsOPENAI_API_KEY: '' # For GPT modelsOPENROUTER_API_KEY: '' # For Claude, DeepSeek, etc.# ============ Agent Configuration ============MCP_TOOL_DIRS: - mirobody/pub/tools - mirobody/pub/tools_healthMCP_RESOURCE_DIRS: - mirobody/pub/resourcesAGENT_DIRS: - mirobody/pub/agents
Do not edit config.yaml - This is the base configuration file that should remain unchanged. All customizations go in your environment-specific file (e.g., config.localdb.yaml).
MixAgent runs two passes — a capable model orchestrates tools, a cheaper model writes the user-facing reply with the collected context. Useful when the orchestration phase needs sharper reasoning than the response phase:
# HTTP Server ConfigurationHTTP_SERVER_NAME: 'mirobody'HTTP_SERVER_VERSION: '1.0.1'HTTP_HOST: '0.0.0.0' # Listen on all interfacesHTTP_PORT: 18080 # Change if port is in useHTTP_URI_PREFIX: '' # Optional URL prefix# CORS ConfigurationHTTP_HEADERS: Access-Control-Allow-Origin: '*' Access-Control-Allow-Credentials: 'true' Access-Control-Allow-Methods: '*' Access-Control-Allow-Headers: '*' Access-Control-Max-Age: '86400'
For production, restrict Access-Control-Allow-Origin to specific domains instead of '*'.
# Public URLs (adjust for your domain)MCP_FRONTEND_URL: 'http://localhost:18080'MCP_PUBLIC_URL: 'http://localhost:18080'DATA_PUBLIC_URL: 'http://localhost:18080'QR_LOGIN_URL: '' # Optional QR code login URL
MCP_PUBLIC_URL is the switch for HTTP Remote MCP. Set it to a public HTTPS URL (e.g. https://yourdomain.com or a tunneled https://abc123.ngrok.io) and your MCP server becomes reachable at <MCP_PUBLIC_URL>/mcp for ChatGPT Apps, Claude Desktop over remote, and any other MCP client. See ChatGPT Apps.
The built-in execute tool uses E2B sandboxes to run shell and Python in isolation. Without an E2B_API_KEY, execute falls back to a no-op safe stub so the rest of the system keeps working; supply a key to unlock real code execution. PostgreSQL-backed file ops (write_file, read_file, etc.) stay in sync with sandbox runs — a file written by an agent is visible to the next execute call.
# OAuth temporary state TTL (seconds)OAUTH_TEMP_TTL_SECONDS: 900 # 15 minutes# Provider-specific settingsWHOOP_MAX_DETAIL_RECORDS: 50 # Max records to fetch in detailWHOOP_CONCURRENT_REQUESTS: 5 # Concurrent API requestsWHOOP_REQUEST_TIMEOUT: 30 # Request timeout in seconds
# Development SettingsLOG_LEVEL: 'DEBUG'HTTP_HOST: '0.0.0.0'HTTP_PORT: 18080# Use local servicesPG_HOST: 'localhost'REDIS_HOST: 'localhost'# Relaxed CORSHTTP_HEADERS: Access-Control-Allow-Origin: '*'
config.yaml
# Production SettingsLOG_LEVEL: 'INFO'HTTP_HOST: '0.0.0.0'HTTP_PORT: 443# Use production servicesPG_HOST: 'your-db-host.rds.amazonaws.com'REDIS_HOST: 'your-redis.cache.amazonaws.com'# Strict CORSHTTP_HEADERS: Access-Control-Allow-Origin: 'https://yourdomain.com'# Strong securityDATABASE_DECRYPTION_KEY: '[generated-secure-key]'JWT_KEY: '[generated-secure-key]'REDIS_PASSWORD: '[strong-password]'PG_PASSWORD: '[strong-password]'# SSL/TLSREDIS_SSL: true