> ## Documentation Index
> Fetch the complete documentation index at: https://askmarvin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration

> Configure storage, model defaults, and console output

Marvin reads settings from environment variables and a `.env` file in the current directory. Environment variables take precedence. Set them before importing Marvin.

```bash theme={null}
export MARVIN_AGENT_MODEL="openai:gpt-4o-mini"
export MARVIN_HOME_PATH="/path/to/marvin-data"
export MARVIN_ENABLE_DEFAULT_PRINT_HANDLER=false
```

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`.

```bash theme={null}
export MARVIN_DATABASE_URL="sqlite+aiosqlite:////absolute/path/to/history.db"
```

Database URLs must use an async driver. Vector [memory](https://askmarvin.ai/concepts/memory.md) is configured separately through its provider; `MARVIN_MEMORY_PROVIDER` defaults to `chroma-ephemeral`. The persistent Chroma provider string is `chroma-db`.

## Output and limits

| Setting | Purpose |
| - | - |
| `MARVIN_LOG_LEVEL` | Logging level, such as `INFO` or `DEBUG` |
| `MARVIN_LOG_EVENTS` | Log runtime events at debug level |
| `MARVIN_ENABLE_DEFAULT_PRINT_HANDLER` | Show agent activity on the console |
| `MARVIN_MAX_AGENT_TURNS` | Turn limit for an orchestrator run |

`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](https://askmarvin.ai/api-reference/marvin-settings.md) for the complete set of fields and defaults.

## Runtime changes

```python theme={null}
import marvin

marvin.settings.enable_default_print_handler = False
marvin.defaults.model = "openai:gpt-4o-mini"
```

Model and memory defaults are initialized from settings during import. Change `marvin.defaults` when changing those defaults at runtime. Use [model configuration](https://askmarvin.ai/guides/configure-llms.md) for agent-specific models and temporary overrides.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.