AI / CrewAI Interview Questions
What is the @persist decorator in CrewAI Flows?
The @persist decorator applied to a Flow class enables automatic state recovery, saving a Flow's state so it can resume rather than restart from scratch if interrupted.
- Uses SQLite by default, which works well for single-instance deployments
- Can be configured to use PostgreSQL for multi-instance production deployments
- Persists the Flow's unique identifier and stored state data across executions
This is a key building block for production reliability, without it, an interrupted Flow would simply lose its progress and have to start over.
More Related questions...