* Update CrewAI version to 0.148.0 in project templates and dependencies
* Update crewai-tools dependency to version 0.55.0 in pyproject.toml and uv.lock for improved functionality and performance.
* feat: add exchanged messages in LLMCallCompletedEvent
* feat: add GoalAlignment metric for Agent evaluation
* feat: add SemanticQuality metric for Agent evaluation
* feat: add Tool Metrics for Agent evaluation
* feat: add Reasoning Metrics for Agent evaluation, still in progress
* feat: add AgentEvaluator class
This class will evaluate Agent' results and report to user
* fix: do not evaluate Agent by default
This is a experimental feature we still need refine it further
* test: add Agent eval tests
* fix: render all feedback per iteration
* style: resolve linter issues
* style: fix mypy issues
* fix: allow messages be empty on LLMCallCompletedEvent
* feat: add Experiment evaluation framework with baseline comparison
* fix: reset evaluator for each experiement iteraction
* fix: fix track of new test cases
* chore: split Experimental evaluation classes
* refactor: remove unused method
* refactor: isolate Console print in a dedicated class
* fix: make crew required to run an experiment
* fix: use time-aware to define experiment result
* test: add tests for Evaluator Experiment
* style: fix linter issues
* fix: encode string before hashing
* style: resolve linter issues
* feat: add experimental folder for beta features (#3141)
* test: move tests to experimental folder
* Fix#3149: Add missing create_directory parameter to Task class
- Add create_directory field with default value True for backward compatibility
- Update _save_file method to respect create_directory parameter
- Add comprehensive tests covering all scenarios
- Maintain existing behavior when create_directory=True (default)
The create_directory parameter was documented but missing from implementation.
Users can now control directory creation behavior:
- create_directory=True (default): Creates directories if they don't exist
- create_directory=False: Raises RuntimeError if directory doesn't exist
Fixes issue where users got TypeError when trying to use the documented
create_directory parameter.
Co-Authored-By: Jo\u00E3o <joao@crewai.com>
* Fix lint: Remove unused import os from test_create_directory_true
- Removes F401 lint error: 'os' imported but unused
- All lint checks should now pass
Co-Authored-By: Jo\u00E3o <joao@crewai.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Jo\u00E3o <joao@crewai.com>
* Compaing BaseLLM class instead of LLM
* Fixed test cases
* Fixed Linting Issues
* removed last line
---------
Co-authored-by: Lucas Gomide <lucaslg200@gmail.com>
* Added add_sources()
* Fixed the agent knowledge querying
* Added test cases
* Fixed linting issue
* Fixed logic
* Seems like a falky test case
* Minor changes
* Added knowledge attriute to the crew documentation
* Flaky test
* fixed spaces
* Flaky Test Case
* Seems like a flaky test case
---------
Co-authored-by: Lucas Gomide <lucaslg200@gmail.com>
* feat: add exchanged messages in LLMCallCompletedEvent
* feat: add GoalAlignment metric for Agent evaluation
* feat: add SemanticQuality metric for Agent evaluation
* feat: add Tool Metrics for Agent evaluation
* feat: add Reasoning Metrics for Agent evaluation, still in progress
* feat: add AgentEvaluator class
This class will evaluate Agent' results and report to user
* fix: do not evaluate Agent by default
This is a experimental feature we still need refine it further
* test: add Agent eval tests
* fix: render all feedback per iteration
* style: resolve linter issues
* style: fix mypy issues
* fix: allow messages be empty on LLMCallCompletedEvent
- Bump crewAI version to 0.141.0 in __init__.py for alignment with updated dependencies.
- Update `crewai-tools` dependency version to 0.51.0 in pyproject.toml and related template files.
- Add new testing dependencies: pytest-split and pytest-xdist for improved test execution.
- Ensure compatibility with the latest package versions in uv.lock and template files.
Add crew context tracking using OpenTelemetry baggage for thread-safe propagation. Context is set during kickoff and cleaned up in finally block. Added thread safety tests with mocked agent execution.
- Add pytest-xdist and pytest-split to dev dependencies for parallel test execution
- Split tests into 8 parallel groups per Python version for better distribution
- Enable CPU-level parallelization with -n auto to maximize resource usage
- Add fail-fast strategy and maxfail=3 to stop early on failures
- Add job name to match branch protection rules
- Reduce test timeout from default to 30s for faster failure detection
- Remove redundant cache configuration
* fix: clean up whitespace and update dependencies
* Removed unnecessary whitespace in multiple files for consistency.
* Updated `crewai-tools` dependency version to `0.49.0` in `pyproject.toml` and related template files.
* Bumped CrewAI version to `0.140.0` in `__init__.py` for alignment with updated dependencies.
* chore: update pyproject.toml to exclude documentation from build targets
* Added exclusions for the `docs` directory in both wheel and sdist build targets to streamline the build process and reduce unnecessary file inclusion.
* chore: update uv.lock for dependency resolution and Python version compatibility
* Incremented revision to 2.
* Updated resolution markers to include support for Python 3.13 and adjusted platform checks for better compatibility.
* Added new wheel URLs for zstandard version 0.23.0 to ensure availability across various platforms.
* chore: pin json-repair dependency version in pyproject.toml and uv.lock
* Updated json-repair dependency from a range to a specific version (0.25.2) for consistency and to avoid potential compatibility issues.
* Adjusted related entries in uv.lock to reflect the pinned version, ensuring alignment across project files.
* chore: pin agentops dependency version in pyproject.toml and uv.lock
* Updated agentops dependency from a range to a specific version (0.3.18) for consistency and to avoid potential compatibility issues.
* Adjusted related entries in uv.lock to reflect the pinned version, ensuring alignment across project files.
* test: enhance cache call assertions in crew tests
* Improved the test for cache hitting between agents by filtering mock calls to ensure they include the expected 'tool' and 'input' keywords.
* Added assertions to verify the number of cache calls and their expected arguments, enhancing the reliability of the test.
* Cleaned up whitespace and improved readability in various test cases for better maintainability.
* fix: correct code example language inconsistency in pt-BR docs
* fix: fix: fully standardize code example language and naming in pt-BR docs
* fix: fix: fully standardize code example language and naming in pt-BR docs fixed variables
* fix: fix: fully standardize code example language and naming in pt-BR docs fixed params
---------
Co-authored-by: Lucas Gomide <lucaslg200@gmail.com>
* Add Reo.dev tracking script to documentation
* Comprehensive docs improvements and development tools
- Add comprehensive .cursorrules with CrewAI and Flow development patterns
- Add redirect rules for old doc links without /en/ prefix
- Replace changelog pages with direct GitHub releases links
- Fix installation page directory tree rendering issue
- Fix broken Visual Studio Build Tools link formatting
- Remove obsolete changelog files to reduce maintenance overhead
These changes improve developer experience and ensure all old documentation links continue working.
Replaced the try-except block for collection retrieval with a single call to get_or_create_collection, simplifying the code and improving readability. Added logging to confirm whether the collection was found or created.
* feat: add capability to track LLM calls by task and agent
This makes it possible to filter or scope LLM events by specific agents or tasks, which can be very useful for debugging or analytics in real-time application
* feat: add docs about LLM tracking by Agents and Tasks
* fix incompatible BaseLLM.call method signature
* feat: support to filter LLM Events from Lite Agent
* Updated LiteLLM dependency.
This moves to the latest stable release. Critically, this includes a fix
from https://github.com/BerriAI/litellm/pull/11563 which is required to
use grok-3-mini with crewAI.
* Ran `uv sync` as requested.
When creating a Crew via the CLI and selecting the Azure provider, the generated .env file had environment variables in lowercase.
This commit ensures that all environment variables are written in uppercase.
* Adding Nebius to docs
Submitting this PR on behalf of Nebius AI Studio to add Nebius models to the CrewAI documentation.
I tested with the latest CrewAI + Nebius setup to ensure compatibility.
cc @tonykipkemboi
* updated LiteLLM page
---------
Co-authored-by: Lucas Gomide <lucaslg200@gmail.com>
* fix: normalize project names by stripping trailing slashes in crew creation
- Strip trailing slashes from project names in create_folder_structure
- Add comprehensive tests for trailing slash scenarios
- Fixes#3059
The issue occurred because trailing slashes in project names like 'hello/'
were directly incorporated into pyproject.toml, creating invalid package
names and script entries. This fix silently normalizes project names by
stripping trailing slashes before processing, maintaining backward
compatibility while fixing the invalid template generation.
Co-Authored-By: João <joao@crewai.com>
* trigger CI re-run to check for flaky test issue
Co-Authored-By: João <joao@crewai.com>
* fix: resolve circular import in CLI authentication module
- Move ToolCommand import to be local inside _poll_for_token method
- Update test mock to patch ToolCommand at correct location
- Resolves Python 3.11 test collection failure in CI
Co-Authored-By: João <joao@crewai.com>
* feat: add comprehensive class name validation for Python identifiers
- Ensure generated class names are always valid Python identifiers
- Handle edge cases: names starting with numbers, special characters, keywords, built-ins
- Add sanitization logic to remove invalid characters and prefix with 'Crew' when needed
- Add comprehensive test coverage for class name validation edge cases
- Addresses GitHub PR comment from lucasgomide about class name validity
Fixes include:
- Names starting with numbers: '123project' -> 'Crew123Project'
- Python built-ins: 'True' -> 'TrueCrew', 'False' -> 'FalseCrew'
- Special characters: 'hello@world' -> 'HelloWorld'
- Empty/whitespace: ' ' -> 'DefaultCrew'
- All generated class names pass isidentifier() and keyword checks
Co-Authored-By: João <joao@crewai.com>
* refactor: change class name validation to raise errors instead of generating defaults
- Remove default value generation (Crew prefix/suffix, DefaultCrew fallback)
- Raise ValueError with descriptive messages for invalid class names
- Update tests to expect validation errors instead of default corrections
- Addresses GitHub comment feedback from lucasgomide about strict validation
Co-Authored-By: João <joao@crewai.com>
* fix: add working directory safety checks to prevent test interference
Co-Authored-By: João <joao@crewai.com>
* fix: standardize working directory handling in tests to prevent corruption
Co-Authored-By: João <joao@crewai.com>
* fix: eliminate os.chdir() usage in tests to prevent working directory corruption
- Replace os.chdir() with parent_folder parameter for create_folder_structure tests
- Mock create_folder_structure directly for create_crew tests to avoid directory changes
- All 12 tests now pass locally without working directory corruption
- Should resolve the 103 failing tests in Python 3.12 CI
Co-Authored-By: João <joao@crewai.com>
* fix: remove unused os import to resolve lint failure
- Remove unused 'import os' statement from test_create_crew.py
- All tests still pass locally after removing unused import
- Should resolve F401 lint error in CI
Co-Authored-By: João <joao@crewai.com>
* feat: add folder name validation for Python module names
- Implement validation to ensure folder_name is valid Python identifier
- Check that folder names don't start with digits
- Validate folder names are not Python keywords
- Sanitize invalid characters from folder names
- Raise ValueError with descriptive messages for invalid cases
- Update tests to validate both folder and class name requirements
- Addresses GitHub comment requiring folder names to be valid Python module names
Co-Authored-By: João <joao@crewai.com>
* fix: correct folder name validation logic to match test expectations
- Fix validation regex to catch names starting with invalid characters like '@#/'
- Ensure validation properly raises ValueError for cases expected by tests
- Maintain support for valid cases like 'my.project/' -> 'myproject'
- Address lucasgomide's comment about valid Python module names
Co-Authored-By: João <joao@crewai.com>
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: João <joao@crewai.com>
Co-authored-by: Lucas Gomide <lucaslg200@gmail.com>
* docs: add pt-br translations
Powered by a CrewAI Flow https://github.com/danielfsbarreto/docs_translator
* Update mcp/overview.mdx brazilian docs
Its en-US counterpart was updated after I did a pass,
so now it includes the new section about @CrewBase
* test: add tests to test get_crews
* feat: improve Crew search while resetting their memories
Some memories couldn't be reset due to their reliance on relative external sources like `PDFKnowledge`. This was caused by the need to run the reset memories command from the `src` directory, which could break when external files weren't accessible from that path.
This commit allows the reset command to be executed from the root of the project — the same location typically used to run a crew — improving compatibility and reducing friction.
* feat: skip cli/templates folder while looking for Crew
* refactor: use console.print instead of print