Configuration

Two configuration documents — when to read which. This page is a purpose-grouped tour of Vedana’s environment variables — read top-to-bottom to understand what to set when bringing up the stack. The Configuration Reference is the authoritative complete list grouped by Python class — use it as a lookup table. Defaults shown in this guide are mirrored from the reference; when you spot a discrepancy, the reference (and ultimately the source code) wins.

Vedana is configured through environment variables. Everything important is read via pydantic-settings in three places:

  • vedana_core.settings.VedanaCoreSettings — main settings of the RAG pipeline.
  • vedana_etl.settings.Settings — ETL settings.
  • jims_core.llms.llm_provider.LLMSettings — LLM provider parameters.

All three classes use env_prefix="" and read the same .env file at apps/vedana/.env, so any shared variable name (e.g. MODEL, EMBEDDINGS_MODEL) is read by every class that declares it.

LLM

Vedana runs on top of LiteLLM. Model names follow the LiteLLM format (gpt-4.1-mini, openrouter/anthropic/claude-3.5-sonnet, vertex_ai/gemini-2.5-pro, etc.). Provider access is configured through standard environment variables (OPENAI_API_KEY, OPENROUTER_API_KEY, GOOGLE_APPLICATION_CREDENTIALS, etc.).

VariablePurposeDefault
MODELMain model: user answers and Cypher generation. Always set this explicitly in .env. (why)gpt-4.1
FILTER_MODELModel for the data model filtering step (see RagPipeline.filter_data_model). Usually smaller and faster.gpt-4.1-mini
JUDGE_MODELModel for the evaluation pipeline (LLM-as-judge).gpt-4.1-mini
EMBEDDINGS_MODELEmbeddings model.text-embedding-3-large
EMBEDDINGS_DIMEmbeddings dimensionality. Changing this requires a SQL migration.1024
EMBEDDINGS_MAX_BATCH_SIZEMaximum number of texts in one embeddings batch.2048
EMBEDDINGS_MAX_TOKENS_PER_BATCHMaximum tokens in one embeddings batch.200000
MODEL_API_KEYIf set, overrides the key for the main model (otherwise the standard provider env var is used).None
EMBEDDINGS_MODEL_API_KEYSame for the embeddings model.None
OPENROUTER_API_BASE_URLOpenRouter endpoint (you can change it to your own gateway).https://openrouter.ai/api/v1

Note on MODEL. Vedana has two settings classes that both read the MODEL env var (VedanaCoreSettings and LLMSettings from jims-core). Their built-in fallback defaults differ (gpt-4.1 vs gpt-4.1-nano) but in any real deployment you should set MODEL explicitly in .env — both classes then read the same value. See Configuration Reference → LLM Provider for details.

RAG pipeline

VariablePurposeDefault
ENABLE_DM_FILTERINGEnables the data model filtering step before the main agent. Reduces tokens for large data models.true
PIPELINE_HISTORY_LENGTHHow many recent comm.* messages to feed into the agent’s context.20
DEBUGTurns on additional logging and dev features.false

The threshold and top_n parameters for vector search are configured in code (RagPipeline(threshold=0.8, top_n=5)) and in the embed_threshold of every embeddable attribute in the data model.

Databases

PostgreSQL (JIMS + pgvector + Datapipe)

VariablePurposeExample
JIMS_DB_CONN_URIConnection URI for JIMS (threads, events, state).postgresql://postgres:postgres@db:5432
DB_CONN_URIConnection URI for Datapipe / ETL.postgresql://postgres:postgres@db:5432
JIMS_DB_USE_NULL_POOLDisable the connection pool (useful in serverless setups).false
JIMS_DB_POOL_SIZEPool size.SQLAlchemy default
JIMS_DB_POOL_MAX_OVERFLOWMaximum extra connections above the pool.SQLAlchemy default
CREATE_PGVECTOR_EXTENSIONWhether the migration should run CREATE EXTENSION pgvector. Use true for self-hosted Postgres where you manage the cluster (default). Use false on managed Postgres (Yandex Cloud, Google Cloud SQL, Supabase, Neon, RDS) — those vendors enable extensions through their own control plane rather than via SQL inside a migration.true

By default, JIMS and Datapipe write to the same database. They can be split into two if you need isolation.

Memgraph

VariablePurposeExample
MEMGRAPH_URIMemgraph Bolt endpoint.bolt://memgraph:7687
MEMGRAPH_USERUser.neo4j
MEMGRAPH_PWDPassword.set in .env.example

Data source

Grist (default)

VariablePurpose
GRIST_SERVER_URLGrist base URL (http://grist:8484 or https://api.getgrist.com).
GRIST_API_KEYAPI key.
GRIST_DATA_MODEL_DOC_IDDocId of the document with the data model (Anchors, Links, …).
GRIST_DATA_DOC_IDDocId of the document with the data itself.
GRIST_TEST_SET_DOC_IDDocId of the document with the golden dataset for evaluation.

Alternative sources are wired up via Custom ETL.

Interfaces

Telegram

VariablePurpose
TELEGRAM_BOT_TOKENBot token from BotFather.

HTTP API (jims-api) — authentication

The API supports two modes:

  • Bearer token via the --api-key flag.
  • Authentik verification (--authentik-url, --authentik-app-slug).

See HTTP API.

Backoffice

VariablePurpose
VEDANA_BACKOFFICE_DEBUGEnables dev-only features in the backoffice (test stands, manual queries).

Observability

VariablePurpose
SENTRY_DSNSentry endpoint. If empty, Sentry is off.
SENTRY_ENVIRONMENTEnvironment name shown in Sentry.

OpenTelemetry traces and Prometheus metrics are exposed through the standard mechanisms (--metrics-port of each CLI and OTEL_* env vars). See Observability.

Environment profiles

apps/vedana/ ships two profiles:

  • .env.example — a template for local development and the quick start.
  • .env.ci-cd — a CI/CD profile (used in GitHub Actions).

Create your own profiles using the same template. Never commit secret keys: .env is already in .gitignore.