Configuration
Customize Xagent for your environment, use cases, and preferences.Quick Start
Create a.env file in your project root:
Complete Environment Variables
Core Settings
Database
Server
Security
Model Providers
OpenAI
Inference API
DeepSeek
Anthropic / Claude
Google / Gemini
Zhipu AI
DashScope (Alibaba Cloud)
Memory Configuration
Xagent supports two memory storage types:In-Memory Storage (Default)
Fast, non-persistent storage. No configuration required.LanceDB Storage
Persistent vector storage for semantic search:If embedding API keys are configured, LanceDB is used automatically for memory storage at
<project_root>/memory_store/. Without embedding keys, in-memory storage is used.Tool Configuration
Web Search
Proxy Settings
Image Processing
Background Jobs
If you enable asynchronous jobs for long-running ingestion, indexing, or other deferred work, configure the worker runtime and broker:The bundled Docker Compose deployment includes Redis plus worker processes for this mode. If you disable background jobs, keep the rest of the stack aligned with your deployment choice.
Authentication Providers
Google OIDC
Use Google as an external login provider:FRONTEND_URL should match the user-facing URL of your Xagent deployment so browser redirects and auth hand-offs resolve correctly.Tracing & Observability
Langfuse
Track and debug agent executions:Frontend Configuration
For Next.js frontend, create.env.local:
Example Configuration Files
Docker Compose (.env)
Local Development (.env)
Security Best Practices
- Generate strong keys — Use cryptographic tools for secrets
- Restrict permissions —
chmod 600 .env - Environment isolation — Different keys for dev, staging, production
- Regular rotation — Update secrets periodically
- Use vaults — AWS Secrets Manager, HashiCorp Vault for production

