Skip to main content
Marvin uses SQLAlchemy and Alembic for the database that stores threads, messages, and model-call usage. This database is separate from vector memory. The default database is ~/.marvin/marvin.db. SQLite initialization is enabled by default. Configure another location with an async database URL:
For PostgreSQL, install an async driver such as asyncpg and use a postgresql+asyncpg://... URL.

Inspect and upgrade

Run these commands against the same MARVIN_DATABASE_URL used by the application. Back up stored history before applying schema changes. marvin db downgrade REVISION reverts to a specific revision. marvin db reset downgrades to the base schema and upgrades again, deleting stored data. Both prompt for confirmation; --yes skips the prompt.

Create a migration in a checkout

Review the generated migration before applying it. Alembic cannot infer every data transformation. Migration sources and developer instructions are in migrations/.