mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-04-15 15:32:40 +00:00
When @persist is applied at the class level, new flow instances now automatically load the most recent persisted state for that flow class. This matches the documented behavior where creating a new instance of a @persist-decorated flow seamlessly continues from the previous run's state. Changes: - Add load_latest_by_class() to FlowPersistence base class - Implement load_latest_by_class() in SQLiteFlowPersistence with flow_class column and index for efficient lookups - Store flow class name when persisting state via PersistenceDecorator - Auto-restore latest state in class-level @persist decorator's __init__ - Add migration for existing databases (ALTER TABLE ADD COLUMN) Fixes #5378 Co-Authored-By: João <joao@crewai.com>