- Fix OSError when trying to get source code of lambda functions in guardrail events
- Gracefully handle lambdas and built-in functions by showing placeholder text
- Update VCR config to exclude body matching for more reliable cassette playback
- Add pytest marker for tests requiring local services (Ollama, etc)
- Configure CI to skip tests marked as requiring local services
- Re-record async tool test cassettes with telemetry calls only
- Migrate crewai-tools as standalone package in lib/tools
- Configure UV workspace for monorepo structure
- Move assets to repository root
- Clean up duplicate README files
- Focus pre-commit hooks on lib/crewai/src only
- prefix provider env vars with embeddings_
- rename watson → watsonx in providers
- add deprecation warning and alias for legacy 'watson' key (to be removed in v1.0.0)
- Bump CrewAI version to 0.201.0 in __init__.py
- Update dependency versions in pyproject.toml for crew, flow, and tool templates to require CrewAI 0.201.0
- Remove unnecessary blank line in pyproject.toml
- update imports and include handling for chromadb v1.1.0
- fix mypy and typing_compat issues (required, typeddict, voyageai)
- refine embedderconfig typing and allow base provider instances
- handle mem0 as special case for external memory storage
- bump tools and clean up redundant deps
- introduce baseembeddingsprovider and helper for embedding functions
- add core embedding types and migrate providers, factory, and storage modules
- remove unused type aliases and fix pydantic schema error
- update providers with env var support and related fixes
- Add pydantic-settings>=2.10.1 dependency for configuration management
- Update pydantic to 2.11.9 and python-dotenv to 1.1.1
- Migrate from deprecated tool.uv.dev-dependencies to dependency-groups.dev format
- Remove unnecessary dev dependencies: pillow, cairosvg
- Update all dev tooling to latest versions
- Remove duplicate python-dotenv from dev dependencies
- add batch_size field to baseragconfig (default=100)
- update chromadb/qdrant clients and factories to use batch_size
- extract and filter batch_size from embedder config in knowledgestorage
- fix large csv files exceeding embedder token limits (#3574)
- remove unneeded conditional for type
Co-authored-by: Vini Brasil <vini@hey.com>
- support nested config format with embedderconfig typeddict
- fix parsing for model/model_name compatibility
- add validation, typing_extensions, and improved type hints
- enhance embedding factory with env var injection and provider support
- add tests for openai, azure, and all embedding providers
- misc fixes: test file rename, updated mocking patterns
- Remove embedchain and resolve circular deps with ChromaDB
- Adjust lockfile to match crewai requirements
- Mock embeddings and vector DB in RAG tool tests
* fix: Make 'ready' parameter optional in _create_reasoning_plan function
This PR fixes Issue #3466 where the _create_reasoning_plan function was missing
the 'ready' parameter when called by the LLM. The fix makes the 'ready' parameter
optional with a default value of False, which allows the function to be called
with only the 'plan' argument.
Fixes#3466
* Change default value of 'ready' parameter to True
---------
Co-authored-by: João Moura <joaomdmoura@gmail.com>
* chore: update dependencies and versioning for CrewAI
- Bump `crewai-tools` dependency version from `0.71.0` to `0.73.0` in `pyproject.toml`.
- Update CrewAI version from `0.186.1` to `0.193.0` in `__init__.py`.
- Adjust dependency versions in CLI templates for crew, flow, and tool to reflect the new CrewAI version.
This update ensures compatibility with the latest features and improvements in CrewAI.
* remove embedchain mock
* fix: remove last embedchain mocks
* fix: remove langchain_openai from tests
---------
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
* feat(tracing): enhance first-time trace display and auto-open browser
* avoinding line breaking
* set tracing if user enables it
* linted
---------
Co-authored-by: lorenzejay <lorenzejaytech@gmail.com>
* docs: update RagTool references from EmbedChain to CrewAI native RAG
* change ref to qdrant
* docs: update RAGTool to use Qdrant and add embedding_model example
- Refactor the default embedding function to utilize OpenAI's embedding function with API key support.
- Import necessary OpenAI embedding function and configure it with the environment variable for the API key.
- Ensure compatibility with existing ChromaDB configuration model.
- Add limit and score_threshold to BaseRagConfig, propagate to clients
- Update default search params in RAG storage, knowledge, and memory (limit=5, threshold=0.6)
- Fix linting (ruff, mypy, PERF203) and refactor save logic
- Update tests for new defaults and ChromaDB behavior
* feat(tracing): implement first-time trace handling and improve event management
- Added FirstTimeTraceHandler for managing first-time user trace collection and display.
- Enhanced TraceBatchManager to support ephemeral trace URLs and improved event buffering.
- Updated TraceCollectionListener to utilize the new FirstTimeTraceHandler.
- Refactored type annotations across multiple files for consistency and clarity.
- Improved error handling and logging for trace-related operations.
- Introduced utility functions for trace viewing prompts and first execution checks.
* brought back crew finalize batch events
* refactor(trace): move instance variables to __init__ in TraceBatchManager
- Refactored TraceBatchManager to initialize instance variables in the constructor instead of as class variables.
- Improved clarity and encapsulation of the class state.
* fix(tracing): improve error handling in user data loading and saving
- Enhanced error handling in _load_user_data and _save_user_data functions to log warnings for JSON decoding and file access issues.
- Updated documentation for trace usage to clarify the addition of tracing parameters in Crew and Flow initialization.
- Refined state management in Flow class to ensure proper handling of state IDs when persistence is enabled.
* add some tests
* fix test
* fix tests
* refactor(tracing): enhance user input handling for trace viewing
- Replaced signal-based timeout handling with threading for user input in prompt_user_for_trace_viewing function.
- Improved user experience by allowing a configurable timeout for viewing execution traces.
- Updated tests to mock threading behavior and verify timeout handling correctly.
* fix(tracing): improve machine ID retrieval with error handling
- Added error handling to the _get_machine_id function to log warnings when retrieving the machine ID fails.
- Ensured that the function continues to provide a stable, privacy-preserving machine fingerprint even in case of errors.
* refactor(flow): streamline state ID assignment in Flow class
- Replaced direct attribute assignment with setattr for improved flexibility in handling state IDs.
- Enhanced code readability by simplifying the logic for setting the state ID when persistence is enabled.
Code QL, when configured through the GUI, does not allow for advanced configuration. This PR upgrades from an advanced file-based config which allows us to exclude certain paths.
* fix: attempt to make embedchain optional
* fix: drop pydantic_settings dependency
* fix: ensure the package is importable without any extra dependency
After making embedchain option many packages were unstalled which caused errors in some tools due to failing import directives
- Updated CrewAI version from 0.186.0 to 0.186.1 in `__init__.py`.
- Updated `crewai[tools]` dependency version in `pyproject.toml` for crew, flow, and tool templates to reflect the new CrewAI version.
- Updated `crewai-tools` dependency from version 0.69.0 to 0.71.0 in `pyproject.toml`.
- Bumped CrewAI version from 0.177.0 to 0.186.0 in `__init__.py`.
- Updated dependency versions in CLI templates for crew, flow, and tool to reflect the new CrewAI version.
* test: add test to ensure tool is called only once during crew execution
- Introduced a new test case to validate that the counting_tool is executed exactly once during crew execution.
- Created a CountingTool class to track execution counts and log call history.
- Enhanced the test suite with a YAML cassette for consistent tool behavior verification.
* ensure tool function called only once
* refactor: simplify error handling in CrewStructuredTool
- Removed unnecessary try-except block around the tool function call to streamline execution flow.
- Ensured that the tool function is called directly, improving readability and maintainability.
* linted
* need to ignore for now as we cant infer the complex generic type within pydantic create_model_func
* fix tests
- Build and cache uv dependencies; update type-checker, tests, and linter to use cache
- Remove separate security-checker
- Add explicit workflow permissions for compliance
- Remove pull_request trigger from build-cache workflow
- Update to Python 3.10+ typing across LLM, callbacks, storage, and errors
- Complete typing updates for crew_chat and hitl
- Add stop attr to mock LLM, suppress test warnings
- Add type-ignore for aisuite import
* fix: support to define MPC connection timeout on CrewBase instance
* fix: resolve linter issues
* chore: ignore specific rule N802 on CrewBase class
* fix: ignore untyped import
This commit updates tool prompts to explicitly highlight that some tools
can accept both local file paths and remote URLs.
The improved prompts ensure LLMs understand they may pass remote
resources.
- Disable E501 line length linting rule
- Add Google-style docstrings to tasks leaf file
- Modernize typing and docs in task_output.py
- Improve typing and documentation in conditional_task.py
* docs(cli): document device-code login and config reset guidance; renumber sections
* docs(cli): fix duplicate numbering (renumber Login/API Keys/Configuration sections)
* docs: Fix webhook documentation to include meta dict in all webhook payloads
- Add note explaining that meta objects from kickoff requests are included in all webhook payloads
- Update webhook examples to show proper payload structure including meta field
- Fix webhook examples to match actual API implementation
- Apply changes to English, Korean, and Portuguese documentation
Resolves the documentation gap where meta dict passing to webhooks was not documented despite being implemented in the API.
* WIP: CrewAI docs theme, changelog, GEO, localization
* docs(cli): fix merge markers; ensure mode: "wide"; convert ASCII tables to Markdown (en/pt-BR/ko)
* docs: add group icons across locales; split Automation/Integrations; update tools overviews and links
- Updated `crewai-tools` dependency from version 0.65.0 to 0.69.0 in `pyproject.toml` and `uv.lock`.
- Bumped crewAI version from 0.175.0 to 0.177.0 in `__init__.py`.
- Updated dependency versions in CLI templates for crew, flow, and tool projects to reflect the new crewAI version.
* fix: suppress Pydantic deprecation warnings in initialization
- Implemented a function to filter out Pydantic deprecation warnings, enhancing the user experience by preventing unnecessary warning messages during execution.
- Removed the previous warning filter setup to streamline the warning suppression process.
- Updated the User-Agent header formatting for consistency.
* fix type check
* dropped
* fix: update type-checker workflow and suppress warnings
- Updated the Python version matrix in the type-checker workflow to use double quotes for consistency.
- Added the `# type: ignore[assignment]` comment to the warning suppression assignment in `__init__.py` to address type checking issues.
- Ensured that the mypy command in the workflow allows for untyped calls and generics, enhancing type checking flexibility.
* better
chore(dev): update tooling & CI workflows
- Upgrade ruff, mypy (strict), pre-commit; add hooks, stubs, config consolidation
- Add bandit to dev deps and update uv.lock
- Enhance ruff rules (modern Python style, B006 for mutable defaults)
- Update workflows to use uv, matrix strategy, and changed-file type checking
- Include tests in type checking; fix job names and add summary job for branch protection
* Create tool for generating automations in Studio
This commit creates a tool to use CrewAI Enterprise API to generate
crews using CrewAI Studio.
* Replace CREWAI_BASE_URL with CREWAI_PLUS_URL
* Add missing /crewai_plus in URL
refactor(events): relocate events module & update imports
- Move events from utilities/ to top-level events/ with types/, listeners/, utils/ structure
- Update all source/tests/docs to new import paths
- Add backwards compatibility stubs in crewai.utilities.events with deprecation warnings
- Restore test mocks and fix related test imports
* fix: enhance LLM event handling with task and agent metadata
- Added `from_task` and `from_agent` parameters to LLM event emissions for improved traceability.
- Updated `_send_events_to_backend` method in TraceBatchManager to return status codes for better error handling.
- Modified `CREWAI_BASE_URL` to remove trailing slash for consistency.
- Improved logging and graceful failure handling in event sending process.
* drop print
- Sanitize ChromaDB collection names and use original dir naming
- Add persistent client with file locking to the ChromaDB factory
- Add upsert support to the ChromaDB client
- Suppress ChromaDB deprecation warnings for `model_fields`
- Extract `suppress_logging` into shared `logger_utils`
- Update tests to reflect upsert behavior
- Docs: add additional note
* Add contextual AI tools with async support
* Fix package version issues and update README
* Rename contextual tools to contextualai and update contents
* Update tools init for contextualai tools
* feat: Resolved no module found error for nest_asyncio
* Updated nest_asyncio import
---------
Co-authored-by: QJ <qj@QJs-MacBook-Pro.local>
Co-authored-by: Qile-Jiang <qile.jiang@contextual.ai>
* Bump crewAI version from 0.165.1 to 0.175.0 in __init__.py.
* Update tools dependency from 0.62.1 to 0.65.0 in pyproject.toml and uv.lock files.
* Reflect changes in CLI templates for crew, flow, and tool configurations.
* feat: add InvokeCrewAIAutomationTool for external crew API integration
* feat: add InvokeCrewAIAutomationTool class for executing CrewAI tasks programmatically
* feat: implement tool usage limit exception handling
- Introduced `ToolUsageLimitExceeded` exception to manage maximum usage limits for tools.
- Enhanced `CrewStructuredTool` to check and raise this exception when the usage limit is reached.
- Updated `_run` and `_execute` methods to include usage limit checks and handle exceptions appropriately, improving reliability and user feedback.
* feat: enhance PlusAPI and ToolUsage with task metadata
- Removed the `send_trace_batch` method from PlusAPI to streamline the API.
- Added timeout parameters to trace event methods in PlusAPI for improved reliability.
- Updated ToolUsage to include task metadata (task name and ID) in event emissions, enhancing traceability and context during tool usage.
- Refactored event handling in LLM and ToolUsage events to ensure task information is consistently captured.
* feat: enhance memory and event handling with task and agent metadata
- Added task and agent metadata to various memory and event classes, improving traceability and context during memory operations.
- Updated the `ContextualMemory` and `Memory` classes to associate tasks and agents, allowing for better context management.
- Enhanced event emissions in `LLM`, `ToolUsage`, and memory events to include task and agent information, facilitating improved debugging and monitoring.
- Refactored event handling to ensure consistent capture of task and agent details across the system.
* drop
* refactor: clean up unused imports in memory and event modules
- Removed unused TYPE_CHECKING imports from long_term_memory.py to streamline the code.
- Eliminated unnecessary import from memory_events.py, enhancing clarity and maintainability.
* fix memory tests
* fix task_completed payload
* fix: remove unused test agent variable in external memory tests
* refactor: remove unused agent parameter from Memory class save method
- Eliminated the agent parameter from the save method in the Memory class to streamline the code and improve clarity.
- Updated the TraceBatchManager class by moving initialization of attributes into the constructor for better organization and readability.
* refactor: enhance ExecutionState and ReasoningEvent classes with optional task and agent identifiers
- Added optional `current_agent_id` and `current_task_id` attributes to the `ExecutionState` class for better tracking of agent and task states.
- Updated the `from_task` attribute in the `ReasoningEvent` class to use `Optional[Any]` instead of a specific type, improving flexibility in event handling.
* refactor: update ExecutionState class by removing unused agent and task identifiers
- Removed the `current_agent_id` and `current_task_id` attributes from the `ExecutionState` class to simplify the code and enhance clarity.
- Adjusted the import statements to include `Optional` for better type handling.
* refactor: streamline LLM event handling in LiteAgent
- Removed unused LLM event emissions (LLMCallStartedEvent, LLMCallCompletedEvent, LLMCallFailedEvent) from the LiteAgent class to simplify the code and improve performance.
- Adjusted the flow of LLM response handling by eliminating unnecessary event bus interactions, enhancing clarity and maintainability.
* flow ownership and not emitting events when a crew is done
* refactor: remove unused agent parameter from ShortTermMemory save method
- Eliminated the agent parameter from the save method in the ShortTermMemory class to streamline the code and improve clarity.
- This change enhances the maintainability of the memory management system by reducing unnecessary complexity.
* runtype check fix
* fixing tests
* fix lints
* fix: update event assertions in test_llm_emits_event_with_lite_agent
- Adjusted the expected counts for completed and started events in the test to reflect the correct behavior of the LiteAgent.
- Updated assertions for agent roles and IDs to match the expected values after recent changes in event handling.
* fix: update task name assertions in event tests
- Modified assertions in `test_stream_llm_emits_event_with_task_and_agent_info` and `test_llm_emits_event_with_task_and_agent_info` to use `task.description` as a fallback for `task.name`. This ensures that the tests correctly validate the task name even when it is not explicitly set.
* fix: update test assertions for output values and improve readability
- Updated assertions in `test_output_json_dict_hierarchical` to reflect the correct expected score value.
- Enhanced readability of assertions in `test_output_pydantic_to_another_task` and `test_key` by formatting the error messages for clarity.
- These changes ensure that the tests accurately validate the expected outputs and improve overall code quality.
* test fixes
* fix crew_test
* added another fixture
* fix: ensure agent and task assignments in contextual memory are conditional
- Updated the ContextualMemory class to check for the existence of short-term, long-term, external, and extended memory before assigning agent and task attributes. This prevents potential attribute errors when memory types are not initialized.
* Added Qdrant provider support with factory, config, and protocols
* Improved default embeddings and type definitions
* Fixed ChromaDB factory embedding assignment
### RAG Config System
* Added ChromaDB client creation via config with sensible defaults
* Introduced optional imports and shared RAG config utilities/schema
* Enabled embedding function support with ChromaDB provider integration
* Refactored configs for immutability and stronger type safety
* Removed unused code and expanded test coverage
Add ChromaDB client implementation with async support
- Implement core collection operations (create, get_or_create, delete)
- Add search functionality with cosine similarity scoring
- Include both sync and async method variants
- Add type safety with NamedTuples and TypeGuards
- Extract utility functions to separate modules
- Default to cosine distance metric for text similarity
- Add comprehensive test coverage
TODO:
- l2, ip score calculations are not settled on
fix: resolve flaky tests and race conditions in test suite
- Fix telemetry/event tests by patching class methods instead of instances
- Use unique temp files/directories to prevent CI race conditions
- Reset singleton state between tests
- Mock embedchain.Client.setup() to prevent JSON corruption
- Rename test files to test_*.py convention
- Move agent tests to tests/agents directory
- Fix repeated tool usage detection
- Remove database-dependent tools causing initialization errors
* docs: fix API Reference OpenAPI sources and redirects; clarify training data usage; add Mermaid diagram; correct CLI usage and notes
* docs(mintlify): use explicit openapi {source, directory} with absolute paths to fix branch deployment routing
* docs(mintlify): add explicit endpoint MDX pages and include in nav; keep OpenAPI auto-gen as fallback
* docs(mintlify): remove OpenAPI Endpoints groups; add localized MDX endpoint pages for pt-BR and ko
* fix: flow listener resumability for HITL and cyclic flows
- Add resumption context flag to distinguish HITL resumption from cyclic execution
- Skip method re-execution only during HITL resumption, not for cyclic flows
- Ensure cyclic flows like test_cyclic_flow continue to work correctly
* fix: prevent duplicate execution of conditional start methods in flows
* fix: resolve type error in flow.py line 1040 assignment
* feat: initialize rag
* refactor: using cosine distance metric for chromadb
* feat: use RecursiveCharacterTextSplitter as chunker strategy
* feat: support chucker and loader per data_type
* feat: adding JSON loader
* feat: adding CSVLoader
* feat: adding loader for DOCX files
* feat: add loader for MDX files
* feat: add loader for XML files
* feat: add loader for parser Webpage
* feat: support to load files from an entire directory
* feat: support to auto-load the loaders for additional DataType
* feat: add chuckers for some specific data type
- Each chunker uses separators specific to its content type
* feat: prevent document duplication and centralize content management
- Implement document deduplication logic in RAG
* Check for existing documents by source reference
* Compare doc IDs to detect content changes
* Automatically replace outdated content while preventing duplicates
- Centralize common functionality for better maintainability
* Create SourceContent class to handle URLs, files, and text uniformly
* Extract shared utilities (compute_sha256) to misc.py
* Standardize doc ID generation across all loaders
- Improve RAG system architecture
* All loaders now inherit consistent patterns from centralized BaseLoader
* Better separation of concerns with dedicated content management classes
* Standardized LoaderResult structure across all loader implementations
* chore: split text loaders file
* test: adding missing tests about RAG loaders
* refactor: QOL
* fix: add missing uv syntax on DOCXLoader
* Stagehand tool improvements
This commit significantly improves the StagehandTool reliability and usability when working with CrewAI agents by addressing several critical
issues:
## Key Improvements
### 1. Atomic Action Support
- Added _extract_steps() method to break complex instructions into individual steps
- Added _simplify_instruction() method for intelligent error recovery
- Sequential execution of micro-actions with proper DOM settling between steps
- Prevents token limit issues on complex pages by encouraging scoped actions
### 2. Enhanced Schema Design
- Made instruction field optional to handle navigation-only commands
- Added smart defaults for missing instructions based on command_type
- Improved field descriptions to guide agents toward atomic actions with location context
- Prevents "instruction Field required" validation errors
### 3. Intelligent API Key Management
- Added _get_model_api_key() method with automatic detection based on model type
- Support for OpenAI (GPT), Anthropic (Claude), and Google (Gemini) API keys
- Removes need for manual model API key configuration
### 4. Robust Error Recovery
- Step-by-step execution with individual error handling per atomic action
- Automatic retry with simplified instructions when complex actions fail
- Comprehensive error logging and reporting for debugging
- Graceful degradation instead of complete failure
### 5. Token Management & Performance
- Tool descriptions encourage atomic, scoped actions (e.g., "click search box in header")
- Prevents "prompt too long" errors on complex pages like Wikipedia
- Location-aware instruction patterns for better DOM targeting
- Reduced observe-act cycles through better instruction decomposition
### 6. Enhanced Testing Support
- Comprehensive async mock objects for testing mode
- Proper async/sync compatibility for different execution contexts
- Enhanced resource cleanup and session management
* Update stagehand_tool.py
removeing FixedStagehandTool in favour of StagehandTool
* removed comment
* Cleanup
Revoved unused class
Improved tool description
* feat: add SerperScrapeWebsiteTool for extracting clean content from URLs
* feat: add required SERPER_API_KEY env var validation to SerperScrapeWebsiteTool
* Enhance EnterpriseActionTool with improved schema processing and error handling
- Added methods for sanitizing names and processing schema types, including support for nested models and nullable types.
- Improved error handling during schema creation and processing, with warnings for failures.
- Updated parameter handling in the `_run` method to clean up `kwargs` before sending requests.
- Introduced a detailed description generation for nested schema structures to enhance tool documentation.
* Add tests for EnterpriseActionTool schema conversion and validation
- Introduced a new test class for validating complex nested schemas in EnterpriseActionTool.
- Added tests for schema conversion, optional fields, enum validation, and required nested fields.
- Implemented execution tests to ensure the tool can handle complex validated input correctly.
- Verified model naming conventions and added tests for simpler schemas with basic enum validation.
- Enhanced overall test coverage for the EnterpriseActionTool functionality.
* Update chromadb dependency version in pyproject.toml and uv.lock
- Changed chromadb version from >=0.4.22 to ==0.5.23 in both pyproject.toml and uv.lock to ensure compatibility and stability.
* Update test workflow configuration
- Changed EMBEDCHAIN_DB_URI to point to a temporary test database location.
- Added CHROMA_PERSIST_PATH for specifying the path to the Chroma test database.
- Cleaned up the test run command in the workflow file.
* reverted
* INTPYTHON-580 Design and Implement MongoDBVectorSearchTool
* add implementation
* wip
* wip
* finish tests
* add todo
* refactor to wrap langchain-mongodb
* cleanup
* address review
* Fix usage of EnvVar class
* inline code
* lint
* lint
* fix usage of SearchIndexModel
* Refactor: Update EnvVar import path and remove unused tests.utils module
- Changed import of EnvVar from tests.utils to crewai.tools in multiple files.
- Updated README.md for MongoDB vector search tool with additional context.
- Modified subprocess command in vector_search.py for package installation.
- Cleaned up test_generate_tool_specs.py to improve mock patching syntax.
- Deleted unused tests/utils.py file.
* update the crewai dep and the lockfile
* chore: update package versions and dependencies in uv.lock
- Removed `auth0-python` package.
- Updated `crewai` version to 0.140.0 and adjusted its dependencies.
- Changed `json-repair` version to 0.25.2.
- Updated `litellm` version to 1.72.6.
- Modified dependency markers for several packages to improve compatibility with Python versions.
* refactor: improve MongoDB vector search tool with enhanced error handling and new dimensions field
- Added logging for error handling in the _run method and during client cleanup.
- Introduced a new 'dimensions' field in the MongoDBVectorSearchConfig for embedding vector size.
- Refactored the _run method to return JSON formatted results and handle exceptions gracefully.
- Cleaned up import statements and improved code readability.
* address review
* update tests
* debug
* fix test
* fix test
* fix test
* support azure openai
---------
Co-authored-by: lorenzejay <lorenzejaytech@gmail.com>
* - Added CouchbaseFTSVectorStore as a CrewAI tool.
- Wrote a README to setup the tool.
- Wrote test cases.
- Added Couchbase as an optional dependency in the project.
* Fixed naming in some places. Added docstrings. Added instructions on how to create a vector search index.
* Fixed pyproject.toml
* error handling and response format
- Removed unnecessary ImportError for missing 'couchbase' package.
- Changed response format from a concatenated string to a JSON array for search results.
- Updated error handling to return error messages instead of raising exceptions in certain cases.
- Adjusted tests to reflect changes in response format and error handling.
* Update dependencies in pyproject.toml and uv.lock
- Changed pydantic version from 2.6.1 to 2.10.6 in both pyproject.toml and uv.lock.
- Updated crewai-tools version from 0.42.2 to 0.42.3 in uv.lock.
- Adjusted pydantic-core version from 2.33.1 to 2.27.2 in uv.lock, reflecting the new pydantic version.
* Removed restrictive pydantic version and updated uv.lock
* synced lockfile
* regenerated lockfile
* updated lockfile
* regenerated lockfile
* Update tool specifications for
* Fix test cases
---------
Co-authored-by: AayushTyagi1 <tyagiaayush5@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* refactor: enhance schema handling in EnterpriseActionTool
- Extracted schema property and required field extraction into separate methods for better readability and maintainability.
- Introduced methods to analyze field types and create Pydantic field definitions based on nullability and requirement status.
- Updated the _run method to handle required nullable fields, ensuring they are set to None if not provided in kwargs.
* refactor: streamline nullable field handling in EnterpriseActionTool
- Removed commented-out code related to handling required nullable fields for clarity.
- Simplified the logic in the _run method to focus on processing parameters without unnecessary comments.
- Added TYPE_CHECKING imports for FirecrawlApp to enhance type safety.
- Updated configuration keys in FirecrawlCrawlWebsiteTool and FirecrawlScrapeWebsiteTool to camelCase for consistency.
- Introduced error handling in the _run methods of both tools to ensure FirecrawlApp is properly initialized before usage.
- Adjusted parameters passed to crawl_url and scrape_url methods to use 'params' instead of unpacking the config dictionary directly.
* feat: add support for parsing actions list from environment variables
This commit introduces a new function, _parse_actions_list, to handle the parsing of a string representation of a list of tool names from environment variables. The CrewaiEnterpriseTools now utilizes this function to filter tools based on the parsed actions list, enhancing flexibility in tool selection. Additionally, a new test case is added to verify the correct usage of the environment actions list.
* test: simplify environment actions list test setup
This commit refactors the test for CrewaiEnterpriseTools to streamline the setup of environment variables. The environment token and actions list are now set in a single patch.dict call, improving readability and reducing redundancy in the test code.
* refactor: remove token validation from EnterpriseActionKitToolAdapter and CrewaiEnterpriseTools
This commit simplifies the initialization of the EnterpriseActionKitToolAdapter and CrewaiEnterpriseTools by removing the explicit validation for the enterprise action token. The token can now be set to None without raising an error, allowing for more flexible usage.
* added loggers for monitoring
* fixed typo
* fix: enhance token handling in EnterpriseActionKitToolAdapter and CrewaiEnterpriseTools
This commit improves the handling of the enterprise action token by allowing it to be fetched from environment variables if not provided. It adds checks to ensure the token is set before making API requests, enhancing robustness and flexibility.
* removed redundancy
* test: add new test for environment token fallback in CrewaiEnterpriseTools
This update introduces a new test case to verify that the environment token is used when no token is provided during the initialization of CrewaiEnterpriseTools. Additionally, minor formatting adjustments were made to existing assertions for consistency.
* test: update environment token test to clear environment variables
This change modifies the test for CrewaiEnterpriseTools to ensure that the environment variables are cleared before setting the test token. This ensures a clean test environment and prevents potential interference from other tests.
* drop redundancy
* feat: support to complex filter on ToolCollection
* refactor: use proper tool collection methot to filter tool in CrewAiEnterpriseTools
* feat: allow to filter available MCP tools
This change allows accessing tools by name (tools["tool_name"]) in addition to
index (tools[0]), making it more intuitive and convenient to work with multiple
tools without needing to remember their position in the list
* feat: add explictly package_dependencies in the Tools
* feat: collect package_dependencies from Tool to add in tool.specs.json
* feat: add default value in run_params Tool' specs
* fix: support get boolean values
This commit also refactor test to make easier define newest attributes into a Tool
* refactor: remove token validation from EnterpriseActionKitToolAdapter and CrewaiEnterpriseTools
This commit simplifies the initialization of the EnterpriseActionKitToolAdapter and CrewaiEnterpriseTools by removing the explicit validation for the enterprise action token. The token can now be set to None without raising an error, allowing for more flexible usage.
* added loggers for monitoring
* fixed typo
* feat: generate tool specs file based on their schema definition
* generate tool spec after publishing a new release
* feat: support add available env-vars to tool.specs.json
* refactor: use better identifier names on tool specs
* feat: change tool specs generation to run daily
* feat: add auth token to notify api about tool changes
* refactor: use humanized_name instead of verbose_name
* refactor: generate tool spec after pushing to main
This commit also fix the remote upstream & updated the notify api
* feat: add ZapierActionTool and ZapierActionsAdapter for integrating with Zapier actions
- Introduced ZapierActionTool to execute Zapier actions with dynamic parameter handling.
- Added ZapierActionsAdapter to fetch available Zapier actions and convert them into BaseTool instances.
- Updated __init__.py files to include new tools and ensure proper imports.
- Created README.md for ZapierActionTools with installation instructions and usage examples.
* fix: restore ZapierActionTool import and enhance logging in Zapier adapter
- Reintroduced the import of ZapierActionTool in __init__.py for proper accessibility.
- Added logging for error handling in ZapierActionsAdapter to improve debugging.
- Updated ZapierActionTools factory function to include logging for missing API key.
* feat(tavily): add TavilyExtractorTool and TavilySearchTool with documentation
* feat(tavily): enhance TavilyExtractorTool and TavilySearchTool with additional parameters and improved error handling
* fix(tavily): update installation instructions for 'tavily-python' package in TavilyExtractorTool and TavilySearchTool
---------
Co-authored-by: lorenzejay <lorenzejaytech@gmail.com>
The built-in `callable` type is not subscriptable, and thus not usable
in a type annotation. When this tool is used, this warning is generated:
```
.../_generate_schema.py:623: UserWarning: <built-in function callable> is not a Python type (it may be an instance of an object), Pydantic will allow any object with no validation since we cannot even enforce that the input is an instance of the given type. To get rid of this error wrap the type with `pydantic.SkipValidation`.
```
This change fixes the warning.
* FileCompressorTool with support for files and subdirectories
* README.md
* Updated files_compressor_tool.py
* Enhanced FileCompressorTool different compression formats
* Update README.md
* Updated with lookup tables
* Updated files_compressor_tool.py
* Added Test Cases
* Removing Test_Cases.md inorder to update with correct test case as per the review
* Added Test Cases
* Test Cases with patch,MagicMock
* Empty lines Removed
* Updated Test Case,Ensured Maximum Scenarios
* Deleting old one
* Updated __init__.py to include FileCompressorTool
* Update __init__.py to add FileCompressorTool
* fix FirecrawlScrapeWebsiteTool: add missing config parameter and correct Dict type annotation
- Add required config parameter when creating the tool
- Change type hint from `dict` to `Dict` to resolve Pydantic validation issues
* Update firecrawl_scrape_website_tool.py
- removing optional config
- removing timeout from Pydantic model
* Removing config from __init__
- removing config from __init__
* Update firecrawl_scrape_website_tool.py
- removing timeout
* fix: remove kwargs from all (except mysql & pg) RagTools
The agent uses the tool description to decide what to propagate when a tool with **kwargs is found, but this often leads to failures during the tool invocation step.
This happens because the final description ends up like this:
```
CrewStructuredTool(name='Knowledge base', description='Tool Name: Knowledge base
Tool Arguments: {'query': {'description': None, 'type': 'str'}, 'kwargs': {'description': None, 'type': 'Any'}}
Tool Description: A knowledge base that can be used to answer questions.')
```
The agent then tries to infer and pass a kwargs parameter, which isn’t supported by the schema at all.
* feat: adding test to search tools
* feat: add db (chromadb folder) to .gitignore
* fix: fix github search integration
A few attributes were missing when calling the .add method: data_type and loader.
Also, update the query search according to the EmbedChain documentation, the query must include the type and repo keys
* fix: rollback YoutubeChannel paramenter
* chore: fix type hinting for CodeDocs search
* fix: ensure proper configuration when call `add`
According to the documentation, some search methods must be defined as either a loader or a data_type. This commit ensures that.
* build: add optional-dependencies for github and xml search
* test: mocking external requests from search_tool tests
* build: add pytest-recording as devDependencie
* Enhance EnterpriseActionKitToolAdapter to support custom project IDs
- Updated the EnterpriseActionKitToolAdapter and EnterpriseActionTool classes to accept an optional project_id parameter, allowing for greater flexibility in API interactions.
- Modified API URL construction to utilize the provided project_id instead of a hardcoded default.
- Updated the CrewaiEnterpriseTools factory function to accept and pass the project_id to the adapter.
* for factory in mind
* Allow setting custom LLM for the vision tool
Defaults to gpt-4o-mini otherwise
* Enhance VisionTool with model management and improved initialization
- Added support for setting a custom model identifier with a default of "gpt-4o-mini".
- Introduced properties for model management, allowing dynamic updates and resetting of the LLM instance.
- Updated the initialization method to accept an optional LLM and model parameter.
- Refactored the image processing logic for clarity and efficiency.
* docstrings
* Add stop config
---------
Co-authored-by: lorenzejay <lorenzejaytech@gmail.com>
* Corrected to adapt to firecrawl package use
Was leading to an error too many arguments when calling the craw_url() function
* Corrected to adapt to firecrawl package use
Corrected to avoid too many arguments error when calling firecrawl scrape_url function
* Corrected to adapt to firecrawl package use
Corrected to avoid error too many arguments when calling firecrawl search() function
* fix: fix firecrawl integration
* feat: support define Firecrawl using any config
Currently we pre-defined the available paramenters to call Firecrawl, this commit adds support to receive any parameter and propagate them
* docs: added doc string to Firecrawls classes
---------
Co-authored-by: Lucas Gomide <lucaslg200@gmail.com>
- Removed the main execution block that included token validation and agent/task setup for testing.
- This change streamlines the adapter's code, focusing on its core functionality without execution logic.
- Introduced EnterpriseActionTool to execute specific enterprise actions with dynamic parameter validation.
- Added EnterpriseActionKitToolAdapter to manage and create tool instances for available enterprise actions.
- Implemented methods for fetching action schemas from the API and creating corresponding tools.
- Enhanced error handling and provided detailed descriptions for tool parameters.
- Included a main execution block for testing the adapter with a sample agent and task setup.
* feat: add a safety sandbox to run Python code
This sandbox blocks a bunch of dangerous imports and built-in functions
* feat: add more logs and warning about code execution
* test: add tests to cover sandbox code execution
* docs: add Google-style docstrings and type hints to printer and code_interpreter
* chore: renaming globals and locals paramenters
---------
Co-authored-by: Greyson Lalonde <greyson.r.lalonde@gmail.com>
* Add chunk reading functionality to FileReadTool
- Added start_line parameter to specify which line to start reading from
- Added line_count parameter to specify how many lines to read
- Updated documentation with new parameters and examples
* [FIX] Bugs and Disscutions
Fixed: start_line negative value
Improved: File Reading Operations
* [IMPROVE] Simplify line selection
* [REFACTOR] use mock_open while preserving essential filesystem tests
* mcp server proposal
* Refactor MCP server implementation: rename MCPServer to MCPServerAdapter and update usage examples. Adjust error message for optional dependencies installation.
* Update MCPServerAdapter usage examples to remove unnecessary parameters in context manager instantiation.
* Refactor MCPServerAdapter to move optional dependency imports inside the class constructor, improving error handling for missing dependencies.
* Enhance MCPServerAdapter by adding type hinting for server parameters and improving error handling during server startup. Optional dependency imports are now conditionally loaded, ensuring clearer error messages for missing packages.
* Refactor MCPServerAdapter to improve error handling for missing 'mcp' package. Conditional imports are now used, prompting users to install the package if not found, enhancing user experience during server initialization.
* Refactor MCPServerAdapter to ensure proper cleanup after usage. Removed redundant exception handling and ensured that the server stops in a finally block, improving resource management.
* add documentation
* fix typo close -> stop
* add tests and fix double call with context manager
* Enhance MCPServerAdapter with logging capabilities and improved error handling during initialization. Added logging for cleanup errors and refined the structure for handling missing 'mcp' package dependencies.
---------
Co-authored-by: lorenzejay <lorenzejaytech@gmail.com>
- Refactor Selenium scraping tool to use single driver instance
- Add headless mode configuration for Chrome
- Improve error handling with try/finally
- Simplify code structure and improve maintainability
[{'code': 'unrecognized_keys', 'keys': ['crawlerOptions', 'timeout'], 'path': [], 'message': 'Unrecognized key in body -- please review the v1 API documentation for request body changes'}]) because it has been updated to v1. I updated the sent parameters to match v1 and updated their description in the readme file
- Re-add country (gl), location, and locale (hl) parameters to SerperDevTool class
- Update payload construction in _make_api_request to include localization params
- Add schema validation for localization parameters
- Update documentation and examples to demonstrate parameter usage
These parameters were accidentally removed in the previous enhancement PR and are crucial for:
- Getting region-specific search results (via country/gl)
- Targeting searches to specific cities (via location)
- Getting results in specific languages (via locale/hl)
BREAKING CHANGE: None - This restores previously available functionality
This commit adds a new StagehandTool that integrates Stagehand's AI-powered web automation capabilities into CrewAI. The tool provides access to Stagehand's three core APIs:
- act: Perform web interactions
- extract: Extract information from web pages
- observe: Monitor web page changes
Each function takes atomic instructions to increase reliability.
Co-Authored-By: Joe Moura <joao@crewai.com>
- Add comprehensive URL validation in schema and _create_driver
- Add URL format, length, and character validation
- Add meaningful error messages for validation failures
- Add return_html usage examples in README.md
Co-Authored-By: Joe Moura <joao@crewai.com>
- When passing result_as_answer=True, it will return ToolOutput so it won't pass pydantic validation as a string
- Get content of ToolOutput before return
- Add support for multiple search types (general and news)
- Implement knowledge graph integration
- Add structured result processing for organic results, "People Also Ask", and related searches
- Enhance error handling with try-catch blocks and logging
- Update documentation with comprehensive feature list and usage examples
- Fixed an issue where multiple tools failed to function if parameters were provided after tool creation.
- Updated tools to correctly process source file/URL passed by the agent post-creation as per documentation.
Closes #<47>
Added two additional functionalities:
1) added the ability to save the server results to a file
2) added the ability to set the number of results returned
Can be used as follows:
serper_tool = SerperDevTool(file_save=True, n_results=20)
- Wrapped the file reading functionality inside a `_run` method.
- Added error handling to return a descriptive error message if an exception occurs during file reading.
In original code n_results is always None so you always get only 10 results from Serper. With this change, when you explicitly set the n_results parameter when creating a SerperDevTool object it is taken into account.
# required to fetch internal or private CodeQL packs
packages:read
# only required for workflows in private repositories
actions:read
contents:read
strategy:
fail-fast:false
matrix:
include:
- language:actions
build-mode:none
- language:python
build-mode:none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name:Checkout repository
uses:actions/checkout@v4
# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1
# Initializes the CodeQL tools for scanning.
- name:Initialize CodeQL
uses:github/codeql-action/init@v3
with:
languages:${{ matrix.language }}
build-mode:${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if:matrix.build-mode == 'manual'
shell:bash
run:|
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
description: Learn how to use the CrewAI CLI to interact with CrewAI.
icon: terminal
mode: "wide"
---
<Warning>Since release 0.140.0, CrewAI Enterprise started a process of migrating their login provider. As such, the authentication flow via CLI was updated. Users that use Google to login, or that created their account after July 3rd, 2025 will be unable to log in with older versions of the `crewai` library.</Warning>
@@ -282,7 +283,25 @@ Watch this video tutorial for a step-by-step demonstration of deploying your cre
allowfullscreen
></iframe>
### 11. API Keys
### 11. Login
Authenticate with CrewAI Enterprise using a secure device code flow (no email entry required).
```shell Terminal
crewai login
```
What happens:
- A verification URL and short code are displayed in your terminal
- Your browser opens to the verification URL
- Enter/confirm the code to complete authentication
Notes:
- The OAuth2 provider and domain are configured via `crewai config` (defaults use `login.crewai.com`)
- After successful login, the CLI also attempts to authenticate to the Tool Repository automatically
- If you reset your configuration, run `crewai login` again to re-authenticate
### 12. API Keys
When running ```crewai create crew``` command, the CLI will show you a list of available LLM providers to choose from, followed by model selection for your chosen provider.
@@ -310,7 +329,7 @@ See the following link for each provider's key name:
@@ -385,6 +400,14 @@ Reset all configuration to defaults:
crewai config reset
```
<Tip>
After resetting configuration, re-run `crewai login` to authenticate again.
</Tip>
<Tip>
CrewAI CLI handles authentication to the Tool Repository automatically when adding packages to your project. Just append `crewai` before any `uv` command to use it. E.g. `crewai uv add requests`. For more information, see [Tool Repository](https://docs.crewai.com/enterprise/features/tool-repository) docs.
</Tip>
<Note>
Configuration settings are stored in `~/.config/crewai/settings.json`. Some settings like organization name and UUID are read-only and managed through authentication and organization commands. Tool repository related settings are hidden and cannot be set directly by users.
description: Learn how to create and manage AI workflows using CrewAI Flows.
icon: arrow-progress
mode: "wide"
---
## Overview
@@ -97,7 +98,13 @@ The state's unique ID and stored data can be useful for tracking flow executions
### @start()
The `@start()` decorator is used to mark a method as the starting point of a Flow. When a Flow is started, all the methods decorated with `@start()` are executed in parallel. You can have multiple start methods in a Flow, and they will all be executed when the Flow is started.
The `@start()` decorator marks entry points for a Flow. You can:
description: What is knowledge in CrewAI and how to use it.
icon: book
mode: "wide"
---
## Overview
@@ -24,6 +25,41 @@ For file-based Knowledge Sources, make sure to place your files in a `knowledge`
Also, use relative paths from the `knowledge` directory when creating the source.
</Tip>
### Vector store (RAG) client configuration
CrewAI exposes a provider-neutral RAG client abstraction for vector stores. The default provider is ChromaDB, and Qdrant is supported as well. You can switch providers using configuration utilities.
Supported today:
- ChromaDB (default)
- Qdrant
```python Code
from crewai.rag.config.utils import set_rag_config, get_rag_client, clear_rag_config
# ChromaDB (default)
from crewai.rag.chromadb.config import ChromaDBConfig
set_rag_config(ChromaDBConfig())
chromadb_client = get_rag_client()
# Qdrant
from crewai.rag.qdrant.config import QdrantConfig
set_rag_config(QdrantConfig())
qdrant_client = get_rag_client()
# Example operations (same API for any provider)
client = qdrant_client # or chromadb_client
client.create_collection(collection_name="docs")
client.add_documents(
collection_name="docs",
documents=[{"id": "1", "content": "CrewAI enables collaborative AI agents."}],
description: Leveraging memory systems in the CrewAI framework to enhance agent capabilities.
icon: database
mode: "wide"
---
## Overview
The CrewAI framework provides a sophisticated memory system designed to significantly enhance AI agent capabilities. CrewAI offers **three distinct memory approaches** that serve different use cases:
The CrewAI framework provides a sophisticated memory system designed to significantly enhance AI agent capabilities. CrewAI offers **two distinct memory approaches** that serve different use cases:
Entity Memory supports batching when saving multiple entities at once. When you pass a list of `EntityMemoryItem`, the system:
- Emits a single MemorySaveStartedEvent with `entity_count`
- Saves each entity internally, collecting any partial errors
- Emits MemorySaveCompletedEvent with aggregate metadata (saved count, errors)
- Raises a partial-save exception if some entities failed (includes counts)
This improves performance and observability when writing many entities in one operation.
## 2. External Memory
External Memory provides a standalone memory system that operates independently from the crew's built-in memory. This is ideal for specialized memory providers or cross-application memory sharing.
@@ -1041,8 +1053,8 @@ CrewAI emits the following memory-related events:
Track memory operation timing to optimize your application:
```python
from crewai.utilities.events.base_event_listener import BaseEventListener
Memory events can be forwarded to analytics and monitoring platforms to track performance metrics, detect anomalies, and visualize memory usage patterns:
```python
from crewai.utilities.events.base_event_listener import BaseEventListener
description: Detailed guide on managing and creating tasks within the CrewAI framework.
icon: list-check
mode: "wide"
---
## Overview
@@ -59,6 +60,12 @@ crew = Crew(
| **Output Pydantic** _(optional)_ | `output_pydantic` | `Optional[Type[BaseModel]]` | A Pydantic model for task output. |
| **Callback** _(optional)_ | `callback` | `Optional[Any]` | Function/object to be executed after task completion. |
| **Guardrail** _(optional)_ | `guardrail` | `Optional[Callable]` | Function to validate task output before proceeding to next task. |
| **Guardrail Max Retries** _(optional)_ | `guardrail_max_retries` | `Optional[int]` | Maximum number of retries when guardrail validation fails. Defaults to 3. |
description: 'Learn how to use Agent Repositories to share and reuse your agents across teams and projects'
icon: 'database'
mode: "wide"
---
Agent Repositories allow enterprise users to store, share, and reuse agent definitions across teams and projects. This feature enables organizations to maintain a centralized library of standardized agents, promoting consistency and reducing duplication of effort.
description: "Using the Tool Repository to manage your tools"
icon: "toolbox"
mode: "wide"
---
## Overview
@@ -51,6 +52,36 @@ researcher = Agent(
)
```
## Adding other packages after installing a tool
After installing a tool from the CrewAI Enterprise Tool Repository, you need to use the `crewai uv` command to add other packages to your project.
Using pure `uv` commands will fail due to authentication to tool repository being handled by the CLI. By using the `crewai uv` command, you can add other packages to your project without having to worry about authentication.
Any `uv` command can be used with the `crewai uv` command, making it a powerful tool for managing your project's dependencies without the hassle of managing authentication through environment variables or other methods.
Say that you have installed a custom tool from the CrewAI Enterprise Tool Repository called "my-tool":
```bash
crewai tool install my-tool
```
And now you want to add another package to your project, you can use the following command:
```bash
crewai uv add requests
```
Other commands like `uv sync` or `uv remove` can also be used with the `crewai uv` command:
```bash
crewai uv sync
```
```bash
crewai uv remove requests
```
This will add the package to your project and update `pyproject.toml` accordingly.
description: "Using Webhook Streaming to stream events to your webhook"
icon: "webhook"
mode: "wide"
---
## Overview
@@ -62,16 +63,96 @@ As requests are sent over HTTP, the order of events can't be guaranteed. If you
CrewAI supports both system events and custom events in Enterprise Event Streaming. These events are sent to your configured webhook endpoint during crew and flow execution.
- `crew_kickoff_started`
- `crew_step_started`
- `crew_step_completed`
- `crew_execution_completed`
- `llm_call_started`
- `llm_call_completed`
- `tool_usage_started`
- `tool_usage_completed`
- `crew_test_failed`
- *...and others*
### Flow Events:
- flow_created
- flow_started
- flow_finished
- flow_plot
- method_execution_started
- method_execution_finished
- method_execution_failed
### Agent Events:
- agent_execution_started
- agent_execution_completed
- agent_execution_error
- lite_agent_execution_started
- lite_agent_execution_completed
- lite_agent_execution_error
- agent_logs_started
- agent_logs_execution
- agent_evaluation_started
- agent_evaluation_completed
- agent_evaluation_failed
### Crew Events:
- crew_kickoff_started
- crew_kickoff_completed
- crew_kickoff_failed
- crew_train_started
- crew_train_completed
- crew_train_failed
- crew_test_started
- crew_test_completed
- crew_test_failed
- crew_test_result
### Task Events:
- task_started
- task_completed
- task_failed
- task_evaluation
### Tool Usage Events:
- tool_usage_started
- tool_usage_finished
- tool_usage_error
- tool_validate_input_error
- tool_selection_error
- tool_execution_error
### LLM Events:
- llm_call_started
- llm_call_completed
- llm_call_failed
- llm_stream_chunk
### LLM Guardrail Events:
- llm_guardrail_started
- llm_guardrail_completed
### Memory Events:
- memory_query_started
- memory_query_completed
- memory_query_failed
- memory_save_started
- memory_save_completed
- memory_save_failed
- memory_retrieval_started
- memory_retrieval_completed
### Knowledge Events:
- knowledge_search_query_started
- knowledge_search_query_completed
- knowledge_search_query_failed
- knowledge_query_started
- knowledge_query_completed
- knowledge_query_failed
### Reasoning Events:
- agent_reasoning_started
- agent_reasoning_completed
- agent_reasoning_failed
Event names match the internal event bus. See [GitHub source](https://github.com/crewAIInc/crewAI/tree/main/src/crewai/utilities/events) for the full list.
description: "Automatically execute your CrewAI workflows when specific events occur in connected integrations"
icon: "bolt"
mode: "wide"
---
Automation triggers enable you to automatically run your CrewAI deployments when specific events occur in your connected integrations, creating powerful event-driven workflows that respond to real-time changes in your business systems.
## Overview
With automation triggers, you can:
- **Respond to real-time events** - Automatically execute workflows when specific conditions are met
- **Integrate with external systems** - Connect with platforms like Gmail, Outlook, OneDrive, JIRA, Slack, Stripe and more
- **Scale your automation** - Handle high-volume events without manual intervention
- **Maintain context** - Access trigger data within your crews and flows
## Managing Automation Triggers
### Viewing Available Triggers
To access and manage your automation triggers:
1. Navigate to your deployment in the CrewAI dashboard
2. Click on the **Triggers** tab to view all available trigger integrations
<Frame>
<img src="/images/enterprise/list-available-triggers.png" alt="List of available automation triggers" />
</Frame>
This view shows all the trigger integrations available for your deployment, along with their current connection status.
### Enabling and Disabling Triggers
Each trigger can be easily enabled or disabled using the toggle switch:
<Frame>
<img src="/images/enterprise/trigger-selected.png" alt="Enable or disable triggers with toggle" />
</Frame>
- **Enabled (blue toggle)**: The trigger is active and will automatically execute your deployment when the specified events occur
- **Disabled (gray toggle)**: The trigger is inactive and will not respond to events
Simply click the toggle to change the trigger state. Changes take effect immediately.
### Monitoring Trigger Executions
Track the performance and history of your triggered executions:
<Frame>
<img src="/images/enterprise/list-executions.png" alt="List of executions triggered by automation" />
</Frame>
## Building Automation
Before building your automation, it's helpful to understand the structure of trigger payloads that your crews and flows will receive.
### Payload Samples Repository
We maintain a comprehensive repository with sample payloads from various trigger sources to help you build and test your automations:
- If you are developing, make sure the inputs include the `crewai_trigger_payload` parameter with the correct payload
Automation triggers transform your CrewAI deployments into responsive, event-driven systems that can seamlessly integrate with your existing business processes and tools.
description: "Configure Azure OpenAI with Crew Studio for enterprise LLM connections"
icon: "microsoft"
mode: "wide"
---
This guide walks you through connecting Azure OpenAI with Crew Studio for seamless enterprise AI operations.
@@ -9,12 +10,12 @@ This guide walks you through connecting Azure OpenAI with Crew Studio for seamle
## Setup Process
<Steps>
<Step title="Access Azure OpenAI Studio">
1. In Azure, go to `Azure AI Services > select your deployment > open Azure OpenAI Studio`.
<Step title="Access Azure AI Foundry">
1. In Azure, go to [Azure AI Foundry](https://ai.azure.com/) > select your Azure OpenAI deployment.
2. On the left menu, click `Deployments`. If you don't have one, create a deployment with your desired model.
3. Once created, select your deployment and locate the `Target URI` and `Key` on the right side of the page. Keep this page open, as you'll need this information.
description: "Trigger CrewAI crews directly from HubSpot Workflows"
icon: "hubspot"
mode: "wide"
---
This guide provides a step-by-step process to set up HubSpot triggers for CrewAI Enterprise, enabling you to initiate crews directly from HubSpot Workflows.
description: "Learn how to implement Human-In-The-Loop workflows in CrewAI for enhanced decision-making"
icon: "user-check"
mode: "wide"
---
Human-In-The-Loop (HITL) is a powerful approach that combines artificial intelligence with human expertise to enhance decision-making and improve task outcomes. This guide shows you how to implement HITL within CrewAI.
description: "Learn how to invite and manage team members in your CrewAI Enterprise organization"
icon: "users"
mode: "wide"
---
As an administrator of a CrewAI Enterprise account, you can easily invite new team members to join your organization. This guide will walk you through the process step-by-step.
description: "Automate CrewAI Enterprise workflows using webhooks with platforms like ActivePieces, Zapier, and Make.com"
icon: "webhook"
mode: "wide"
---
CrewAI Enterprise allows you to automate your workflow using webhooks. This article will guide you through the process of setting up and using webhooks to kickoff your crew execution, with a focus on integration with ActivePieces, a workflow automation platform similar to Zapier and Make.com.
@@ -79,14 +80,24 @@ CrewAI Enterprise allows you to automate your workflow using webhooks. This arti
## Webhook Output Examples
**Note:** Any `meta` object provided in your kickoff request will be included in all webhook payloads, allowing you to track requests and maintain context across the entire crew execution lifecycle.
<Tabs>
<Tab title="Step Webhook">
`stepWebhookUrl` - Callback that will be executed upon each agent inner thought
```json
{
"action": "**Preliminary Research Report on the Financial Industry for crewai Enterprise Solution**\n1. Industry Overview and Trends\nThe financial industry in ....\nConclusion:\nThe financial industry presents a fertile ground for implementing AI solutions like crewai, particularly in areas such as digital customer engagement, risk management, and regulatory compliance. Further engagement with the lead is recommended to better tailor the crewai solution to their specific needs and scale.",
"task_id": "97eba64f-958c-40a0-b61c-625fe635a3c0"
"prompt": "Research the financial industry for potential AI solutions",
"thought": "I need to conduct preliminary research on the financial industry",
"tool": "research_tool",
"tool_input": "financial industry AI solutions",
"result": "**Preliminary Research Report on the Financial Industry for crewai Enterprise Solution**\n1. Industry Overview and Trends\nThe financial industry in ....\nConclusion:\nThe financial industry presents a fertile ground for implementing AI solutions like crewai, particularly in areas such as digital customer engagement, risk management, and regulatory compliance. Further engagement with the lead is recommended to better tailor the crewai solution to their specific needs and scale.",
@@ -95,8 +106,21 @@ CrewAI Enterprise allows you to automate your workflow using webhooks. This arti
```json
{
"description": "Using the information gathered from the lead's data, conduct preliminary research on the lead's industry, company background, and potential use cases for crewai. Focus on finding relevant data that can aid in scoring the lead and planning a strategy to pitch them crewai.The financial industry presents a fertile ground for implementing AI solutions like crewai, particularly in areas such as digital customer engagement, risk management, and regulatory compliance. Further engagement with the lead is recommended to better tailor the crewai solution to their specific needs and scale.",
"task_id": "97eba64f-958c-40a0-b61c-625fe635a3c0"
"description": "Using the information gathered from the lead's data, conduct preliminary research on the lead's industry, company background, and potential use cases for crewai. Focus on finding relevant data that can aid in scoring the lead and planning a strategy to pitch them crewai.",
"name": "Industry Research Task",
"expected_output": "Detailed research report on the financial industry",
"summary": "The financial industry presents a fertile ground for implementing AI solutions like crewai, particularly in areas such as digital customer engagement, risk management, and regulatory compliance. Further engagement with the lead is recommended to better tailor the crewai solution to their specific needs and scale.",
"agent": "Research Agent",
"output": "**Preliminary Research Report on the Financial Industry for crewai Enterprise Solution**\n1. Industry Overview and Trends\nThe financial industry in ....\nConclusion:\nThe financial industry presents a fertile ground for implementing AI solutions like crewai, particularly in areas such as digital customer engagement, risk management, and regulatory compliance.",
"result": "**Final Analysis Report**\n\nLead Score: Customer service enhancement and compliance are particularly relevant.\n\nTalking Points:\n- Highlight how crewai's AI solutions can transform customer service\n- Discuss crewai's potential for sustainability goals\n- Emphasize compliance capabilities\n- Stress adaptability for various operation scales",
"result_json": {
"lead_score": "Customer service enhancement, and compliance are particularly relevant.",
"talking_points": [
"Highlight how crewai's AI solutions can transform customer service with automated, personalized experiences and 24/7 support, improving both customer satisfaction and operational efficiency.",
@@ -114,6 +139,15 @@ CrewAI Enterprise allows you to automate your workflow using webhooks. This arti
"Emphasize crewai's ability to enhance compliance with evolving regulations through efficient data processing and reporting, reducing the risk of non-compliance penalties.",
"Stress the adaptability of crewai to support both extensive multinational operations and smaller, targeted projects, ensuring the solution grows with the institution's needs."
description: "Trigger CrewAI crews from Zapier workflows to automate cross-app workflows"
icon: "bolt"
mode: "wide"
---
This guide will walk you through the process of setting up Zapier triggers for CrewAI Enterprise, allowing you to automate workflows between CrewAI Enterprise and other applications.
description: Dive deeper into low-level prompt customization for CrewAI, enabling super custom and complex use cases for different models and languages.
description: Learn how to assess your AI application needs and choose the right approach between Crews and Flows based on complexity and precision requirements.
description: Get started with CrewAI - Install, configure, and build your first AI crew
icon: wrench
mode: "wide"
---
## Video Tutorial
@@ -30,6 +31,12 @@ Watch this video tutorial for a step-by-step demonstration of the installation p
If you need to update Python, visit [python.org/downloads](https://python.org/downloads)
</Note>
<Note>
**OpenAI SDK Requirement**
CrewAI 0.175.0 requires `openai >= 1.13.3`. If you manage dependencies yourself, ensure your environment satisfies this constraint to avoid import/runtime issues.
</Note>
CrewAI uses the `uv` as its dependency management and package handling tool. It simplifies project setup and execution, offering a seamless experience.
If you haven't installed `uv` yet, follow **step 1** to quickly get it set up on your system, else you can skip to **step 2**.
description: Learn how to use before and after kickoff hooks in CrewAI
mode: "wide"
---
CrewAI provides hooks that allow you to execute code before and after a crew's kickoff. These hooks are useful for preprocessing inputs or post-processing results.
description: Comprehensive guide on crafting, using, and managing custom tools within the CrewAI framework, including new functionalities and error handling.
description: "Learn how to use DALL-E for AI-powered image generation in your CrewAI projects"
icon: "image"
mode: "wide"
---
CrewAI supports integration with OpenAI's DALL-E, allowing your AI agents to generate images as part of their tasks. This guide will walk you through how to set up and use the DALL-E tool in your CrewAI projects.
description: A comprehensive guide to understanding and applying the hierarchical process within your CrewAI projects, updated to reflect the latest coding practices and functionalities.
description: "Learn how to implement Human-in-the-Loop workflows in CrewAI for enhanced decision-making"
icon: "user-check"
mode: "wide"
---
Human-in-the-Loop (HITL) is a powerful approach that combines artificial intelligence with human expertise to enhance decision-making and improve task outcomes. This guide shows you how to implement HITL within CrewAI.
description: Integrating CrewAI with human input during execution in complex decision-making processes and leveraging the full capabilities of the agent's attributes and tools.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.