Back to Copilotkit

Message Persistence

showcase/shell-docs/src/content/docs/integrations/crewai-flows/persistence/message-persistence.mdx

1.57.0896 B
Original Source
<Callout> To learn about how to load previous messages and agent states, check out the [Loading Message History](/crewai-flows/persistence/loading-message-history) and [Loading Agent State](/crewai-flows/persistence/loading-agent-state) pages. </Callout>

To persist CrewAI Flow messages to a database, you can use the @persist decorator. For example, you might use the default SQLiteFlowPersistence or provide your own custom persistence class.

For a concrete example of how a custom persistence class like InMemoryFlowPersistence can be implemented and used with the @persist decorator, see the sample agent implementation.

Read more about persistence in the CrewAI Flows documentation.