* wip
* More clean up
* Fix error
* clean up test
* Improve chat calling messages
* crewai chat improvements
* working but need to clean up
* Clean up chat
* fix: ensure persisted state overrides class defaults
- Remove early return in Flow.__init__ to allow proper state initialization
- Add test_flow_default_override.py to verify state override behavior
- Fix issue where default values weren't being overridden by persisted state
Fixes the issue where persisted state values weren't properly overriding
class defaults when restarting a flow with a previously saved state ID.
Co-Authored-By: Joe Moura <joao@crewai.com>
* test: improve state restoration verification with has_set_count flag
Co-Authored-By: Joe Moura <joao@crewai.com>
* test: add has_set_count field to PoemState
Co-Authored-By: Joe Moura <joao@crewai.com>
* refactoring test
* fix: ensure persisted state overrides class defaults
- Remove early return in Flow.__init__ to allow proper state initialization
- Add test_flow_default_override.py to verify state override behavior
- Fix issue where default values weren't being overridden by persisted state
Fixes the issue where persisted state values weren't properly overriding
class defaults when restarting a flow with a previously saved state ID.
Co-Authored-By: Joe Moura <joao@crewai.com>
* test: improve state restoration verification with has_set_count flag
Co-Authored-By: Joe Moura <joao@crewai.com>
* test: add has_set_count field to PoemState
Co-Authored-By: Joe Moura <joao@crewai.com>
* refactoring test
* Fixing flow state
* fixing peristed stateful flows
* linter
* type fix
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <joao@crewai.com>
* Fix nested pydantic model issue
* fix failing tests
* add in vcr
* cleanup
* drop prints
* Fix vcr issues
* added new recordings
* trying to fix vcr
* add in fix from lorenze.
* Fix SQLite log handling issue causing ValueError: Logs cannot be None in tests
- Add proper error handling in SQLite storage operations
- Set up isolated test environment with temporary storage directory
- Ensure consistent error messages across all database operations
Co-Authored-By: Joe Moura <joao@crewai.com>
* fix: Sort imports in conftest.py
Co-Authored-By: Joe Moura <joao@crewai.com>
* fix: Convert TokenProcess counters to instance variables to fix callback tracking
Co-Authored-By: Joe Moura <joao@crewai.com>
* refactor: Replace print statements with logging and improve error handling
- Add proper logging setup in kickoff_task_outputs_storage.py
- Replace self._printer.print() with logger calls
- Use appropriate log levels (error/warning)
- Add directory validation in test environment setup
- Maintain consistent error messages with DatabaseError format
Co-Authored-By: Joe Moura <joao@crewai.com>
* fix: Comprehensive improvements to database and token handling
- Fix SQLite database path handling in storage classes
- Add proper directory creation and error handling
- Improve token tracking with robust type checking
- Convert TokenProcess counters to instance variables
- Add standardized database error handling
- Set up isolated test environment with temporary storage
Resolves test failures in PR #1899
Co-Authored-By: Joe Moura <joao@crewai.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <joao@crewai.com>
Co-authored-by: João Moura <joaomdmoura@gmail.com>
* Add @persist decorator with SQLite persistence
- Add FlowPersistence abstract base class
- Implement SQLiteFlowPersistence backend
- Add @persist decorator for flow state persistence
- Add tests for flow persistence functionality
Co-Authored-By: Joe Moura <joao@crewai.com>
* Fix remaining merge conflicts in uv.lock
- Remove stray merge conflict markers
- Keep main's comprehensive platform-specific resolution markers
- Preserve all required dependencies for persistence functionality
Co-Authored-By: Joe Moura <joao@crewai.com>
* Fix final CUDA dependency conflicts in uv.lock
- Resolve NVIDIA CUDA solver dependency conflicts
- Use main's comprehensive platform checks
- Ensure all merge conflict markers are removed
- Preserve persistence-related dependencies
Co-Authored-By: Joe Moura <joao@crewai.com>
* Fix nvidia-cusparse-cu12 dependency conflicts in uv.lock
- Resolve NVIDIA CUSPARSE dependency conflicts
- Use main's comprehensive platform checks
- Complete systematic check of entire uv.lock file
- Ensure all merge conflict markers are removed
Co-Authored-By: Joe Moura <joao@crewai.com>
* Fix triton filelock dependency conflicts in uv.lock
- Resolve triton package filelock dependency conflict
- Use main's comprehensive platform checks
- Complete final systematic check of entire uv.lock file
- Ensure TOML file structure is valid
Co-Authored-By: Joe Moura <joao@crewai.com>
* Fix merge conflict in crew_test.py
- Remove duplicate assertion in test_multimodal_agent_live_image_analysis
- Clean up conflict markers
- Preserve test functionality
Co-Authored-By: Joe Moura <joao@crewai.com>
* Clean up trailing merge conflict marker in crew_test.py
- Remove remaining conflict marker at end of file
- Preserve test functionality
- Complete conflict resolution
Co-Authored-By: Joe Moura <joao@crewai.com>
* Improve type safety in persistence implementation and resolve merge conflicts
Co-Authored-By: Joe Moura <joao@crewai.com>
* fix: Add explicit type casting in _create_initial_state method
Co-Authored-By: Joe Moura <joao@crewai.com>
* fix: Improve type safety in flow state handling with proper validation
Co-Authored-By: Joe Moura <joao@crewai.com>
* fix: Improve type system with proper TypeVar scoping and validation
Co-Authored-By: Joe Moura <joao@crewai.com>
* fix: Improve state restoration logic and add comprehensive tests
Co-Authored-By: Joe Moura <joao@crewai.com>
* fix: Initialize FlowState instances without passing id to constructor
Co-Authored-By: Joe Moura <joao@crewai.com>
* feat: Add class-level flow persistence decorator with SQLite default
- Add class-level @persist decorator support
- Set SQLiteFlowPersistence as default backend
- Use db_storage_path for consistent database location
- Improve async method handling and type safety
- Add comprehensive docstrings and examples
Co-Authored-By: Joe Moura <joao@crewai.com>
* fix: Sort imports in decorators.py to fix lint error
Co-Authored-By: Joe Moura <joao@crewai.com>
* style: Organize imports according to PEP 8 standard
Co-Authored-By: Joe Moura <joao@crewai.com>
* style: Format typing imports with line breaks for better readability
Co-Authored-By: Joe Moura <joao@crewai.com>
* style: Simplify import organization to fix lint error
Co-Authored-By: Joe Moura <joao@crewai.com>
* style: Fix import sorting using Ruff auto-fix
Co-Authored-By: Joe Moura <joao@crewai.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <joao@crewai.com>
Co-authored-by: João Moura <joaomdmoura@gmail.com>
* before kickoff breaks if inputs are none.
* improve none type
* Fix failing tests
* add tests for new code
* Fix failing test
* drop extra comments
* clean up based on eduardo feedback
* drop litellm version to prevent windows issue
* Fix failing tests
* Trying to fix tests
* clean up
* Trying to fix tests
* Drop token calc handler changes
* fix failing test
* Fix failing test
---------
Co-authored-by: João Moura <joaomdmoura@gmail.com>
* feat: add unique ID to flow states
- Add FlowState base model with UUID field
- Update type variable T to use FlowState
- Ensure all states (structured and unstructured) get UUID
- Fix type checking in _create_initial_state method
Co-Authored-By: Joe Moura <joao@crewai.com>
* docs: update documentation to reflect automatic UUID generation in flow states
Co-Authored-By: Joe Moura <joao@crewai.com>
* fix: sort imports in flow.py
Co-Authored-By: Joe Moura <joao@crewai.com>
* fix: sort imports according to PEP 8
Co-Authored-By: Joe Moura <joao@crewai.com>
* fix: auto-fix import sorting with ruff
Co-Authored-By: Joe Moura <joao@crewai.com>
* test: add comprehensive tests for flow state UUID functionality
Co-Authored-By: Joe Moura <joao@crewai.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <joao@crewai.com>
* Improving tool calling to pass dictionaries instead of strings
* Fix issues with parsing none/null
* remove prints and unnecessary comments
* Fix crew_test issues with function calling
* improve prompting
* add back in support for add_image
* add tests for tool validation
* revert back to figure out why tests are timing out
* Update cassette
* trying to find what is timing out
* add back in guardrails
* add back in manager delegation tests
* Trying to fix tests
* Force test to pass
* Trying to fix tests
* add in more role tests
* add back old tool validation
* updating tests
* vcr
* Fix tests
* improve function llm logic
* vcr 2
* drop llm
* Failing test
* add more tests back in
* Revert tool validation