Configuration

Configure LLM providers, database connections, and runtime settings

Environment Variables

NarraNexus uses pydantic-settings for configuration management. All settings are read from a .env file in the project root. Copy the example file and fill in your values:

cp .env.example .env

LLM Provider Configuration

The most important setting is your LLM provider. NarraNexus supports Claude, OpenAI, and Google Gemini through a unified adapter layer. Configure the provider and its API key:

LLM_PROVIDER=claude
ANTHROPIC_API_KEY=your-anthropic-key

# Or for OpenAI:
# LLM_PROVIDER=openai
# OPENAI_API_KEY=your-openai-key

# Or for Gemini:
# LLM_PROVIDER=gemini
# GOOGLE_API_KEY=your-google-key

Each agent can be individually configured to use a different LLM provider, allowing you to mix and match models based on the task requirements.

Database and Infrastructure

The Docker Compose stack provides MySQL, Redis, and Matrix/Synapse. Default connection strings are preconfigured, but you can override them:

MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_DATABASE=narranexus
REDIS_URL=redis://localhost:6379
MATRIX_HOMESERVER=http://localhost:8008

Module-Specific Settings

Individual modules may require additional configuration. For example, the Memory module (EverMemOS) needs MongoDB, Elasticsearch, and Milvus endpoints, while the RAG module requires a Google API key for Gemini File Search. Refer to each module's documentation for its specific settings.

NarraNexus - Multi-Agent Framework