Verified by the sovseal team

Configuration

Environment variables, config files, and tuning the self-hosted endpoint.

Overview

The self-hosted sovseal service reads settings from local environment variables, YAML config files, or in-memory dictionary overrides. This reference covers all required and optional configurations.


Required Environment Variables

Create and fill these in your edge Deno function configuration or container .env file.

VariableRequiredDefaultPurpose
OPENAI_API_KEYYes-API credentials for OpenAI LLM/Embedder operations.
JWT_SECRETYes-Signs session tokens. Must be a long, secure random sequence.
ADMIN_API_KEYOptional-Legacy admin key for backward compatibility.
AUTH_DISABLEDOptionalfalseSet to true to disable auth for local testing. Never use in production.
DASHBOARD_URLOptionalhttp://localhost:3000Allowed origin for CORS validation.

Configuration Methods

Method A: YAML Config (config.yaml)

Pass settings structure using a standard YAML file layout:

vector_store:
  provider: qdrant
  config:
    host: localhost
    port: 6333
    collection_name: agent_memory

llm:
  provider: azure_openai
  config:
    api_key: ${AZURE_OPENAI_KEY}
    deployment_name: gpt-4-mini

embedder:
  provider: ollama
  config:
    model: nomic-embed-text

reranker:
  provider: cohere
  config:
    api_key: ${COHERE_API_KEY}

Load it inside your application SDK initializer:

from mem0 import Memory
memory = Memory.from_config_file("config.yaml")

Method B: In-Memory Dictionary Config

If initializing within Python code directly, define config options using dictionary key-values:

from mem0 import Memory

config = {
    "vector_store": {
        "provider": "qdrant",
        "config": {"host": "localhost", "port": 6333},
    },
    "llm": {
        "provider": "openai",
        "config": {"model": "gpt-4-mini", "temperature": 0.1},
    },
    "embedder": {
        "provider": "vertexai",
        "config": {"model": "textembedding-gecko@003"},
    }
}

memory = Memory.from_config(config)

Tuning Component Settings

1. Vector Store Indexes

Enable fast search responses by explicitly indexing metadata filter keys:

vector_store:
  provider: qdrant
  config:
    indexed_fields: ["category", "priority", "status", "user_id"]

2. LLM Extraction Temperature

Keep extraction temperature low (≤0.2) to ensure that fact extraction outputs remain deterministic and structured.

3. Reranker Depth

When using a Cohere/managed reranker, cap the search results returned by setting:

reranker:
  config:
    top_k: 10

Sending more results adds significant transit latency with diminishing improvements in ranking accuracy.

On this page