Skip to main content
Marvin reads settings from environment variables and a .env file in the current directory. Environment variables take precedence. Set them before importing Marvin.
Provider credentials such as OPENAI_API_KEY must be available to the provider SDK. Marvin’s settings loader reads its own fields from .env; it does not export unrelated .env entries into the process environment.

Storage

MARVIN_HOME_PATH defaults to ~/.marvin. Thread history uses a SQLite database there unless you set MARVIN_DATABASE_URL.
Database URLs must use an async driver. Vector memory is configured separately through its provider; MARVIN_MEMORY_PROVIDER defaults to chroma-ephemeral. The persistent Chroma provider string is chroma-db.

Output and limits

MARVIN_AGENT_RETRIES is exposed in settings but is not currently passed to the model agent; changing it does not configure validation retries. See the settings API for the complete set of fields and defaults.

Runtime changes

Model and memory defaults are initialized from settings during import. Change marvin.defaults when changing those defaults at runtime. Use model configuration for agent-specific models and temporary overrides.