Skip to main content
A Thread stores messages and model-call usage in Marvin’s database. The default database is ~/.marvin/marvin.db; history survives process restarts as long as the database is retained.
The context manager selects the current thread. Leaving it does not delete history.

Resume a conversation

Save the thread ID and use it for later calls against the same database:
Without an explicit or current thread, a call creates a new one.

Inspect history and usage

Use get_messages_async and get_usage_async in async code. Database configuration is described in configuration. Threads keep conversation history. Memory stores facts that agents can retrieve by semantic search; its persistence depends on the provider.