AI / CrewAI Interview Questions
How does the @persist decorator enable state recovery across Flow executions?
Without persistence, an interrupted Flow, whether from a crash, a restart, or a long-running pause, would simply lose all of its accumulated state and have to start from the beginning.
- @persist saves the Flow's state, including its unique identifier and any stored data, to a backing store as execution proceeds
- Uses SQLite by default, suitable for single-instance deployments
- Can be configured for PostgreSQL when running across multiple instances in production, so state isn't tied to a single machine
This is what makes long-running or interruption-prone workflows, like ones that pause for @human_feedback, actually viable in production rather than fragile to any hiccup along the way.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
