* chore: update crewai-tools dependency to version 0.60.0
- Updated the `pyproject.toml` and `uv.lock` files to reflect the new version of `crewai-tools`.
- This change ensures compatibility with the latest features and improvements in the tools package.
* chore: bump CrewAI version to 0.157.0
- Updated the version in `__init__.py` to reflect the new release.
- Adjusted dependency versions in `pyproject.toml` files for crew, flow, and tool templates to ensure compatibility with the latest features and improvements in CrewAI.
- This change maintains consistency across the project and prepares for upcoming enhancements.
* initial setup
* feat: enhance CrewKickoffCompletedEvent to include total token usage
- Added total_tokens attribute to CrewKickoffCompletedEvent for better tracking of token usage during crew execution.
- Updated Crew class to emit total token usage upon kickoff completion.
- Removed obsolete context handler and execution context tracker files to streamline event handling.
* cleanup
* remove print statements for loggers
* feat: add CrewAI base URL and improve logging in tracing
- Introduced `CREWAI_BASE_URL` constant for easy access to the CrewAI application URL.
- Replaced print statements with logging in the `TraceSender` class for better error tracking.
- Enhanced the `TraceBatchManager` to provide default values for flow names and removed unnecessary comments.
- Implemented singleton pattern in `TraceCollectionListener` to ensure a single instance is used.
- Added a new test case to verify that the trace listener correctly collects events during crew execution.
* clear
* fix: update datetime serialization in tracing interfaces
- Removed the 'Z' suffix from datetime serialization in TraceSender and TraceEvent to ensure consistent ISO format.
- Added new test cases to validate the functionality of the TraceBatchManager and event collection during crew execution.
- Introduced fixtures to clear event bus listeners before each test to maintain isolation.
* test: enhance tracing tests with mock authentication token
- Added a mock authentication token to the tracing tests to ensure proper setup and event collection.
- Updated test methods to include the mock token, improving isolation and reliability of tests related to the TraceListener and BatchManager.
- Ensured that the tests validate the correct behavior of event collection during crew execution.
* test: refactor tracing tests to improve mock usage
- Moved the mock authentication token patching inside the test class to enhance readability and maintainability.
- Updated test methods to remove unnecessary mock parameters, streamlining the test signatures.
- Ensured that the tests continue to validate the correct behavior of event collection during crew execution while improving isolation.
* test: refactor tracing tests for improved mock usage and consistency
- Moved mock authentication token patching into individual test methods for better clarity and maintainability.
- Corrected the backstory string in the `Agent` instantiation to fix a typo.
- Ensured that all tests validate the correct behavior of event collection during crew execution while enhancing isolation and readability.
* test: add new tracing test for disabled trace listener
- Introduced a new test case to verify that the trace listener does not make HTTP calls when tracing is disabled via environment variables.
- Enhanced existing tests by mocking PlusAPI HTTP calls to avoid authentication and network requests, improving test isolation and reliability.
- Updated the test setup to ensure proper initialization of the trace listener and its components during crew execution.
* refactor: update LLM class to utilize new completion function and improve cost calculation
- Replaced direct calls to `litellm.completion` with a new import for better clarity and maintainability.
- Introduced a new optional attribute `completion_cost` in the LLM class to track the cost of completions.
- Updated the handling of completion responses to ensure accurate cost calculations and improved error handling.
- Removed outdated test cassettes for gemini models to streamline test suite and avoid redundancy.
- Enhanced existing tests to reflect changes in the LLM class and ensure proper functionality.
* test: enhance tracing tests with additional request and response scenarios
- Added new test cases to validate the behavior of the trace listener and batch manager when handling 404 responses from the tracing API.
- Updated existing test cassettes to include detailed request and response structures, ensuring comprehensive coverage of edge cases.
- Improved mock setup to avoid unnecessary network calls and enhance test reliability.
- Ensured that the tests validate the correct behavior of event collection during crew execution, particularly in scenarios where the tracing service is unavailable.
* feat: enable conditional tracing based on environment variable
- Added support for enabling or disabling the trace listener based on the `CREWAI_TRACING_ENABLED` environment variable.
- Updated the `Crew` class to conditionally set up the trace listener only when tracing is enabled, improving performance and resource management.
- Refactored test cases to ensure proper cleanup of event bus listeners before and after each test, enhancing test reliability and isolation.
- Improved mock setup in tracing tests to validate the behavior of the trace listener when tracing is disabled.
* fix: downgrade litellm version from 1.74.9 to 1.74.3
- Updated the `pyproject.toml` and `uv.lock` files to reflect the change in the `litellm` dependency version.
- This downgrade addresses compatibility issues and ensures stability in the project environment.
* refactor: improve tracing test setup by moving mock authentication token patching
- Removed the module-level patch for the authentication token and implemented a fixture to mock the token for all tests in the class, enhancing test isolation and readability.
- Updated the event bus clearing logic to ensure original handlers are restored after tests, improving reliability of the test environment.
- This refactor streamlines the test setup and ensures consistent behavior across tracing tests.
* test: enhance tracing test setup with comprehensive mock authentication
- Expanded the mock authentication token patching to cover all instances where `get_auth_token` is used across different modules, ensuring consistent behavior in tests.
- Introduced a new fixture to reset tracing singleton instances between tests, improving test isolation and reliability.
- This update enhances the overall robustness of the tracing tests by ensuring that all necessary components are properly mocked and reset, leading to more reliable test outcomes.
* just drop the test for now
* refactor: comment out completion-related code in LLM and LLM event classes
- Commented out the `completion` and `completion_cost` imports and their usage in the `LLM` class to prevent potential issues during execution.
- Updated the `LLMCallCompletedEvent` class to comment out the `response_cost` attribute, ensuring consistency with the changes in the LLM class.
- This refactor aims to streamline the code and prepare for future updates without affecting current functionality.
* refactor: update LLM response handling in LiteAgent
- Commented out the `response_cost` attribute in the LLM response handling to align with recent refactoring in the LLM class.
- This change aims to maintain consistency in the codebase and prepare for future updates without affecting current functionality.
* refactor: remove commented-out response cost attributes in LLM and LiteAgent
- Commented out the `response_cost` attribute in both the `LiteAgent` and `LLM` classes to maintain consistency with recent refactoring efforts.
- This change aligns with previous updates aimed at streamlining the codebase and preparing for future enhancements without impacting current functionality.
* bring back litellm upgrade version
Replace inefficient split()[0] operations with partition()[0] for better performance
when extracting the first part of a string before a delimiter.
Key improvements:
• Agent role processing: 29% faster with partition()
• Model provider extraction: 16% faster
• Console formatting: Improved responsiveness
• Better readability and explicit intent
Changes:
- agent_utils.py: Use partition('\n')[0] for agent role extraction
- console_formatter.py: Optimize agent role processing in logging
- llm_utils.py: Improve model provider parsing
- llm.py: Optimize model name parsing
Performance impact: 15-30% improvement in string processing operations
that are frequently used in agent execution and console output.
cliu_whu@yeah.net
Co-authored-by: chiliu <chiliu@paypal.com>
* Dropping User Memory
* Dropping checks for user memory
* changed memory.mdx documentation removed user memory.
* Flaky Test Case Maybe
* Drop memory_config
* Fixed test cases
* Fixed some test cases
* Changed docs
* Changed BR docs
* Docs fixing
* Fix minor doc
* Fix minor doc
* Fix minor doc
* Added fallback mechanism in Mem0
docs: update LangDB links in observability documentation
- Removed references to the AI Gateway features in both English and Portuguese documentation.
- Updated the Model Catalog links to point to the new app.langdb.ai domain.
- Ensured consistency across both language versions of the documentation.
* feat: support oauth2 config for authentication
* refactor: improve OAuth2 settings management
The CLI now supports seamless integration with other authentication providers, since the client_id, issue, domain are now manage by the user
* feat: support okta Device Authorization flow
* chore: resolve linter issues
* test: fix tests
* test: adding tests for auth providers
* test: fix broken test
* refator: adding WorkOS paramenters as default settings auth
* chore: improve oauth2 attributes description
* refactor: simplify WorkOS getting values
* fix: ensure Auth0 parameters is set when overrinding default auth provider
* chore: remove TODO Auth0 no longer provides default values
---------
Co-authored-by: Heitor Carvalho <heitor.scz@gmail.com>
- Updated `crewai-tools` dependency from `0.58.0` to `0.59.0` in `pyproject.toml` and `uv.lock`.
- Bumped the version of the CrewAI library from `0.150.0` to `0.152.0` in `__init__.py`.
- Updated dependency versions in CLI templates for crew, flow, and tool projects to reflect the new CrewAI version.
* fix: support to add memories to Mem0 with agent_id
* feat: removing memory_type checkings from Mem0Storage
* feat: ensure agent_id is always present while saving memory into Mem0
* fix: use OR operator when querying Mem0 memories with both user_id and agent_id
* Fix issue #2421: Handle missing google.genai dependency gracefully
Co-Authored-By: Joe Moura <joao@crewai.com>
* Fix import sorting in test file
Co-Authored-By: Joe Moura <joao@crewai.com>
* Fix import sorting with ruff
Co-Authored-By: Joe Moura <joao@crewai.com>
* Removed unwatned test case
* Added dynamic catching for all the embedder function
* Dropped the comment
* Added test case
* Fixed Linting Issue
* Flaky test case in 3.13
* Test Case fixed
---------
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: Lucas Gomide <lucaslg200@gmail.com>
- Added an optional `name` attribute to the Flow class for better identification.
- Updated event emissions to utilize the new `name` attribute, ensuring accurate flow naming in events.
- Added tests to verify the correct flow name is set and emitted during flow execution.
- Change model format from "gemini/gemini-1.5-pro-latest" to "gemini-1.5-pro-latest"
in Vertex AI section examples
- Update both English and Portuguese documentation files
- Fixes incorrect provider prefix usage for Vertex AI models
- Ensures consistency with Vertex AI provider requirements
Files changed:
- docs/en/concepts/llms.mdx (line 272)
- docs/pt-BR/concepts/llms.mdx (line 270)
Co-authored-by: Tony Kipkemboi <iamtonykipkemboi@gmail.com>
- Updated `crewai-tools` dependency from `0.55.0` to `0.58.0` in `pyproject.toml` and `uv.lock`.
- Added new packages `anthropic`, `browserbase`, `playwright`, `pyee`, and `stagehand` with their respective versions in `uv.lock`.
- Bumped the version of the CrewAI library from `0.148.0` to `0.150.0` in `__init__.py`.
- Updated dependency versions in CLI templates for crew, flow, and tool projects to reflect the new CrewAI version.
* Changed v1.1 -> v2
* Fixed Test Cases:
* Fixed linting issues
* Changed docs
* Refractored the storage
* Fixed test cases
* Fixing run-time checks
* Fixed Test Case
* Updated docs and added test case for custom categories
* Add the TODO back
* Minor Changes
* Added output_format in search
* Minor changes
* Added output_format and version in both search and save
* Small change
* Minor bugs
* Fixed test cases
* Changed docs
---------
Co-authored-by: Lucas Gomide <lucaslg200@gmail.com>
* docs: add create_directory parameter
* docs: remove string guardrails to focus on function guardrails
* docs: remove get help from docs.json
* docs: update pt-BR docs.json changes
- Mark UserMemory and UserMemoryItem for removal in v0.156.0 or 2025-08-04
- Update all references with deprecation warnings
- Users should migrate to ExternalMemory
* docs: Add Tavily Search and Extractor tools documentation
* docs: Add Tavily Search and Extractor tools to the documentation
---------
Co-authored-by: Tony Kipkemboi <iamtonykipkemboi@gmail.com>
* 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