Agent memory with SQLite database in deployment

Hi there,

I am planning to deploy my chat agent app on community cloud with Agno agent framework. The agent has memory implemented through a SQLITE DTABASE that at the moment is set up in my local folder. I am wondering if for deployment I can keep the DB as is or I have to change or implement in a different way. Thanks !!

Welcome to the community and thanks for your question! :rocket: For Streamlit Community Cloud, you should not rely on a local SQLite database for persistent storage. When deployed, any local file changes (including SQLite DB updates) are not guaranteed to persist—files can be lost on app reboot or redeployment, and each app instance may have its own isolated filesystem. This means your agent’s memory will not be reliably saved between sessions or after restarts if you use a local SQLite file as you do in local development.

The recommended approach is to use an external, cloud-hosted database (e.g., PostgreSQL, MySQL, Supabase, or similar) that your app connects to over the network. Streamlit provides built-in support for connecting to remote databases using st.connection and secrets management for credentials. This ensures your agent’s memory is persistent and accessible across app restarts and multiple users. See the official Connecting to data docs for details and examples.

Sources: