Compare commits

...

745 Commits

Author SHA1 Message Date
Greyson Lalonde
2b85244b36 dont cache deps 2025-09-27 20:37:48 -04:00
Greyson Lalonde
2b6fba8390 fix: try install project 2025-09-27 20:34:13 -04:00
Greyson Lalonde
37b49756b5 fix: try from root 2025-09-27 20:31:47 -04:00
Greyson Lalonde
6fd2d8e19b fix: change ref, lint 2025-09-27 17:25:15 -04:00
Greyson Lalonde
4d79c41a06 feat: move core functionality to lib workspace structure 2025-09-27 17:22:46 -04:00
Greyson Lalonde
f0762473d0 chore: update CI workflows and dependencies for workspace structure 2025-09-27 16:37:08 -04:00
Greyson Lalonde
aca826c553 refactor: move rag package to lib/core and extract standalone utilities 2025-09-27 16:31:54 -04:00
Greyson LaLonde
1d1f5f455c test: fix lite agent guardrail test assertions 2025-09-26 23:15:37 -04:00
Greyson LaLonde
58b72c3948 test: mark tracing tests requiring API connections to skip in CI 2025-09-26 23:10:45 -04:00
Greyson LaLonde
3b18e7d971 test: fix task interpolation test assertion and update cassette 2025-09-26 23:07:51 -04:00
Greyson LaLonde
c062992806 test: mark tests requiring external APIs to skip in CI 2025-09-26 23:03:38 -04:00
Greyson LaLonde
9d3fe72e75 test: fix evaluation tests and update cassettes 2025-09-26 22:59:43 -04:00
Greyson LaLonde
d2249e621d test: mark converter tests requiring local services to skip in CI 2025-09-26 22:50:26 -04:00
Greyson LaLonde
03a711c365 rerecord cassetes 2025-09-26 22:44:04 -04:00
Greyson LaLonde
72366e846e fix: handle source code extraction errors for lambda guardrails
- 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
2025-09-26 22:37:31 -04:00
Greyson LaLonde
0a09beca03 fix: improve VCR configuration and skip local service tests in CI
- 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
2025-09-26 22:30:34 -04:00
Greyson LaLonde
76ad0e0a10 test: re-record async tool test cassettes with proper mocking 2025-09-26 22:21:46 -04:00
Greyson LaLonde
6cf7da6d13 fix: remove broken VCR cassettes for async tool tests
These cassettes need to be re-recorded with proper API mocking
2025-09-26 22:18:37 -04:00
Greyson LaLonde
02267c1435 fix: specify tests directory in pytest command to avoid import conflicts 2025-09-26 22:14:02 -04:00
Greyson LaLonde
a717f44011 refactor: move src and tests from lib/crewai to root 2025-09-26 22:10:31 -04:00
Greyson LaLonde
b88f065ad8 feat: sync with upstream crewai-tools changes 2025-09-26 15:37:34 -04:00
Greyson LaLonde
e2270456c4 feat: add crewai-tools library to workspace
- 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
2025-09-26 15:05:41 -04:00
Greyson LaLonde
3eeb9b8f6c chore: prepare for crewai-tools migration 2025-09-26 14:52:25 -04:00
Greyson LaLonde
14a1bf6317 feat: add crewai-tools library to workspace 2025-09-26 14:37:51 -04:00
Greyson LaLonde
98a8607c87 chore: update workspace configuration and lock file 2025-09-26 14:32:15 -04:00
Greyson LaLonde
daf6f679ff feat: restructure project as UV workspace with crewai in lib/ 2025-09-26 14:29:28 -04:00
Greyson LaLonde
74b5c88834 Merge branch 'main' into release/v1.0.0-alpha.1 2025-09-26 13:32:05 -04:00
Lorenze Jay
7d5cd4d3e2 chore: bump CrewAI version to 0.201.1 and update dependencies in project templates (#3605)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Update Test Durations / update-durations (3.10) (push) Has been cancelled
Update Test Durations / update-durations (3.11) (push) Has been cancelled
Update Test Durations / update-durations (3.12) (push) Has been cancelled
Update Test Durations / update-durations (3.13) (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
- Update version in __init__.py to 0.201.1
- Modify dependency versions in pyproject.toml for crew, flow, and tool templates to require CrewAI 0.201.1
2025-09-26 09:58:00 -07:00
Greyson LaLonde
73e932bfee fix: update embedding functions to inherit from chromadb callable 2025-09-26 12:25:19 -04:00
Greyson LaLonde
12fa7e2ff1 fix: rename watson to watsonx embedding provider and prefix env vars
- 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)
2025-09-26 10:57:18 -04:00
Greyson LaLonde
091d1267d8 fix: prefix embedding provider env vars with EMBEDDINGS_ 2025-09-26 10:50:45 -04:00
Lorenze Jay
b5b10a8cde chore: update version and dependencies to 0.201.0 (#3593)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Update Test Durations / update-durations (3.10) (push) Has been cancelled
Update Test Durations / update-durations (3.11) (push) Has been cancelled
Update Test Durations / update-durations (3.12) (push) Has been cancelled
Update Test Durations / update-durations (3.13) (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
- 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
2025-09-25 18:04:12 -07:00
Greyson LaLonde
2485ed93d6 feat: upgrade chromadb to v1.1.0, improve types
- 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
2025-09-25 20:48:37 -04:00
Greyson LaLonde
ce5ea9be6f feat: add custom embedding types and migrate providers
- 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
2025-09-25 18:28:39 -04:00
Lucas Gomide
13e5ec711d feat: add apps & actions attributes to Agent (#3504)
* feat: add app attributes to Agent

* feat: add actions attribute to Agent

* chore: resolve linter issues

* refactor: merge the apps and actions parameters into a single one

* fix: remove unnecessary print

* feat: logging error when CrewaiPlatformTools fails

* chore: export CrewaiPlatformTools directly from crewai_tools

* style: resolver linter issues

* test: fix broken tests

* style: solve linter issues

* fix: fix broken test
2025-09-25 16:46:51 -04:00
Greyson LaLonde
e350817b8d fix: remove debug logging (#462) 2025-09-25 08:00:41 -04:00
Greyson LaLonde
e070c1400c feat: update pydantic, add pydantic-settings, migrate to dependency-groups
Some checks failed
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Update Test Durations / update-durations (3.10) (push) Has been cancelled
Update Test Durations / update-durations (3.11) (push) Has been cancelled
Update Test Durations / update-durations (3.12) (push) Has been cancelled
Update Test Durations / update-durations (3.13) (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
- 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
2025-09-24 14:42:18 -04:00
Thiago Moretto
2a927933f2 Add OPENAI_API_KEY as required by QdrantSearchTool (#461) 2025-09-24 12:34:37 -04:00
Greyson LaLonde
6537e3737d fix: correct directory name in quickstart documentation 2025-09-24 11:41:33 -04:00
Greyson LaLonde
346faf229f feat: add pydantic-compatible import validation and deprecate old utilities 2025-09-24 11:36:02 -04:00
Lorenze Jay
a0b757a12c Lorenze/traces mark as failed (#3586)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Update Test Durations / update-durations (3.10) (push) Has been cancelled
Update Test Durations / update-durations (3.11) (push) Has been cancelled
Update Test Durations / update-durations (3.12) (push) Has been cancelled
Update Test Durations / update-durations (3.13) (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* marking trace batch as failed if its failed

* fix test
2025-09-23 22:02:27 -07:00
Greyson LaLonde
1dbe8aab52 fix: add batch_size support to prevent embedder token limit errors
- 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>
2025-09-24 00:05:43 -04:00
Greyson LaLonde
4ac65eb0a6 fix: support nested config format for embedder configuration
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Update Test Durations / update-durations (3.10) (push) Has been cancelled
Update Test Durations / update-durations (3.11) (push) Has been cancelled
Update Test Durations / update-durations (3.12) (push) Has been cancelled
Update Test Durations / update-durations (3.13) (push) Has been cancelled
- 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
2025-09-23 11:57:46 -04:00
Greyson LaLonde
3e97393f58 chore: improve typing and consolidate utilities
- add type annotations across utility modules  
- refactor printer system, agent utils, and imports for consistency  
- remove unused modules, constants, and redundant patterns  
- improve runtime type checks, exception handling, and guardrail validation  
- standardize warning suppression and logging utilities  
- fix llm typing, threading/typing edge cases, and test behavior
2025-09-23 11:33:46 -04:00
Heitor Carvalho
34bed359a6 feat: add crewai uv wrapper for uv commands (#3581) 2025-09-23 10:55:15 -04:00
Greyson LaLonde
7c2aa2f923 fix: remove circular deps
- Remove embedchain and resolve circular deps with ChromaDB  
- Adjust lockfile to match crewai requirements  
- Mock embeddings and vector DB in RAG tool tests
2025-09-22 19:35:08 -04:00
Tony Kipkemboi
feeed505bb docs(changelog): add releases 0.193.2, 0.193.1, 0.193.0, 0.186.1, 0.186.0 across en/ko/pt-BR (#3577)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-09-22 16:19:55 -07:00
Greyson LaLonde
cb0efd05b4 chore: fix ruff linting issues in tools module
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Update Test Durations / update-durations (3.13) (push) Has been cancelled
Update Test Durations / update-durations (3.10) (push) Has been cancelled
Update Test Durations / update-durations (3.11) (push) Has been cancelled
Update Test Durations / update-durations (3.12) (push) Has been cancelled
linting, args_schema default, and validator check
2025-09-22 13:13:23 -04:00
Greyson LaLonde
db5f565dea fix: apply ruff linting fixes to tasks module 2025-09-22 13:09:53 -04:00
Greyson LaLonde
58413b663a chore: fix ruff linting issues in rag module
linting, list embedding handling, and test update
2025-09-22 13:06:22 -04:00
Greyson LaLonde
37636f0dd7 chore: fix ruff linting and mypy issues in flow module 2025-09-22 13:03:06 -04:00
Greyson LaLonde
0e370593f1 chore: resolve all ruff and mypy issues in experimental module
resolve linting, typing, and import issues; update Okta test
2025-09-22 12:56:28 -04:00
Ryan
1bd10bb254 Add base_url param to exa search tool (#454) 2025-09-22 12:19:56 -04:00
Vini Brasil
aa8dc9d77f Add source to LLM Guardrail events (#3572)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Update Test Durations / update-durations (3.10) (push) Has been cancelled
Update Test Durations / update-durations (3.11) (push) Has been cancelled
Update Test Durations / update-durations (3.12) (push) Has been cancelled
Update Test Durations / update-durations (3.13) (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
This commit adds the source attribute to LLM Guardrail event calls to
identify the Lite Agent or Task that executed the guardrail.
2025-09-22 11:58:00 +09:00
Jonathan Hill
9c1096dbdc fix: Make 'ready' parameter optional in _create_reasoning_plan function (#3561)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Update Test Durations / update-durations (3.10) (push) Has been cancelled
Update Test Durations / update-durations (3.11) (push) Has been cancelled
Update Test Durations / update-durations (3.12) (push) Has been cancelled
Update Test Durations / update-durations (3.13) (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* 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>
2025-09-20 22:57:18 -03:00
João Moura
47044450c0 Adding fallback to crew settings (#3562)
* Adding fallback to crew settings

* fix: resolve ruff and mypy issues in cli/config.py

---------

Co-authored-by: Greyson Lalonde <greyson.r.lalonde@gmail.com>
2025-09-20 22:54:36 -03:00
João Moura
0ee438c39d fix version (#3557) 2025-09-20 17:14:28 -03:00
Joao Moura
cbb9965bf7 preparing new version 2025-09-20 12:27:25 -07:00
João Moura
4951d30dd9 Dix issues with getting id (#3556)
* fix issues with getting id

* ignore linter

* fix: resolve ruff linting issues in tracing utils

---------

Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2025-09-20 15:29:25 -03:00
Greyson LaLonde
7426969736 chore: apply ruff linting fixes and type annotations to memory module
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Update Test Durations / update-durations (3.10) (push) Has been cancelled
Update Test Durations / update-durations (3.11) (push) Has been cancelled
Update Test Durations / update-durations (3.12) (push) Has been cancelled
Update Test Durations / update-durations (3.13) (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2025-09-19 22:20:13 -04:00
Greyson LaLonde
d879be8b66 chore: fix ruff linting issues in agents module
fix(agents): linting, import paths, cache key alignment, and static method
2025-09-19 22:11:21 -04:00
Greyson LaLonde
24b84a4b68 chore: apply ruff linting fixes to crews module 2025-09-19 22:02:22 -04:00
Greyson LaLonde
8e571ea8a7 chore: fix ruff linting and mypy issues in knowledge module
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Update Test Durations / update-durations (3.10) (push) Has been cancelled
Update Test Durations / update-durations (3.11) (push) Has been cancelled
Update Test Durations / update-durations (3.12) (push) Has been cancelled
Update Test Durations / update-durations (3.13) (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
2025-09-19 21:39:15 -04:00
Greyson LaLonde
2cfc4d37b8 chore: apply ruff linting fixes to events module
fix: apply ruff linting to events
2025-09-19 20:10:55 -04:00
Greyson LaLonde
f4abc41235 chore: apply ruff linting fixes to CLI module
fix: apply ruff fixes to CLI and update Okta provider test
2025-09-19 19:55:55 -04:00
Greyson LaLonde
de5d3c3ad1 chore: add pydantic.mypy plugin for better type checking 2025-09-19 19:23:33 -04:00
Lorenze Jay
c062826779 chore: update dependencies and versioning for CrewAI 0.193.0 (#3542)
* 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>
2025-09-19 16:01:55 -03:00
João Moura
9491fe8334 Adding Ability for user to get deeper observability (#3541)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Update Test Durations / update-durations (3.10) (push) Has been cancelled
Update Test Durations / update-durations (3.11) (push) Has been cancelled
Update Test Durations / update-durations (3.12) (push) Has been cancelled
Update Test Durations / update-durations (3.13) (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* 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>
2025-09-18 21:47:09 -03:00
Greyson LaLonde
6f2ea013a7 docs: update RagTool references from EmbedChain to CrewAI native RAG (#3537)
* 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
2025-09-18 16:06:44 -07:00
Greyson LaLonde
e29ca9ec28 feat: replace embedchain with native crewai adapter (#451)
- Remove embedchain adapter; add crewai rag adapter and update all search tools  
- Add loaders: pdf, youtube (video & channel), github, docs site, mysql, postgresql  
- Add configurable similarity threshold, limit params, and embedding_model support  
- Improve chromadb compatibility (sanitize metadata, convert columns, fix chunking)  
- Fix xml encoding, Python 3.10 issues, and youtube url spoofing  
- Update crewai dependency and instructions; refresh uv.lock  
- Update tests for new rag adapter and search params
2025-09-18 19:02:22 -04:00
Greyson LaLonde
39e8792ae5 fix: add l2 distance metric support for backward compatibility (#3540) 2025-09-18 18:36:33 -04:00
Lorenze Jay
2f682e1564 feat: update ChromaDB embedding function to use OpenAI API (#3538)
- 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.
2025-09-18 14:50:35 -07:00
Greyson LaLonde
d4aa676195 feat: add configurable search parameters for RAG, knowledge, and memory (#3531)
- 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
2025-09-18 16:58:03 -04:00
Lorenze Jay
578fa8c2e4 Lorenze/ephemeral trace ask (#3530)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Update Test Durations / update-durations (3.10) (push) Has been cancelled
Update Test Durations / update-durations (3.11) (push) Has been cancelled
Update Test Durations / update-durations (3.12) (push) Has been cancelled
Update Test Durations / update-durations (3.13) (push) Has been cancelled
* 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.
2025-09-18 10:17:34 -07:00
Rip&Tear
6f5af2b27c Update CodeQL workflow to ignore specific paths (#3534)
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.
2025-09-18 23:26:15 +08:00
Greyson LaLonde
8ee3cf4874 test: fix flaky agent repeated tool usage test (#3533)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Update Test Durations / update-durations (3.10) (push) Has been cancelled
Update Test Durations / update-durations (3.11) (push) Has been cancelled
Update Test Durations / update-durations (3.12) (push) Has been cancelled
Update Test Durations / update-durations (3.13) (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
- Make assertion resilient to race condition with max iterations in CI  
- Add investigation notes and TODOs for deterministic executor flow
2025-09-17 22:00:32 -04:00
Greyson LaLonde
f2d3fd0c0f fix(events): add missing event exports to __init__.py (#3532) 2025-09-17 21:50:27 -04:00
Greyson LaLonde
f28e78c5ba refactor: unify rag storage with instance-specific client support (#3455)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Update Test Durations / update-durations (3.10) (push) Has been cancelled
Update Test Durations / update-durations (3.11) (push) Has been cancelled
Update Test Durations / update-durations (3.12) (push) Has been cancelled
Update Test Durations / update-durations (3.13) (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
- ignore line length errors globally
- migrate knowledge/memory and crew query_knowledge to `SearchResult`
- remove legacy chromadb utils; fix empty metadata handling
- restore openai as default embedding provider; support instance-specific clients
- update and fix tests for `SearchResult` migration and rag changes
2025-09-17 14:46:54 -04:00
Greyson LaLonde
81bd81e5f5 fix: handle model parameter in OpenAI adapter initialization (#3510)
Some checks failed
Update Test Durations / update-durations (3.10) (push) Has been cancelled
Update Test Durations / update-durations (3.11) (push) Has been cancelled
Update Test Durations / update-durations (3.12) (push) Has been cancelled
Update Test Durations / update-durations (3.13) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-09-12 17:31:53 -04:00
Vidit Ostwal
1b00cc71ef Dropping messages from metadata in Mem0 Storage (#3390)
* Dropped messages from metadata and added user-assistant interaction directly

* Fixed test cases for this

* Fixed static type checking issue

* Changed logic to take latest user and assistant messages

* Added default value to be string

* Linting checks

* Removed duplication of tool calling

* Fixed Linting Changes

* Ruff check

* Removed console formatter file from commit

* Linting fixed

* Linting checks

* Ignoring missing imports error

* Added suggested changes

* Fixed import untyped error
2025-09-12 15:25:29 -04:00
Lucas Gomide
8d9cee45f2 feat: attempt to make embedchain optional (#450)
* 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
2025-09-12 13:35:17 -04:00
Lucas Gomide
f9925887aa Add CrewAIPlatformTools (#449)
* chore: add deprecation warning in CrewaiEnterpriseTools

* feat: add CrewAI Platform Tool

* feat: drop support to oldest env-var token
2025-09-12 12:04:26 -04:00
Greyson LaLonde
45d0c9912c chore: add type annotations and docstrings to openai agent adapters (#3505) 2025-09-12 10:41:39 -04:00
Greyson LaLonde
1f1ab14b07 fix: resolve test duration cache issues in CI workflows (#3506)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
2025-09-12 08:38:47 -04:00
Lucas Gomide
1a70f1698e feat: add thread-safe platform context management (#3502)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Update Test Durations / update-durations (3.10) (push) Has been cancelled
Update Test Durations / update-durations (3.11) (push) Has been cancelled
Update Test Durations / update-durations (3.12) (push) Has been cancelled
Update Test Durations / update-durations (3.13) (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2025-09-11 17:32:51 -04:00
Greyson LaLonde
8883fb656b feat(tests): add duration caching for pytest-split
- Cache test durations for optimized splitting
2025-09-11 15:16:05 -04:00
Greyson LaLonde
79d65e55a1 chore: add type annotations and docstrings to langgraph adapters (#3503) 2025-09-11 13:06:44 -04:00
Lorenze Jay
dde76bfec5 chore: bump CrewAI version to 0.186.1 and update dependencies in CLI templates (#3499)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
- 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.
2025-09-10 17:01:19 -07:00
Lorenze Jay
f554123af6 fix (#3498) 2025-09-10 16:55:25 -07:00
Lorenze Jay
4336e945b8 chore: update dependencies and version for CrewAI (#3497)
- 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.
2025-09-10 16:03:58 -07:00
Lorenze Jay
75b916c85a Lorenze/fix tool call twice (#3495)
* 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
2025-09-10 15:20:21 -07:00
Greyson LaLonde
01be26ce2a chore: add build-cache, update jobs, remove redundant security check
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
- 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
2025-09-10 13:02:24 -04:00
Greyson LaLonde
c3ad5887ef chore: add type annotations to utilities module (#3484)
- 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
2025-09-10 10:56:17 -04:00
Lucas Gomide
260b49c10a fix: support to define MPC connection timeout on CrewBase instance (#3465)
* 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
2025-09-10 09:58:46 -04:00
Greyson LaLonde
1dc4f2e897 chore: add typing and docstrings to base_token_process module (#3486)
Co-authored-by: Lucas Gomide <lucaslg200@gmail.com>
2025-09-10 09:23:39 -04:00
Greyson LaLonde
b126ab22dd chore: refactor telemetry module with utility functions and modern typing (#3485)
Co-authored-by: Lucas Gomide <lucaslg200@gmail.com>
2025-09-10 09:18:21 -04:00
Greyson LaLonde
079cb72f6e chore: update typing in types module to Python 3.10+ syntax (#3482)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Co-authored-by: Lucas Gomide <lucaslg200@gmail.com>
2025-09-10 09:07:36 -04:00
Vini Brasil
6f2301c945 Clarify tool support for both local and remote URLs (#447)
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.
2025-09-10 09:38:14 -03:00
Greyson LaLonde
83682d511f chore: modernize LLM interface typing and add constants (#3483)
* chore: update LLM interfaces to Python 3.10+ typing

* fix: add missing stop attribute to mock LLM and improve test infrastructure

* fix: correct type ignore comment for aisuite import
2025-09-10 08:30:49 -04:00
Samarth Rawat
6676d94ba1 Doc Fix: fixed number of memory types (#3288)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* Update memory.mdx

* Update memory.mdx

---------

Co-authored-by: Tony Kipkemboi <iamtonykipkemboi@gmail.com>
2025-09-09 14:11:56 -04:00
Greyson LaLonde
d5126d159b chore: improve typing and docs in agents leaf files (#3461)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
- Add typing and Google-style docstrings to agents leaf files
- Add TODO notes
2025-09-08 11:57:34 -04:00
Greyson LaLonde
fa06aea8d5 chore: modernize security module typing (#3469)
- Disable E501, apply Ruff formatting
- Update typing (Self, BeforeValidator), remove dead code
- Convert Fingerprint to Pydantic dataclass and fix serialization/copy behavior
- Add TODO for dynamic namespace config
2025-09-08 11:52:59 -04:00
Greyson LaLonde
f936e0f69b chore: enhance typing and documentation in tasks module (#3467)
- 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
2025-09-08 11:42:23 -04:00
Greyson LaLonde
37c5e88d02 ci: configure pre-commit hooks and github actions to use uv run (#3479) 2025-09-08 11:30:28 -04:00
Tony Kipkemboi
cb8a1da730 feat(parallel): add ParallelSearchTool (Search API v1beta) (#445)
* docs: add BUILDING_TOOLS.md

* feat(parallel): add ParallelSearchTool (Search API v1beta), tests, README; register exports; regenerate tool.specs.json

* test(parallel): replace URL substring assertion with hostname allowlist (CodeQL)
2025-09-08 10:53:06 -04:00
Kim
1a96ed7b00 fix: rebranding of Azure AI Studio (Azure OpenAI Studio) to Azure AI Foundry (#3424)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Co-authored-by: Tony Kipkemboi <iamtonykipkemboi@gmail.com>
2025-09-05 20:42:05 -04:00
Tony Kipkemboi
1a1bb0ca3d docs: Docs updates (#3459)
* 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
2025-09-05 17:40:11 -04:00
Mike Plachta
99b79ab20d docs: move Bedrock tool docs to integration folder and add CrewAI automation tool docs (#3403)
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
Co-authored-by: Tony Kipkemboi <iamtonykipkemboi@gmail.com>
2025-09-05 15:12:35 -04:00
Mike Plachta
80974fec6c docs: expand webhook event types with detailed categorization and descriptions (#3369)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Co-authored-by: Tony Kipkemboi <iamtonykipkemboi@gmail.com>
2025-09-05 14:57:01 -04:00
Greyson LaLonde
30b9cdd944 chore: expand ruff rules with comprehensive linting (#3453) 2025-09-05 14:38:56 -04:00
Greyson LaLonde
610c1f70c0 chore: relax mypy configuration and exclude tests from CI (#3452) 2025-09-05 10:00:05 -04:00
Greyson LaLonde
ab82da02f9 refactor: cleanup crew agent executor (#3440)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
refactor: cleanup crew agent executor & add docs

- Remove dead code, unused imports, and obsolete methods
- Modernize with updated type hints and static _format_prompt
- Add docstrings for clarity
2025-09-04 15:32:47 -04:00
Lorenze Jay
f0def350a4 chore: update crewAI and tools dependencies to latest versions (#3444)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
- 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.
2025-09-03 17:27:05 -07:00
Lorenze Jay
f4f32b5f7f fix: suppress Pydantic deprecation warnings in initialization (#3443)
* 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
2025-09-03 16:36:50 -07:00
Tony Kipkemboi
49a5ae0e16 Docs/release 0.175.0 docs (#3441)
* docs(install): note OpenAI SDK requirement openai>=1.13.3 for 0.175.0

* docs(cli): document device-code login and config reset guidance; renumber sections

* docs(flows): document conditional @start and resumable execution semantics

* docs(tasks): move max_retries to deprecation note under attributes table

* docs: provider-neutral RAG client config; entity memory batching; trigger payload note; tracing batch manager

* docs(cli): fix duplicate numbering (renumber Login/API Keys/Configuration sections)
2025-09-03 17:27:11 -04:00
Lucas Gomide
d31ffdbb90 docs: update Enterprise Action Auth Token section docs (#3437)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-09-02 17:36:28 -04:00
Lucas Gomide
47b64d3507 fix: use explicit DeprecationWarning for legacy token detection (#440) 2025-09-02 16:28:22 -04:00
Lucas Gomide
33241ef363 refactor: fetch & execute enterprise tool actions from platform (#437)
* refactor: fetch enterprise tool actions from platform

* chore: logging legacy token detected
2025-09-02 15:41:00 -04:00
Greyson LaLonde
4555ada91e fix(ruff): remove Python 3.12+ only rules for compatibility (#3436) 2025-09-02 14:15:25 -04:00
Greyson LaLonde
92d71f7f06 chore: migrate CI workflows to uv and update dev tooling (#3426)
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
2025-09-02 12:35:02 -04:00
Vini Brasil
93b841fc86 Create tool for generating automations in Studio (#438)
* 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
2025-09-02 11:46:18 -03:00
ZhangYier
dada9f140f fix: README.md example link 404 (#3432)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Co-authored-by: Tony Kipkemboi <iamtonykipkemboi@gmail.com>
2025-09-02 10:29:40 -04:00
Greyson LaLonde
878c1a649a refactor: Move events module to crewai.events (#3425)
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
2025-09-02 10:06:42 -04:00
Greyson LaLonde
1b1a8fdbf4 fix: replace mutable default arguments with None (#3429)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-08-31 18:57:45 -04:00
Lorenze Jay
2633b33afc fix: enhance LLM event handling with task and agent metadata (#3422)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* 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
2025-08-29 13:48:49 -07:00
Greyson LaLonde
e4c4b81e63 chore: refactor parser & constants, improve tools_handler, update tests
- Move parser constants to dedicated module with pre-compiled regex
- Refactor CrewAgentParser to module functions; remove unused params
- Improve tools_handler with instance attributes
- Update tests to use module-level parser functions
2025-08-29 14:35:08 -04:00
Greyson LaLonde
ec1eff02a8 fix: achieve parity between rag package and current impl (#3418)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
- 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
2025-08-28 11:22:36 -04:00
Jinash Rouniyar
cb84d2ddfa feat: Add modular contextual AI tools with async functionality (#431)
* 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>
2025-08-28 08:56:53 -04:00
Lorenze Jay
0f1b764c3e chore: update crewAI version and dependencies to 0.175.0 and tools to 0.65.0 (#3417)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* 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.
2025-08-27 19:33:32 -07:00
Lorenze Jay
6ee9db1d4a fix: enhance PlusAPI and TraceBatchManager with timeout handling and graceful failure logging (#3416)
* Added timeout parameters to PlusAPI trace event methods for improved reliability.
* Updated TraceBatchManager to handle None responses gracefully, logging warnings instead of errors.
* Improved logging messages to provide clearer context during trace batch initialization and event sending failures.
2025-08-27 18:43:03 -07:00
Mike Plachta
1f581fa9ac fix: add OCRTool to crewai_tools package exports (#433) 2025-08-27 14:11:57 -07:00
Mike Plachta
6562587cba feat: add InvokeCrewAIAutomationTool for external crew API integration (#430)
* feat: add InvokeCrewAIAutomationTool for external crew API integration

* feat: add InvokeCrewAIAutomationTool class for executing CrewAI tasks programmatically
2025-08-27 10:42:19 -07:00
Greyson LaLonde
109de91d08 fix: batch entity memory items to reduce redundant operations (#3409)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
* fix: batch save entity memory items to reduce redundant operations

* test: update memory event count after entity batch save implementation
2025-08-27 10:47:20 -04:00
Erika Shorten
92b70e652d Add hybrid search alpha parameter to the docs (#3397)
Co-authored-by: Tony Kipkemboi <iamtonykipkemboi@gmail.com>
2025-08-27 10:36:39 -04:00
Erika Shorten
992cd726c4 Weaviate hybrid search (#428)
* Update tool to use hybrid search

* Set default alpha to 0.75
2025-08-27 10:33:16 -04:00
Heitor Carvalho
fc3f2c49d2 chore: remove auth0 and the need of typing the email on 'crewai login' (#3408)
* Remove the need of typing the email on 'crewai login'

* Remove auth0 constants, update tests
2025-08-27 10:12:57 -04:00
Lucas Gomide
88d2968fd5 chore: add deprecation notices to Task.max_retries (#3379)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-08-26 17:24:58 -04:00
Lorenze Jay
7addda9398 Lorenze/better tracing events (#3382)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
* 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.
2025-08-26 09:09:46 -07:00
Mike Plachta
403bb7e208 feat: add descriptive header to scraped website content output (#426)
* feat: add descriptive header to scraped website content output

* fix: correct typo in scraped website content header text
2025-08-26 08:10:24 -07:00
Greyson LaLonde
4b4a119a9f refactor: simplify rag client initialization (#3401)
* Simplified Qdrant and ChromaDB client initialization
* Refactored factory structure and updated tests accordingly
2025-08-26 08:54:51 -04:00
Greyson LaLonde
869bb115c8 Qdrant RAG Provider Support (#3400)
* Added Qdrant provider support with factory, config, and protocols
* Improved default embeddings and type definitions
* Fixed ChromaDB factory embedding assignment
2025-08-26 08:44:02 -04:00
Greyson LaLonde
7ac482c7c9 feat: rag configuration with optional dependency support (#3394)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
### 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
2025-08-26 00:00:22 -04:00
Greyson LaLonde
2e4bd3f49d feat: qdrant generic client (#3377)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
### Qdrant Client

* Add core client with collection, search, and document APIs (sync + async)
* Refactor utilities, types, and vector params (default 384-dim)
* Improve error handling with `ClientMethodMismatchError`
* Add score normalization, async embeddings, and optional `qdrant-client` dep
* Expand tests and type safety throughout
2025-08-25 16:02:25 -04:00
Greyson LaLonde
c02997d956 Add import utilities for optional dependencies (#3389)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-08-24 22:57:44 -04:00
Heitor Carvalho
f96b779df5 feat: reset tokens on crewai config reset (#3365)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-08-22 16:16:42 -04:00
Greyson LaLonde
842bed4e9c feat: chromadb generic client (#3374)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
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
2025-08-21 18:18:46 -04:00
Lucas Gomide
1217935b31 feat: add docs about Automation triggers (#3375)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-08-20 22:02:47 -04:00
Greyson LaLonde
641c156c17 fix: address flaky tests (#3363)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
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
2025-08-20 13:34:09 -04:00
Tony Kipkemboi
7fdf9f9290 docs: fix API Reference OpenAPI sources and redirects (#3368)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
* 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
2025-08-20 11:55:35 -04:00
Greyson LaLonde
c0d2bf4c12 fix: flow listener resumability for HITL and cyclic flows (#3322)
* 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
2025-08-20 10:06:18 -04:00
Greyson LaLonde
ed187b495b feat: centralize embedding types and create base client (#3246)
feat: add RAG system foundation with generic vector store support

- Add BaseClient protocol for vector stores
- Move BaseRAGStorage to rag/core
- Centralize embedding types in embeddings/types.py
- Remove unused storage models
2025-08-20 09:35:27 -04:00
Wajeeh ul Hassan
2773996b49 fix: revert pin openai<1.100.0 to openai>=1.13.3 (#3364) 2025-08-20 09:16:26 -04:00
Damian Silbergleith
95923b78c6 feat: display task name in verbose output (#3308)
* feat: display task name in verbose output

- Modified event_listener.py to pass task names to the formatter
- Updated console_formatter.py to display task names when available
- Maintains backward compatibility by showing UUID for tasks without names
- Makes verbose output more informative and readable

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: remove unnecessary f-string prefixes in console formatter

Remove extraneous f prefixes from string literals without placeholders
in console_formatter.py to resolve ruff F541 linting errors.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-20 08:43:05 -04:00
Lucas Gomide
dc039cfac8 Adds RAG feature (#406)
* 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
2025-08-19 18:30:35 -04:00
Lucas Gomide
7065ad4336 feat: adding additional parameter to Flow' start methods (#3356)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* feat: adding additional parameter to Flow' start methods

When the `crewai_trigger_payload` parameter exists in the input Flow, we will add it in the start Flow methods as parameter

* fix: support crewai_trigger_payload in async Flow start methods
2025-08-19 17:32:19 -04:00
Lorenze Jay
d6254918fd Lorenze/max retry defaults tools (#3362)
* feat: enhance BaseTool and CrewStructuredTool with usage tracking

This commit introduces a mechanism to track the usage count of tools within the CrewAI framework. The `BaseTool` class now includes a `_increment_usage_count` method that updates the current usage count, which is also reflected in the associated `CrewStructuredTool`. Additionally, a new test has been added to ensure that the maximum usage count is respected when invoking tools, enhancing the overall reliability and functionality of the tool system.

* feat: add max usage count feature to tools documentation

This commit introduces a new section in the tools overview documentation that explains the maximum usage count feature for tools within the CrewAI framework. Users can now set a limit on how many times a tool can be used, enhancing control over tool usage. An example of implementing the `FileReadTool` with a maximum usage count is also provided, improving the clarity and usability of the documentation.

* undo field string
2025-08-19 10:44:55 -07:00
Heitor Carvalho
95e3d6db7a fix: add 'tool' section migration when running crewai update (#3341)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
2025-08-19 08:11:30 -04:00
Joao Moura
1ce016df8b Revert "working around OAI new update for now"
This reverts commit 23a16eb446.
2025-08-19 00:09:25 -07:00
Joao Moura
23a16eb446 working around OAI new update for now 2025-08-18 22:40:30 -07:00
Lorenze Jay
d7f8002baa chore: update crewAI version to 0.165.1 and tools dependency in templates (#3359) (#3359)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-08-19 00:06:31 -03:00
Lorenze Jay
d743e12a06 refactor: streamline tracing condition checks and clean up deprecated warnings (#3358)
This commit simplifies the conditions for enabling tracing in both the Crew and Flow classes by removing the redundant call to `on_first_execution_tracing_confirmation()`. Additionally, it removes deprecated warning filters related to Pydantic in the KnowledgeStorage and RAGStorage classes, improving code clarity and maintainability.
2025-08-18 19:56:00 -07:00
Lorenze Jay
6068fe941f chore: update crewAI version to 0.165.0 and tools dependency to 0.62.1 (#3357) 2025-08-18 18:25:59 -07:00
Lucas Gomide
2a0cefc98b feat: pin openai<1.100.0 due ResponseTextConfigParam import issue (#3355)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
2025-08-18 18:31:18 -04:00
Lucas Gomide
a4f65e4870 chore: renaming inject_trigger_input to allow_crewai_trigger_context (#3353)
* chore: renaming inject_trigger_input to allow_crewai_trigger_context

* test: add missing cassetes
2025-08-18 17:57:21 -04:00
Lorenze Jay
a1b3edd79c Refactor tracing logic to consolidate conditions for enabling tracing… (#3347)
* Refactor tracing logic to consolidate conditions for enabling tracing in Crew class and update TraceBatchManager to handle ephemeral batches more effectively. Added tests for trace listener handling of both ephemeral and authenticated user batches.

* drop print

* linted

* refactor: streamline ephemeral handling in TraceBatchManager

This commit removes the ephemeral parameter from the _send_events_to_backend and _finalize_backend_batch methods, replacing it with internal logic that checks the current batch's ephemeral status. This change simplifies the method signatures and enhances the clarity of the code by directly using the is_current_batch_ephemeral attribute for conditional logic.
2025-08-18 14:16:51 -07:00
Lucas Gomide
80b3d9689a Auto inject crewai_trigger_payload (#3351)
* feat: add props to inject trigger payload

* feat: auto-inject trigger_input in the first crew task
2025-08-18 16:36:08 -04:00
Vini Brasil
ec03a53121 Add example to Tool Repository docs (#3352) 2025-08-18 13:19:35 -07:00
Vini Brasil
2fdf3f3a6a Move Chroma lockfile to db/ (#3342)
This commit fixes an issue where using Chroma would spam lockfiles over
the root path of the crew.
2025-08-18 11:00:50 -07:00
Greyson LaLonde
1d3d7ebf5e fix: convert XMLSearchTool config values to strings for configparser compatibility (#3344) 2025-08-18 13:23:58 -04:00
Gabe Milani
2c2196f415 fix: flaky test with PytestUnraisableExceptionWarning (#3346) 2025-08-18 14:07:51 -03:00
Gabe Milani
c9f30b175c chore: ignore deprecation warning from chromadb (#3328)
* chore: ignore deprecation warning from chromadb

* adding TODO: in the comment
2025-08-18 13:24:11 -03:00
Greyson LaLonde
a17b93a7f8 Mock telemetry in pytest tests (#3340)
* Add telemetry mocking for pytest tests

- Mock telemetry by default for all tests except telemetry-specific tests
- Add @pytest.mark.telemetry marker for real telemetry tests
- Reduce test overhead and improve isolation

* Fix telemetry test isolation

- Properly isolate telemetry tests from mocking environment
- Preserve API keys and other necessary environment variables
- Ensure telemetry tests can run with real telemetry instances
2025-08-18 11:55:30 -04:00
namho kim
0d3e462791 fix: Revised Korean translation and sentence structure improvement (#3337)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
2025-08-18 10:46:13 -04:00
Greyson LaLonde
947c9552f0 chore: remove AgentOps integration (#3334)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-08-17 23:07:41 -04:00
Lorenze Jay
04a03d332f Lorenze/emphemeral tracing (#3323)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* for ephemeral traces

* default false

* simpler and consolidated

* keep raising exception but catch it and continue if its for trace batches

* cleanup

* more cleanup

* not using logger

* refactor: rename TEMP_TRACING_RESOURCE to EPHEMERAL_TRACING_RESOURCE for clarity and consistency in PlusAPI; update related method calls accordingly

* default true

* drop print
2025-08-15 13:37:16 -07:00
Vidit Ostwal
992e093610 Update Docs: Added Mem0 integration with Short Term and Entity Memory (#3293)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* Added Mem0 integration with Short Term and Entity Memory

* Flaky test case of telemetry
2025-08-14 22:50:24 -04:00
Gabe Milani
16d613488b fix: use json_schema_extra instead of deprecated Field extra args (#417) 2025-08-14 17:52:56 -04:00
Lucas Gomide
07f8e73958 feat: include exchanged agent messages into ExternalMemory metadata (#3290)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
2025-08-14 09:41:09 -04:00
Lorenze Jay
66c2fa1623 chore: update crewAI and tools dependencies to version 0.159.0 and 0.62.0 respectively (#3318)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
- Bump crewAI version from 0.157.0 to 0.159.0
- Update tools dependency from 0.60.0 to 0.62.0 in pyproject.toml and uv.lock
- Ensure compatibility with the latest features and improvements in the tools package
2025-08-13 16:52:58 -07:00
Greyson LaLonde
7a52cc9667 fix: comment out listener resumability check (#3316) 2025-08-13 19:04:16 -04:00
Greyson LaLonde
8b686fb0c6 feat: add flow resumability support (#3312)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
- Add reload() method to restore flow state from execution data
- Add FlowExecutionData type definitions
- Track completed methods for proper flow resumption
- Support OpenTelemetry baggage context for flow inputs
2025-08-13 13:45:08 -04:00
Tony Kipkemboi
dc6771ae95 docs: Fix API Reference, add RBAC, revamp Examples/Cookbooks (EN/PT-BR/KO) (#3314)
* docs: add RBAC docs and other chores

* docs: fix API Reference rendering; per-locale OpenAPI; add Enterprise RBAC; restructure Examples (EN/PT-BR/KO) + Cookbooks; update nav and links

* docs(i18n): add RBAC docs for pt-BR and ko; update Enterprise Features nav
2025-08-13 13:13:24 -04:00
Tony Kipkemboi
e9b1e5a8f6 docs: add RBAC docs and other chores (#3313) 2025-08-13 12:08:42 -04:00
rishiraj
57c787f919 Docs update/add truefoundry (#3245)
* Add TrueFoundry observability integration documentation

- Added comprehensive TrueFoundry integration guide for CrewAI
- Included AI Gateway overview with key features
- Added technical architecture details for Traceloop SDK integration
- Provided step-by-step setup instructions
- Added advanced configuration examples
- Included tracing dashboard screenshot
- Added support contact and documentation links

* Update TrueFoundry integration documentation

Major improvements and fixes:
- Fixed integration pattern to follow LLM provider approach (base_url + api_key)
- Added technical architecture details showing LLM provider and observability flows
- Updated model names to use correct TrueFoundry format (openai-main/gpt-4o, anthropic/claude-3.5-sonnet)
- Added unified-code-tfy.png image for visual code example
- Reorganized document structure with better section placement
- Moved Additional Tracing section to better position
- Added link to TrueFoundry quick start guide
- Added comprehensive observability details and dashboard explanation
- Removed complex tracing setup in favor of simpler LLM provider integration

* Finalize TrueFoundry integration documentation

Key improvements:
- Updated base_url references to use placeholder from code snippet
- Added gateway-metrics.png image for observability dashboard
- Formatted metrics description with proper bullet points and bold headers
- Added link to TrueFoundry tracing overview documentation
- Improved readability and consistency throughout the documentation
- Updated Portuguese translation (pt-BR) version

* added truefoundry.mdx

* updated tfy mdx

* Update docs/en/observability/truefoundry.mdx

Co-authored-by: Nikhil Popli <97437109+nikp1172@users.noreply.github.com>

* Update truefoundry.mdx

* Update truefoundry.mdx

-minor updates

* Update truefoundry.mdx

* updated truefoundry.mdx PT-BR

---------

Co-authored-by: Nikhil Popli <97437109+nikp1172@users.noreply.github.com>
2025-08-13 10:08:15 -04:00
nicoferdi96
99e174e575 Stagehand tool improvements (#415)
* 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
2025-08-13 08:57:11 -04:00
Daniel Barreto
a0eadf783b Add Korean translations (#3307)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-08-12 15:58:12 -07:00
Lorenze Jay
251ae00b8b Lorenze/tracing-improvements-cleanup (#3291)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* feat: add tracing support to Crew and Flow classes

- Introduced a new `tracing` optional field in both the `Crew` and `Flow` classes to enable tracing functionality.
- Updated the initialization logic to conditionally set up the `TraceCollectionListener` based on the `tracing` flag or the `CREWAI_TRACING_ENABLED` environment variable.
- Removed the obsolete `interfaces.py` file related to tracing.
- Enhanced the `TraceCollectionListener` to accept a `tracing` parameter and adjusted its internal logic accordingly.
- Added tests to verify the correct setup of the trace listener when tracing is enabled.

This change improves the observability of the crew execution process and allows for better debugging and performance monitoring.

* fix flow name

* refactor: replace _send_batch method with finalize_batch calls in TraceCollectionListener

- Updated the TraceCollectionListener to use the batch_manager's finalize_batch method instead of the deprecated _send_batch method for handling trace events.
- This change improves the clarity of the code and ensures that batch finalization is consistently managed through the batch manager.
- Removed the obsolete _send_batch method to streamline the listener's functionality.

* removed comments

* refactor: enhance tracing functionality by introducing utility for tracing checks

- Added a new utility function `is_tracing_enabled` to streamline the logic for checking if tracing is enabled based on the `CREWAI_TRACING_ENABLED` environment variable.
- Updated the `Crew` and `Flow` classes to utilize this utility for improved readability and maintainability.
- Refactored the `TraceCollectionListener` to simplify tracing checks and ensure consistent behavior across components.
- Introduced a new module for tracing utilities to encapsulate related functions, enhancing code organization.

* refactor: remove unused imports from crew and flow modules

- Removed unnecessary `os` imports from both `crew.py` and `flow.py` files to enhance code cleanliness and maintainability.
2025-08-08 13:42:25 -07:00
Tony Kipkemboi
a221295394 WIP: docs updates (#3296) 2025-08-08 13:05:43 -07:00
Lucas Gomide
a92211f0ba fix: use correct endpoint to get auth/parameters on enterprise configuration (#3295)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
2025-08-08 10:56:44 -04:00
Lucas Gomide
f9481cf10d feat: add enterprise configure command (#3289)
* feat: add enterprise configure command

* refactor: renaming EnterpriseCommand to EnterpriseConfigureCommand
2025-08-08 08:50:01 -04:00
meirk-brd
41ce4981ac feat: Add Bright Data tools (#314)
* Initial commit of BrightData tools

* Renamed the BrightData test file names

* Refactored and improved the overall BrightData tools

* Add BrightData tools

* Add tools to init

* Added config class

* Fix test failures and add missing __init__.py files

- Remove problematic brightdata_dataset_tool_test.py that referenced non-existent classes
- Fix brightdata_serp_tool_test.py to expect string responses instead of dict
- Fix brightdata_webunlocker_tool_test.py to expect string responses instead of dict
- Add missing tests/tools/__init__.py for proper test imports

---------

Co-authored-by: Ranjan Dailata <ranjancse@gmail.com>
Co-authored-by: Tony Kipkemboi <iamtonykipkemboi@gmail.com>
2025-08-07 10:29:51 -04:00
Volodymyr Tkachuk
d00c9764fc feat: Adding SingleStoreSearchTool (#349)
* initial commit

* Add actual SinglesStore Search Tool implementation

* add the implementation

* update readme

* add tool's description

* add tests

* fix tests

* review comments

* remove schema from public exports

* fix test failure

* revert tools.specs.json

* added dependencies and env vars descriptions
2025-08-07 09:51:37 -04:00
633WHU
915857541e feat: improve LLM message formatting performance (#3251)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* optimize: improve LLM message formatting performance

Replace inefficient copy+append operations with list concatenation
in _format_messages_for_provider method. This optimization reduces
memory allocation and improves performance for large conversation
histories.

**Changes:**
- Mistral models: Use list concatenation instead of copy() + append()
- Ollama models: Use list concatenation instead of copy() + append()
- Add comprehensive performance tests to verify improvements

**Performance impact:**
- Reduces memory allocations for large message lists
- Improves processing speed by 2-25% depending on message list size
- Maintains exact same functionality with better efficiency

cliu_whu@yeah.net

* remove useless comment

---------

Co-authored-by: chiliu <chiliu@paypal.com>
2025-08-07 09:07:47 -04:00
Lorenze Jay
7c162411b7 chore: update crewai to 0.157.0 and crewai-tools dependency to version 0.60.0 (#3281)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* 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.
2025-08-06 14:47:50 -07:00
Lorenze Jay
8f4a6cc61c Lorenze/tracing v1 (#3279)
* 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
2025-08-06 14:05:14 -07:00
633WHU
7dc86dc79a perf: optimize string operations with partition() over split()[0] (#3255)
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>
2025-08-06 15:04:53 -04:00
Vidit Ostwal
7ce20cfcc6 Dropping User Memory (#3225)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
* 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
2025-08-06 13:08:10 -04:00
Mrunmay Shelar
1d9523c98f docs: add LangDB integration documentation (#3228)
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.
2025-08-06 11:13:58 -04:00
Lucas Gomide
9f1d7d1aa9 fix: allow persist Flow state with BaseModel entries (#3276)
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2025-08-06 09:04:59 -04:00
Lucas Gomide
79b375f6fa build: bump LiteLLM to 1.74.9 (#3278)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-08-05 17:10:23 -04:00
Lucas Gomide
75752479c2 docs: add CLI config docs (#3275) 2025-08-05 15:24:34 -04:00
Lucas Gomide
477bc1f09e feat: add default value for crew.name (#3252)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2025-08-05 12:25:50 -04:00
Lucas Gomide
66567bdc2f Support Device authorization with Okta (#3271)
* 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>
2025-08-05 12:16:21 -04:00
Lucas Gomide
0b31bbe957 fix: enable word wrapping for long input tool (#3274) 2025-08-05 11:05:38 -04:00
Lucas Gomide
246cf588cd docs: updating MCP docs with connect_timeout attribute (#3273) 2025-08-05 10:27:18 -04:00
Lucas Gomide
4daf18256d feat: allow custom client_timeout for MCPAdapter (#409) 2025-08-05 09:53:57 -04:00
Lucas Gomide
9220cfba28 fix: use proper ArxivPaperTool import (#408) 2025-08-05 09:46:11 -04:00
Heitor Carvalho
88ed91561f feat: add crewai config command group and tests (#3206)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-07-31 10:38:51 -04:00
Lorenze Jay
9a347ad458 chore: update crewai-tools dependency to version 0.59.0 and bump CrewAI version to 0.152.0 (#3244)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
- 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.
2025-07-30 14:38:24 -07:00
Lucas Gomide
34c3075fdb fix: support to add memories to Mem0 with agent_id (#3217)
* 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
2025-07-30 11:56:46 -04:00
Vidit Ostwal
498e8dc6e8 Changed the import error to show missing module files (#2423)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
* 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>
2025-07-30 10:01:17 -04:00
Lorenze Jay
cb522cf500 Enhance Flow class to support custom flow names (#3234)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
- 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.
2025-07-29 15:41:30 -07:00
Lucas Gomide
707c8583f4 chore: make tavily tools exportable (#400) 2025-07-29 14:56:20 -04:00
Harikrishnan K
30df46445b Adding Arxiv Paper tool (#310)
* arxiv_paper_tool.py

* Updating as per the review

* Update __init__.py

* Update __init__.py

* Update arxiv_paper_tool.py

* added test cases

* Create README.md

* Create Examples.md

* Update Examples.md

* Updated logger

* Updated with package_dependencies,env_vars
2025-07-29 12:53:30 -04:00
Vini Brasil
b8bd3000c6 Make RagTool processs-safe (#399)
This commit adds a file lock to `RagTool`. As it uses Embedchain and
Chroma internally, this tool was not process-safe.
2025-07-28 17:09:53 -03:00
Vini Brasil
017acc74f5 Add timezone to event timestamps (#3231)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Events were lacking timezone information, making them naive datetimes,
which can be ambiguous.
2025-07-28 17:09:06 -03:00
Greyson LaLonde
fab86d197a Refactor: Move RAG components to dedicated top-level module (#3222)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* Move RAG components to top-level module

- Create src/crewai/rag directory structure
- Move embeddings configurator from utilities to rag module
- Update imports across codebase and documentation
- Remove deprecated embedding files

* Remove empty knowledge/embedder directory
2025-07-25 10:55:31 -04:00
Vidit Ostwal
864e9bfb76 Changed the default value in Mem0 config (#3216)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* Changed the default value in Mem0 config

* Added regression test for this

* Fixed Linting issues
2025-07-24 13:20:18 -04:00
Lucas Gomide
d3b45d197c fix: remove crewai signup references, replaced by crewai login (#3213) 2025-07-24 07:47:35 -04:00
Manuka Yasas
579153b070 docs: fix incorrect model naming in Google Vertex AI documentation (#3189)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
- 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>
2025-07-23 16:58:57 -04:00
Lorenze Jay
b1fdcdfa6e chore: update dependencies and version in project files (#3212)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
- 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.
2025-07-23 11:03:50 -07:00
Steven Silvester
e6ec6cc332 Fix MongoDBVectorSearchTool serialization and schema (#389)
* Fix MongoDBVectorSearchTool serialization

* fix base class
2025-07-23 10:28:07 -07:00
Mike Plachta
104485d18b feat: add SerperScrapeWebsiteTool for extracting clean content from URLs (#392)
* feat: add SerperScrapeWebsiteTool for extracting clean content from URLs

* feat: add required SERPER_API_KEY env var validation to SerperScrapeWebsiteTool
2025-07-23 10:22:47 -07:00
Mike Plachta
18d76a270c docs: add SerperScrapeWebsiteTool documentation and reorganize SerperDevTool setup instructions (#3211) 2025-07-23 12:12:59 -04:00
Vidit Ostwal
30541239ad Changed Mem0 Storage v1.1 -> v2 (#2893)
* 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>
2025-07-23 08:30:52 -04:00
Tony Kipkemboi
9a65573955 Feature/update docs (#3205)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* 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
2025-07-22 13:55:27 -04:00
Filip Michalsky
c3e87fc31f Fm/update stagehand (#387)
* Update tool specifications for

* Update stagehand dependency from stagehand-py to stagehand v0.4.1

* uv add

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-07-22 07:05:29 -07:00
Lucas Gomide
27623a1d01 feat: remove duplicate print on LLM call error (#3183)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
By improving litellm handler error / outputs

Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2025-07-21 22:08:07 -04:00
João Moura
2593242234 Adding Support to adhoc tool calling using the internal LLM class (#3195)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
* Adding Support to adhoc tool calling using the internal LLM class

* fix type
2025-07-21 19:36:48 -03:00
Greyson LaLonde
2ab6c31544 chore: add deprecation notices to UserMemory (#3201)
- 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
2025-07-21 15:26:34 -04:00
Lucas Gomide
3c55c8a22a fix: append user message when last message is from assistent when using Ollama models (#3200)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Ollama doesn't supports last message to be 'assistant'
We can drop this commit after merging https://github.com/BerriAI/litellm/pull/10917
2025-07-21 13:30:40 -04:00
Ranuga Disansa
424433ff58 docs: Add Tavily Search & Extractor tools to Search-Research suite (#3146)
* 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>
2025-07-21 12:01:29 -04:00
Lucas Gomide
2fd99503ed build: upgrade LiteLLM to 1.74.3 (#3199) 2025-07-21 09:58:47 -04:00
Piyush Jain
2c38d1d448 Bedrock AgentCore browser and code interpreter toolkits (#385)
* Added browser and code tools

* Added dependencies, moved imports inside class

* Added instructions in README

* Updated imports

* Updated imports

* Updated dependencies

* Fix 'get_current_page' utilities for Browser tools

* Support browser session cleanup from synchronous code

* Update browser tool examples for new changes

* Manually override _run->_arun and set nested loop when in crew event loop

* Browser async example

* update examples with uv

* Fix toolkit fields for code interpreter

* Update code interpreter examples

* update uv.lock

* Move nest_asyncio import

---------

Co-authored-by: Michael Chin <mchin188@yahoo.com>
2025-07-18 14:33:39 -07:00
Vidit Ostwal
942014962e fixed save method, changed the test cases (#3187)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* fixed save method, changed the test cases

* Linting fixed
2025-07-18 15:10:26 -04:00
Lucas Gomide
2ab79a7dd5 feat: drop unsupported stop parameter for LLM models automatically (#3184) 2025-07-18 13:54:28 -04:00
Lucas Gomide
27c449c9c4 test: remove workaround related to SQLite without FTS5 (#3179)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
For more details check out [here](actions/runner-images#12576)
2025-07-18 09:37:15 -04:00
Vini Brasil
9737333ffd Use file lock around Chroma client initialization (#3181)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
This commit fixes a bug with concurrent processess and Chroma where
`table collections already exists` (and similar) were raised.

https://cookbook.chromadb.dev/core/system_constraints/
2025-07-17 11:50:45 -03:00
Lucas Gomide
bf248d5118 docs: fix neatlogs documentation (#3171)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-07-16 21:18:04 -04:00
Lorenze Jay
2490e8cd46 Update CrewAI version to 0.148.0 in project templates and dependencies (#3172)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
* 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.
2025-07-16 12:36:43 -07:00
Lucas Gomide
9b67e5a15f Emit events about Agent eval (#3168)
* feat: emit events abou Agent Eval

We are triggering events when an evaluation has started/completed/failed

* style: fix type checking issues
2025-07-16 13:18:59 -04:00
Lucas Gomide
6ebb6c9b63 Supporting eval single Agent/LiteAgent (#3167)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* refactor: rely on task completion event to evaluate agents

* feat: remove Crew dependency to evaluate agent

* feat: drop execution_context in AgentEvaluator

* chore: drop experimental Agent Eval feature from stable crew.test

* feat: support eval LiteAgent

* resolve linter issues
2025-07-15 09:22:41 -04:00
Lucas Gomide
53f674be60 chore: remove evaluation folder (#3159)
This folder was moved to `experimental` folder
2025-07-15 08:30:20 -04:00
Paras Sakarwal
11717a5213 docs: added integration with neatlogs (#3138)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-07-14 11:08:24 -04:00
Lucas Gomide
b6d699f764 Implement thread-safe AgentEvaluator (#3157)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
* refactor: implement thread-safe AgentEvaluator with hybrid state management

* chore: remove useless comments
2025-07-14 10:05:42 -04:00
Thiago Moretto
9f6002a9dd Declaring and make some tool configurable using env vars (#376) 2025-07-14 09:48:36 -04:00
Lucas Gomide
5b15061b87 test: add test helper to assert Agent Experiments (#3156) 2025-07-14 09:24:49 -04:00
Lucas Gomide
1b6b2b36d9 Introduce Evaluator Experiment (#3133)
* 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
2025-07-14 09:06:45 -04:00
devin-ai-integration[bot]
3ada4053bd Fix #3149: Add missing create_directory parameter to Task class (#3150)
* 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>
2025-07-14 08:15:41 -04:00
Vidit Ostwal
e7a5747c6b Comparing BaseLLM class instead of LLM (#3120)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* Compaing BaseLLM class instead of LLM

* Fixed test cases

* Fixed Linting Issues

* removed last line

---------

Co-authored-by: Lucas Gomide <lucaslg200@gmail.com>
2025-07-11 20:50:36 -04:00
Vidit Ostwal
eec1262d4f Fix agent knowledge (#2831)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
* 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>
2025-07-11 13:52:26 -04:00
Tony Kipkemboi
c6caa763d7 docs: Add guardrail attribute documentation and examples (#3139)
- Document string-based guardrails in tasks
- Add guardrail examples to YAML configuration
- Fix Python code formatting in PT-BR CLI docs
2025-07-11 13:32:59 -04:00
Lorenze Jay
78f5144bde Enhance EnterpriseActionTool with improved schema processing and erro… (#371)
* 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
2025-07-11 10:18:54 -07:00
Lucas Gomide
08fa3797ca Introducing Agent evaluation (#3130)
* 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
2025-07-11 13:18:03 -04:00
Greyson LaLonde
bf8fa3232b Add SQLite FTS5 support to test workflow (#3140)
* Add SQLite FTS5 support to test workflow

* Add explanatory comment for SQLite FTS5 workaround
2025-07-11 12:01:25 -04:00
Heitor Carvalho
a6e60a5d42 fix: use production workos environment id (#3129)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2025-07-09 17:09:01 -04:00
Vini Brasil
eb09f2718f Use environment variable to initialize scrapegraph_py.Client (#362)
This commit fixes a bug where `SCRAPEGRAPH_API_KEY` were never used to
initialize `scrapegraph_py.Client`.
2025-07-09 15:03:16 -03:00
Lorenze Jay
7b0f3aabd9 chore: update crewAI and dependencies to version 0.141.0 and 0.51.0 (#3128)
Some checks failed
Notify Downstream / notify-downstream (push) Has been cancelled
- 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.
2025-07-09 10:37:06 -07:00
Steven Silvester
e0de166592 Add MongoDB Vector Search Tool (#319)
* 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>
2025-07-09 08:44:23 -07:00
gautham
c45e92bd17 Add Couchbase as a tool (#264)
* - 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>
2025-07-08 10:54:54 -04:00
Lorenze Jay
b4786d86b0 refactor: enhance schema handling in EnterpriseActionTool (#355)
* 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.
2025-07-02 12:54:09 -07:00
Emmanuel Ferdman
d53e96fcd7 fix: update Pydantic schema access (#337)
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
2025-07-02 09:25:26 -07:00
Thiago Moretto
26652e5e24 Mapping required env vars of more tools (#353) 2025-07-01 14:08:30 -04:00
Lorenze Jay
180cc38330 refactor: update Firecrawl tools to improve configuration and error handling (#351)
- 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.
2025-06-27 11:27:48 -07:00
Lorenze Jay
8723e66807 feat: add support for parsing actions list from environment variables (#346)
* 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.
2025-06-25 11:14:41 -07:00
Lorenze Jay
e4cb8bf797 Lorenze/better env vars setup enterprise tools (#343)
* 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
2025-06-25 10:17:26 -07:00
Lucas Gomide
03917411b4 Support to filter available MCP Tools (#345)
* 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
2025-06-25 12:32:22 -04:00
Lucas Gomide
e8825d071a feat: support api_key fallback to EXA_API_KEY env-var (#341) 2025-06-24 14:47:39 -04:00
Rostyslav Borovyk
78a062a907 Add Oxylabs Web Scraping tools (#312)
* Add Oxylabs tools

* Review updates

* Add package_dependencies attribute
2025-06-24 09:56:47 -04:00
Lucas Gomide
c13b08de2e fix: add support for case-insensitive Enterprise filter (#340) 2025-06-20 11:09:45 -04:00
Lucas Gomide
31b3dd2b94 feat: Add ToolCollection class for named tool access (#339)
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
2025-06-20 09:27:10 -04:00
Lucas Gomide
9e92b84bcc feat: mapping explicitly tool environment variables (#338) 2025-06-20 08:06:11 -04:00
Lucas Gomide
2cca45b45a refactor: renaming init_params and run_params to reflect their schema. (#332) (#333)
We’re currently using the JSON Schema standard for these fields
2025-06-17 07:52:51 -04:00
Lucas Gomide
fac32d9503 Support to collect extra package dependencies of Tools (#330)
* 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
2025-06-16 10:09:19 -04:00
Lorenze Jay
5a99f07765 refactor: remove token validation from EnterpriseActionKitToolAdapter… (#331)
* 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
2025-06-14 12:21:18 -07:00
Lucas Gomide
dc2d4af8ea fix: ensure the entire file will be read when the start_line is None (#325) 2025-06-11 09:02:56 -04:00
Lucas Gomide
748f438232 Support to generate a tool spec file for each published released (#313)
* 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
2025-06-03 10:11:17 -04:00
Lucas Gomide
72b3a8c70a feat: allow to provide the driver and options to be used by Selenium (#316) 2025-05-30 08:13:11 -04:00
Lorenze Jay
5d5377cfb9 feat: add ZapierActionTool and ZapierActionsAdapter for integrating with Zapier actions (#311)
* 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.
2025-05-27 09:54:35 -07:00
Lucas Gomide
0dbcbde119 fix: remove logging.basicConfig definition from Tool (#305) 2025-05-14 14:38:11 -04:00
Ranuga Disansa
ba6a85d342 Add TavilyExtractorTool and TavilySearchTool with documentation (#279)
* 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>
2025-05-14 09:45:12 -07:00
Mark McDonald
8b887b4eb3 Fix Callable reference in QdrantVectorSearchTool (#304)
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.
2025-05-13 17:13:07 -04:00
Filip Michalsky
8ecc958e4c stagehand tool (#277)
* stagehand tool

* update import paths

* updates

* improve example

* add tests

* revert init

* imports

* add context manager

* update tests

* update example to run again

* update context manager docs

* add to pyproject.toml and run uv sync

* run uv sync

* update lazy import

* update test mock

* fixing tests

* attempt to fix tests
2025-05-10 09:53:20 -04:00
Harikrishnan K
64f6f998d8 FileCompressorTool with support for files and subdirectories (#282)
* 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
2025-05-08 13:17:17 -04:00
nicoferdi96
edd4e5bef9 Fix FirecrawlScrapeWebsiteTool (#298)
* 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
2025-05-07 12:34:15 -04:00
Lucas Gomide
fd4ef4f47a fix: Remove kwargs from all RagTools (#285)
* 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
2025-05-05 14:15:50 -04:00
Lorenze Jay
93d043bcd4 Enhance EnterpriseActionKitToolAdapter to support custom project IDs (#297)
* 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
2025-05-04 10:41:54 -07:00
Daniel Barreto
67be0c674d Allow setting custom LLM for the vision tool (#294)
* 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>
2025-04-28 19:53:00 -03:00
benzakritesteur
82d0209ce2 Fix firecrawl tool (Too many positional arguments) (#275)
* 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>
2025-04-28 13:57:03 -04:00
João Moura
6909c587c2 Merge pull request #286 from crewAIInc/joaodmmoura/crewai-enterprise-tool
new tool around adapter
2025-04-27 23:18:34 -07:00
João Moura
7c1a87e5ab new tool around adapter 2025-04-24 23:05:50 -07:00
João Moura
af5a605f31 Merge pull request #284 from crewAIInc/lorenze/enterprise-integrations
Lorenze/enterprise tools integrations
2025-04-24 14:48:02 -07:00
lorenzejay
40dd22ce2c refactor: remove main execution block from EnterpriseActionKitToolAdapter
- 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.
2025-04-24 14:39:55 -07:00
lorenzejay
4d86da80c3 feat: add EnterpriseActionKitToolAdapter and EnterpriseActionTool for enterprise action execution
- 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.
2025-04-24 14:20:40 -07:00
Lucas Gomide
edc9b44c47 Add secure Python Sandbox and Enhanced Logging in CodeInterpreterTool (#281)
* 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>
2025-04-23 15:42:05 -04:00
Lucas Gomide
78d0ec501d fix: do not use deprecated distutils in FileWriterTool (#280) 2025-04-23 10:29:07 -04:00
Milad Noroozi
7973c163f3 Add chunk reading functionality to FileReadTool (#266)
* 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
2025-04-22 10:18:29 -04:00
Guillaume Raille
a270742319 mcp server proposal (#267)
* 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>
2025-04-16 10:18:07 -07:00
Lucas Gomide
8cbdaeaff5 refactor(selenium): improve driver management and add headless mode (#268)
- 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
2025-04-15 10:50:40 -04:00
Lucas Gomide
a95be24865 Merge pull request #262 from GibsonAI/tool-typo-fixes
Fix typo "seach" -> "search" in tools
2025-04-11 10:05:17 -03:00
Nathan Chapman
c2cb8e06be Fix typo seach -> search in tools 2025-04-10 17:38:28 -05:00
Vini Brasil
257f4bf385 Test optional dependencies are not required in runtime (#260)
* Test optional dependencies are not required in runtime

* Add dynamic imports to S3 tools

* Setup CI
2025-04-08 13:20:11 -04:00
Lucas Gomide
6f95572e18 Merge pull request #237 from SHIXOOM/Fix-FireCrawl-Crawler-Tool
Fix: FirecrawlCrawlWebsiteTool update parameters for FireCrawl API v1 and update run arguments for agents
2025-04-06 14:06:32 -04:00
lorenzejay
89394ef3e3 Refactor: Clean up FirecrawlCrawlWebsiteTool schema field descriptions and formatting for improved readability 2025-04-04 11:42:32 -07:00
Lucas Gomide
90c9d5d71d Merge pull request #250 from parthbs/feat/local-qdrant-client-support
#249 feat: add support for local qdrant client
2025-04-02 10:16:14 -03:00
Lorenze Jay
5b06a0c189 Merge pull request #253 from crewAIInc/fix/clear-more-warnings-databricks
cleanup more warnings from tools
2025-04-01 10:47:25 -07:00
lorenzejay
6b4453e1b1 refactor: rename schema to db_schema in DatabricksQueryTool for clarity 2025-04-01 10:42:36 -07:00
Lorenze Jay
d842e9df97 Merge pull request #252 from crewAIInc/feature-cleanup-pydatic-issues
feat: cleanup Pydantic warning
2025-04-01 09:27:41 -07:00
lucasgomide
47acb5c3e4 feat: cleanup Pydantic warning
A several warnings were addressed following by  https://docs.pydantic.dev/2.10/migration
2025-04-01 09:55:01 -03:00
Shady Ali
e0adb4695c Addressed review comments and made further improvements 2025-03-28 16:58:47 +02:00
Parth Patel
4fd7db2e53 #249: update QdrantVectorSearchTool README 2025-03-25 19:16:18 +00:00
Parth Patel
5ded394e43 #249 feat: add support for local qdrant client 2025-03-25 19:01:01 +00:00
João Moura
baea6dc8a4 Merge pull request #197 from beowolx/bugfix/serperdev-missing-country
fix(serper-dev): restore search localization parameters
2025-03-21 14:54:50 -03:00
João Moura
5cfcb5c74a new version 2025-03-19 11:30:26 -07:00
João Moura
865930da78 Merge pull request #239 from raju-rangan/main
Amazon Bedrock Knowledge Bases Retriever and Agents support
2025-03-19 15:18:26 -03:00
Raju Rangan
319423b70a added __init__ files as suggested. 2025-03-18 10:24:08 -04:00
João Moura
658c23547e prep new version 2025-03-17 18:58:45 -07:00
João Moura
568aace62e fix 2025-03-17 18:58:09 -07:00
Vini Brasil
9e68cbbb3d Conditionally import Databricks library (#243)
Databricks is an optional dependency, but the tool package is imported by
default, leading to ImportError exceptions.

Related: crewAIInc/crewAI#2390
2025-03-17 15:13:28 -03:00
Brandon Hancock (bhancock_ai)
c06076280e Merge pull request #228 from MQ37/feat/apify
feat: apify actors
2025-03-16 12:28:13 -04:00
João Moura
0c3140e758 new version 2025-03-14 07:39:52 -07:00
Raju Rangan
db309ca1ae - Add custom exceptions for better error handling
- Add parameter validation for Bedrock tools
- Improve response processing and debug information
- Maintain backward compatibility with existing implementations
2025-03-11 16:46:12 -04:00
Jakub Kopecký
292adef7ba Update README.md 2025-03-11 18:02:15 +01:00
Raju Rangan
d47adfc34a Adding tooling to use Amazon Bedrock Agents as enternal agent, enbaling distributed agentic capabilities 2025-03-11 10:21:30 -04:00
Raju Rangan
e8326f134f Adding tooling to use Amazon Bedrock Knowledge Base as a knowledge retreiver 2025-03-11 10:20:42 -04:00
João Moura
c19591a689 updatign readme 2025-03-09 04:01:12 -07:00
Shady Ali
5af2108307 Fix: FireCrawl FirecrawlCrawlWebsiteTool for crawling. FireCrawl API does not recognize sent paramters (HTTPError: Unexpected error during start crawl job: Status code 400. Bad Request -
[{'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
2025-03-08 09:35:23 +02:00
MQ
cad804e87b update readme 2025-03-07 11:00:54 +01:00
MQ
7718df5437 minor consistency improvements 2025-03-04 12:45:52 +01:00
MQ
9c7c7d3d75 apify_actors -> apify_actors_tool, refactor readme 2025-03-04 11:10:41 +01:00
MQ
3df25e65d5 fix 2025-02-28 15:40:08 +01:00
MQ
7148c52bf6 format 2025-02-28 12:43:52 +01:00
MQ
f329b0d9d2 improve readme, add link to template 2025-02-28 12:35:23 +01:00
MQ
975c71a920 fix example 2025-02-28 10:29:50 +01:00
MQ
884ea63b49 other improvements 2025-02-28 10:22:56 +01:00
MQ
35aff6e84e improve code, lazy import, improve readme 2025-02-28 10:10:56 +01:00
MQ
867305540c improve 2025-02-27 21:27:05 +01:00
MQ
5bcb598f75 fix readme 2025-02-27 21:14:42 +01:00
MQ
3fcc7b42cb fix docstring 2025-02-27 21:12:38 +01:00
MQ
13bad2bb69 initial implementation 2025-02-27 21:08:05 +01:00
Brandon Hancock (bhancock_ai)
6d8d30178d Merge pull request #227 from mplachta/aws_s3_tools
S3 Tools
2025-02-27 12:49:02 -05:00
Mike Plachta
f1187c5469 S3 Tools 2025-02-27 08:44:43 -08:00
Lorenze Jay
7c16b7d284 Merge pull request #200 from crewAIInc/feat/add-qdrant-tools
enable qdrant as vector search tool for crew agents
2025-02-07 10:25:29 -08:00
Lorenze Jay
837198ae08 Add interactive Qdrant client installation prompt 2025-02-07 10:03:37 -08:00
Lorenze Jay
554bba8036 clearer docs 2025-02-03 16:22:09 -08:00
Lorenze Jay
12927ba79d cleanup 2025-02-03 16:19:53 -08:00
Lorenze Jay
96c3fbdddf remove ollama from here 2025-02-03 16:19:33 -08:00
Lorenze Jay
5a9bb24b63 default openai 2025-02-03 16:19:03 -08:00
Lorenze Jay
05982aeef2 set default vectorizer 2025-02-01 23:44:40 -08:00
Lorenze Jay
d6a6325b55 set vectorizer 2025-02-01 23:43:09 -08:00
Lorenze Jay
6b19a3d156 default set 2025-02-01 23:40:37 -08:00
Lorenze Jay
052a07ddc7 setup common default model 2025-02-01 23:38:24 -08:00
Lorenze Jay
aff40529a5 updated docs 2025-02-01 23:32:31 -08:00
Lorenze Jay
dcd4481ae2 enable qdrant as vector search tool for crew agents 2025-02-01 23:31:15 -08:00
Lorenze Jay
6b93ebb97b Merge pull request #198 from crewAIInc/add/updated-exa
latest version of exa supported
2025-01-31 09:40:32 -08:00
Lorenze Jay
9a09ea7703 better docs and download missing packaged 2025-01-30 16:04:33 -08:00
Lorenze Jay
bcfe015d9d ensure works on agent 2025-01-30 15:53:57 -08:00
Lorenze Jay
90cdb48db0 latest version of exa 2025-01-30 15:09:47 -08:00
João Moura
199044f866 fixing test 2025-01-28 10:11:37 -03:00
Luis Cardoso
3808f98c14 fix(serper-dev): restore search localization parameters
- 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
2025-01-28 10:46:40 +01:00
Brandon Hancock (bhancock_ai)
060671983d Merge pull request #195 from crewAIInc/bugfix/make-tooling-optional
Fix for Gui
2025-01-23 23:29:19 -05:00
Brandon Hancock
bcb72a9305 Clean up and follow auto import pattern 2025-01-23 15:23:12 -05:00
Brandon Hancock
141ff864f2 clean up 2025-01-23 15:11:45 -05:00
Brandon Hancock
43d045f542 Fix for GUI 2025-01-23 14:43:52 -05:00
Brandon Hancock (bhancock_ai)
88785f4a74 Merge pull request #194 from mplachta/ocr-tool
OCR Tool v1
2025-01-23 10:40:03 -05:00
Mike Plachta
b4d98bbb86 OCR Tool v1 2025-01-22 20:22:57 -08:00
Brandon Hancock (bhancock_ai)
df3842ed88 Merge pull request #181 from crewAIInc/fix/optional-dependencies
make extra dependencies optional for our tools (making most tools an opt in)
2025-01-22 13:06:48 -05:00
Lorenze Jay
4af3724ec2 fix selenium tool 2025-01-21 15:55:05 -08:00
Lorenze Jay
0bd6006b27 Merge branch 'main' of github.com:crewAIInc/crewAI-tools into fix/optional-dependencies 2025-01-21 15:53:14 -08:00
João Moura
4774b996d0 Merge pull request #168 from MinuraPunchihewa/feature/ai_minds_tool
Added the MindsDB AIMind Tool
2025-01-19 02:29:11 -03:00
João Moura
717edbba19 Merge pull request #177 from VinciGit00/main
fix: scrapegraph tool
2025-01-19 02:28:04 -03:00
João Moura
755a9ed055 Merge branch 'main' into main 2025-01-19 02:27:52 -03:00
João Moura
d824f3bb3b Merge pull request #183 from NikhilShahi/feature/add-hyperbrowser
added HyperbrowserLoadTool
2025-01-19 02:25:04 -03:00
João Moura
14ecab7365 Merge branch 'main' into feature/add-hyperbrowser 2025-01-19 02:24:51 -03:00
João Moura
b03d74abe5 Merge pull request #185 from MahlerTom/fix/code-interpreter
Fix/code interpreter
2025-01-19 02:11:10 -03:00
João Moura
bee8fda006 Merge branch 'main' into fix/code-interpreter 2025-01-19 02:10:57 -03:00
João Moura
ef611a9dcd Merge pull request #188 from meerkat-citronella/bugfix/fix-description-on-file_read_tool
Fix description on FileReadTool
2025-01-19 02:08:46 -03:00
João Moura
fb4423c91d Merge branch 'main' into bugfix/fix-description-on-file_read_tool 2025-01-19 02:08:27 -03:00
João Moura
fe3f0bda81 Merge pull request #189 from chethanuk/snowflake
Adding Snowflake search tool
2025-01-19 02:07:02 -03:00
João Moura
3f2161efdb Merge branch 'main' into snowflake 2025-01-19 01:22:42 -03:00
João Moura
cef86f73d9 Merge pull request #191 from KhanhSaypien/fix/HTTPError-import-issue
FIX: Fix HTTPError cannot be found in serperai
2025-01-19 00:10:23 -03:00
ArchiusVuong-sudo
659cb6279e fix: Fixed all from urllib.error import HTTPError 2025-01-18 23:01:01 +07:00
ArchiusVuong-sudo
a606f48b70 FIX: Fix HTTPError cannot be found in serperai 2025-01-18 21:58:50 +07:00
ChethanUK
9c4c4219cd Adding Snowflake search tool 2025-01-17 02:29:35 +05:30
Carter Chen
fe2a5abf8d restructure init statement to remove duplicate call to _generate_description 2025-01-14 21:16:11 -05:00
Carter Chen
1568008db6 remove _generate_description on file_read_tool 2025-01-14 19:22:28 -05:00
Tom Mahler
1bd87f514e changed == None to is None 2025-01-14 21:07:08 +02:00
Tom Mahler
334beda181 added missing import 2025-01-14 21:06:42 +02:00
Lorenze Jay
5cb5f4f1a6 use private attr 2025-01-14 08:48:28 -08:00
Lorenze Jay
14bc8de774 fix browserbase tool here 2025-01-14 08:48:09 -08:00
Nikhil Shahi
e343f26c03 add docstring 2025-01-13 16:08:11 -06:00
Nikhil Shahi
1a824cf432 added HyperbrowserLoadTool 2025-01-13 15:48:45 -06:00
Lorenze Jay
78aff9dbdc fix no client err 2025-01-13 10:45:12 -08:00
Lorenze Jay
50779582ed Merge branch 'main' of github.com:crewAIInc/crewAI-tools into fix/optional-dependencies 2025-01-13 10:32:06 -08:00
Lorenze Jay
31192bcdda fixed multion 2025-01-10 18:31:03 -08:00
Lorenze Jay
d882818d6c fixed serpapi 2025-01-10 18:24:07 -08:00
Lorenze Jay
e26667ea40 removing serpapi from dependenices 2025-01-10 18:17:27 -08:00
Brandon Hancock (bhancock_ai)
71f3ed9ef9 Merge pull request #180 from crewAIInc/bugfix/improve-firecrawl-and-serper
Fix firecrawl errors
2025-01-10 19:47:13 -05:00
Lorenze Jay
d3d3cc4c28 remove y/n as it comes with it within click.confirm and fixed firecrawl tools 2025-01-10 15:56:54 -08:00
Lorenze Jay
41cec25ad9 fix client init on scrapegraph tool 2025-01-10 14:26:03 -08:00
Lorenze Jay
40dcf63a70 optional deps for most 2025-01-10 13:51:39 -08:00
Brandon Hancock
ecbf550be9 Fix firecrawl errors 2025-01-08 16:38:38 -05:00
Brandon Hancock (bhancock_ai)
06f99fc6cd Merge pull request #179 from crewAIInc/bugfix/improve-firecrawl-and-serper
improve serper and firecrawl
2025-01-08 15:15:02 -05:00
Brandon Hancock
90a335de46 Fix patronus issues as well 2025-01-08 15:12:29 -05:00
Brandon Hancock
e5aabe05e1 improve serper and firecrawl 2025-01-08 14:56:12 -05:00
Brandon Hancock (bhancock_ai)
4388235846 Merge pull request #165 from patronus-ai/feat/add-patronus-api-tool
Feat/add patronus api tool
2025-01-07 12:48:08 -05:00
Marco Vinciguerra
91bff42398 Merge branch 'main' of https://github.com/VinciGit00/crewAI-tools 2025-01-07 16:15:50 +01:00
Marco Vinciguerra
4f4b061907 fix: scrapegraph-tool 2025-01-07 16:13:50 +01:00
Marco Vinciguerra
c27727b16e Update scrapegraph_scrape_tool.py 2025-01-07 15:51:52 +01:00
Devin AI
ad4c711223 feat: implement reviewer suggestions for StagehandTool
Co-Authored-By: Joe Moura <joao@crewai.com>
2025-01-03 22:56:38 +00:00
Devin AI
2f8c07320b feat: add new StagehandTool for stagehand integration
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>
2025-01-03 22:38:55 +00:00
Lorenze Jay
4360adc725 Merge pull request #174 from crewAIInc/extra_deps
add optional dependencies for all deps that we have
2025-01-03 14:19:00 -08:00
Lorenze Jay
dab8f648cb leave ignore 2025-01-03 13:48:21 -08:00
Lorenze Jay
9f8529eab2 add optional dependencies for all deps that we have 2025-01-03 13:43:50 -08:00
Brandon Hancock (bhancock_ai)
513c156c4b Merge pull request #173 from mplachta/vision-tool-improvement
Vision Tool Refactoring and Simplify the code
2025-01-03 13:31:23 -05:00
Mike Plachta
9a20c3952f Merge branch 'main' into vision-tool-improvement 2025-01-03 09:36:13 -08:00
Mike Plachta
66dee007b7 Vision Tool Improvement 2025-01-03 09:33:59 -08:00
João Moura
aafcf992ab fix weviate tool 2025-01-03 10:03:53 -03:00
João Moura
c31a8d6ee2 fix 2025-01-03 10:00:25 -03:00
Eduardo Chiarotti
a5d19e3ec3 Merge pull request #172 from crewAIInc/fix/weaviate-init
fix: weaviate init parameters
2025-01-03 08:56:45 -03:00
Eduardo Chiarotti
7efc092873 fix: weaviate init parameters 2025-01-03 08:47:52 -03:00
João Moura
fa901453fe new version 2025-01-03 04:15:39 -03:00
João Moura
8047ee067c treating for uninstalled dependencies 2025-01-03 03:34:34 -03:00
Minura Punchihewa
ea85f02e03 refactored the logic for accessing the API key 2025-01-03 11:49:58 +05:30
Minura Punchihewa
d1be5a937f moved constants like the base URL to a class 2025-01-03 11:48:11 +05:30
Minura Punchihewa
d360906f57 renamed the pkg and module 2025-01-03 11:41:59 +05:30
Minura Punchihewa
29a7961ca8 refined the content in the README 2025-01-03 11:26:16 +05:30
João Moura
16cdabbf35 bumping verison fixing tests 2025-01-03 02:53:24 -03:00
Minura Punchihewa
94cce06044 updated the initialization logic to allow the API key to be passed as env var 2025-01-03 11:08:38 +05:30
João Moura
e0c6ec5bd3 fix imports 2025-01-02 20:51:14 -03:00
João Moura
fc68b9f6bf Merge pull request #167 from Priyanshupareek/patch-1
Update browserbase_load_tool.py | Fix for Browserbase Tool Initialization Issue
2025-01-02 20:45:05 -03:00
Minura Punchihewa
3c29a6cc11 added an example of running the tool to the README 2025-01-03 02:25:14 +05:30
Minura Punchihewa
64d54bd423 updated the content in the README 2025-01-03 01:55:51 +05:30
Minura Punchihewa
faff58ba1c fixed a few bugs, type hints and imports 2025-01-03 01:17:11 +05:30
Minura Punchihewa
555638a654 added the main import statements 2025-01-03 00:37:12 +05:30
Minura Punchihewa
0b5f0841bf implemented the run function for the tool 2025-01-03 00:32:24 +05:30
Minura Punchihewa
55f669989b completed the initialization logic for the tool 2025-01-03 00:28:30 +05:30
Minura Punchihewa
29da6659cf added the skeleton for the AIMind tool 2025-01-02 19:40:56 +05:30
Priyanshupareek
954dd43c17 Update browserbase_load_tool.py 2025-01-02 01:34:42 +05:30
Priyanshupareek
4c7ce3a945 Update browserbase_load_tool.py 2025-01-02 00:54:48 +05:30
Rebecca Qian
10f8a87317 update local evaluator 2024-12-31 04:05:46 -05:00
Rebecca Qian
a7316a86bf fix bug in local evaluator tool 2024-12-31 04:01:26 -05:00
Rebecca Qian
15d6314379 Create separate tool classes 2024-12-31 03:02:15 -05:00
Rebecca Qian
62ddb6c9bd Merge pull request #1 from DarshanDeshpande/feat/add-patronus-api-tool
Update Patronus AI evaluator tool and example
2024-12-31 00:32:52 -05:00
João Moura
0d94a8f7d9 Merge pull request #153 from VinciGit00/main
feat: integration of scrapegraph APIs
2024-12-29 12:26:01 -03:00
João Moura
029afd3e14 Update __init__.py 2024-12-29 12:23:08 -03:00
João Moura
20e852bffc Merge pull request #155 from juliette0704/feat/add_linkup_tool
add linkup tool
2024-12-29 12:21:00 -03:00
João Moura
dd3fea748f Merge pull request #162 from crewAIInc/devin/1735422935-file-read-tool-fix
Fix FileReadTool infinite loop by maintaining original schema
2024-12-28 21:23:17 -03:00
Devin AI
d3391d9ba4 Add comprehensive documentation and type hints to FileReadTool
Co-Authored-By: Joe Moura <joao@crewai.com>
2024-12-28 23:10:51 +00:00
Devin AI
aaf2641cc8 Add comprehensive tests for FileReadTool
Co-Authored-By: Joe Moura <joao@crewai.com>
2024-12-28 22:29:46 +00:00
Devin AI
5e2c38c349 Improve FileReadTool error handling and validation
Co-Authored-By: Joe Moura <joao@crewai.com>
2024-12-28 22:26:37 +00:00
Devin AI
63e23c06c5 Fix FileReadTool infinite loop by maintaining original schema
Co-Authored-By: Joe Moura <joao@crewai.com>
2024-12-28 21:55:35 +00:00
juliette_sivan
e5c47e46a8 add import tools 2024-12-28 10:59:06 -05:00
Marco Vinciguerra
b404439aa9 Merge branch 'main' into main 2024-12-28 09:12:50 +01:00
Marco Vinciguerra
c3ebbba8ae Update __init__.py 2024-12-28 09:11:32 +01:00
João Moura
0674b397f7 Merge pull request #145 from caike/fix-firecrawler-crawl-args
Fix url and api_key args on crawler tool
2024-12-28 00:32:52 -03:00
João Moura
8dd4388c49 Merge pull request #148 from HammamWahab/main
Enabled connection to docker daemon with manual setting of docker base url for code interpreter tool. (Issue #1555)
2024-12-27 23:34:37 -03:00
João Moura
2ad99c04d3 Merge branch 'main' into main 2024-12-27 23:33:36 -03:00
João Moura
cc509a363e Merge pull request #160 from crewAIInc/feature/selenium-scraping-tool-can-return-html
feat: add URL validation and return_html examples
2024-12-27 22:09:01 -03:00
João Moura
ed261892df Merge pull request #156 from pedropereira/feature/selenium-scraping-tool-can-return-html
Feat(SeleniumScrapingTool): Provide capability to return HTML
2024-12-27 22:02:58 -03:00
Devin AI
c7c8cd0a3c feat: add URL validation and return_html examples
- 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>
2024-12-28 00:54:49 +00:00
João Moura
38a7b1e4da Merge pull request #149 from tanys123/feat/serpapi-tools
feat: Add Google Search and Google Shopping tools
2024-12-27 21:48:20 -03:00
João Moura
7b7327c168 Merge pull request #150 from gbertb/fix/spidertool_fixes
Fix(SpiderTool): Improve Tool Reliability and Performance
2024-12-27 18:37:48 -03:00
João Moura
97a4a348ff Merge pull request #151 from hienhayho/main
fix: fix pydantic validation error
2024-12-27 18:30:18 -03:00
João Moura
078120e548 Merge pull request #159 from MahlerTom/main
[BUG] `CodeInterpreterTool` cannot handle mutli-line code
2024-12-27 18:03:47 -03:00
DarshanDeshpande
7da783ef0e Minor formatting changes 2024-12-26 17:44:04 -05:00
DarshanDeshpande
0ac6f915fb Add all Patronus eval tools and update example 2024-12-26 17:37:22 -05:00
Tom Mahler
ba8f95964f added unit testing for multi-line output 2024-12-24 14:14:09 +02:00
Tom Mahler
64b98667a3 fixed code interpreter tests 2024-12-24 14:13:51 +02:00
Tom Mahler
331840e6cc improved imports from docker for better type hinting 2024-12-24 12:17:57 +02:00
Tom Mahler
bb19f1c74c using command list instead of string to avoid parsing issues 2024-12-24 12:12:18 +02:00
Pedro Pereira
f11756387d chore: add tests for SeleniumScrapingTool 2024-12-19 21:06:51 +00:00
Tony Kipkemboi
b7a132db89 Merge pull request #147 from crewAIInc/feature/enhanced-serper-search
feat(serper-dev): implement enhanced search capabilities and error ha…
2024-12-19 13:15:11 -05:00
Pedro Pereira
5e00b74cd4 chore: update readme 2024-12-19 17:38:30 +00:00
juliette_sivan
4c5f1962ac add linkup tool 2024-12-19 14:07:36 +01:00
Pedro Pereira
8d8c3677ff feat: add optional return_html flag to SeleniumScrapingTool 2024-12-18 18:23:18 +01:00
Marco Vinciguerra
b58d80dcf9 update documents according to suggestions 2024-12-18 14:42:37 +01:00
Marco Vinciguerra
7608944e7f Update README.md 2024-12-18 14:38:34 +01:00
Marco Vinciguerra
c070ba002c feat: integration of scrapegraph APIs 2024-12-18 14:34:40 +01:00
Gilbert Bagaoisan
1bbac87e70 Improved readme based on recommendations—added more advanced usage examples 2024-12-17 21:00:40 -08:00
Gilbert Bagaoisan
73b803ddc3 various improvements for PR based on recommendations 2024-12-17 21:00:34 -08:00
Ho Trong Hien
c7624e1f57 Merge pull request #1 from hienhayho/hienhayho-fix-llamaindex-result-as-answer
fix: fix pydantic validation error
2024-12-17 22:29:19 +07:00
Ho Trong Hien
059d635f02 fix: fix pydantic validation error
- 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
2024-12-17 22:28:41 +07:00
Gilbert Bagaoisan
3795d7dd8e Reversed order of url validation 2024-12-16 22:19:46 -08:00
Gilbert Bagaoisan
4551b8c625 Updated readme 2024-12-16 22:05:46 -08:00
Gilbert Bagaoisan
cd37ede869 lint fixes 2024-12-16 22:05:28 -08:00
Terry Tan Yongsheng
81981e43b6 Add type hints 2024-12-17 13:45:50 +08:00
Terry Tan Yongsheng
2effe9a7d2 Add README 2024-12-17 11:09:38 +08:00
Terry Tan Yongsheng
56a9060840 Add SerpApi tools - google search, google shopping 2024-12-17 11:09:28 +08:00
Rip&Tear
e40ca38daf Merge branch 'main' into feature/enhanced-serper-search 2024-12-16 22:53:55 +08:00
Hammam Abdelwahab
b6bb5dbd53 Enabled manual setting of docker base url for code interpreter tool. Goal is to avoid the error: CodeInterpreterTool Error while fetching server API version: 2024-12-15 10:38:56 +01:00
Hammam Abdelwahab
c26e962d17 Enabled manual setting of docker base url for code interpreter tool. Goal is to avoid the error: CodeInterpreterTool Error while fetching server API version: 2024-12-15 10:34:07 +01:00
DarshanDeshpande
d94f7e03dc Update Patronus AI evaluator tool and example 2024-12-14 15:46:10 -05:00
Rebecca Qian
c76e0f3445 Add patronus evaluation tools
remove fields

rename eval tool

remove eval tool

init files
2024-12-13 19:08:05 -05:00
Carlos Souza
668e87d5e1 Add constructor comments 2024-12-13 11:26:46 -05:00
Carlos Souza
164442223e Organize imports 2024-12-13 11:23:53 -05:00
Carlos Souza
3a095183c5 Use proper options and accept custom FirecrawlApp 2024-12-13 11:20:08 -05:00
Carlos Souza
2cb33b18e5 Remove outdated params 2024-12-13 11:18:59 -05:00
theCyberTech
00418d98f7 resolved conflict 2024-12-13 22:01:04 +08:00
theCyberTech
1fd5805bef Resolved conflict 2024-12-13 21:59:38 +08:00
theCyberTech
b0a948797a feat(serper-dev): implement enhanced search capabilities and error handling
- 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
2024-12-13 21:42:01 +08:00
Carlos Souza
1eb5d50a55 Fix url and api_key args on crawler tool 2024-12-12 16:00:24 -05:00
Tony Kipkemboi
a49be2fc52 Merge pull request #142 from crewAIInc/feat/weaviate-tool
setup weaviate vector search tool
2024-12-09 10:44:11 -05:00
Lorenze Jay
d5d83cbd7e fix collection name docs 2024-12-08 21:48:15 -08:00
Lorenze Jay
a0e0c28152 setup weaviate vector search tool 2024-12-08 21:44:19 -08:00
Brandon Hancock (bhancock_ai)
264f1e0f0e Merge pull request #141 from crewAIInc/bugfix/fix-basetool-import
update basetool dependencies to use root crewai repo
2024-12-05 13:36:45 -05:00
Brandon Hancock
d5fb31e645 update basetool dependencies to use root crewai repo 2024-12-05 13:16:48 -05:00
João Moura
e1482d740f Merge pull request #116 from ernestp/main
fix: web scraper concatenate words
2024-12-05 12:00:20 -03:00
João Moura
7c375976ab Merge pull request #128 from mplachta/jina_website_scraper
Jina Website Scraper v1
2024-12-05 11:56:26 -03:00
João Moura
5b813e3d31 Merge pull request #132 from caike/fix-firecrawl-scrape-pydantic-errors
Fix pydantic related errors on FirecrawlScrapeWebsiteTool
2024-12-05 11:56:08 -03:00
João Moura
25969d9db7 Merge pull request #134 from caike/fix-firecrawl-crawl-pydantic-errors
Fix pydantic related errors on FirecrawlCrawlWebsiteTool
2024-12-05 11:55:26 -03:00
João Moura
f64a93b541 Merge pull request #139 from crewAIInc/tools_readme_update
docs: add Discourse community link to contact section
2024-12-05 11:54:41 -03:00
João Moura
569d9e7f75 Merge pull request #137 from siddas27/feature/BraveSearchTool
add brave search tool
2024-12-05 11:08:03 -03:00
siddas27
a64cccbd72 add BraveSearchTool to init 2024-12-04 22:28:30 -06:00
theCyberTech
e0d3ee5b23 docs: add Discourse community link to contact section
Add link to Discourse community platform in the contact section to provide users with an additional support channel alongside Discord.
2024-12-03 20:35:23 +08:00
siddas27
95cc6835a1 update name 2024-11-30 22:30:31 -06:00
siddas27
e7e059d02a add rate limiting 2024-11-30 22:08:29 -06:00
siddas27
5532ea8ff7 add lru caching 2024-11-30 21:51:46 -06:00
siddas27
d168b8e245 add error handling 2024-11-30 21:36:28 -06:00
siddas27
6c242ef3bb add brave search tool 2024-11-30 14:04:06 -06:00
Tony Kipkemboi
0e49353fcd Merge pull request #135 from crewAIInc/fix/nl2sql-readme-typos
docs: fix typos and formatting in NL2SQL tool README
2024-11-30 11:54:14 -05:00
Tony Kipkemboi
41711c1ffe Merge pull request #129 from crewAIInc/docs_fix
Fix API Key Reference in MultiOnTool README
2024-11-30 11:52:45 -05:00
Tony Kipkemboi
ea2994d341 Merge pull request #133 from crewAIInc/docs/fix-codedocssearch-readme
docs: improve CodeDocsSearchTool README
2024-11-30 11:44:01 -05:00
theCyberTech
945ed7aaaa docs: fix typos and formatting in NL2SQL tool README 2024-11-30 10:52:57 +08:00
Carlos Souza
eed6a38ea4 Fix pydantic related errors. 2024-11-29 11:42:07 -05:00
theCyberTech
ec9951e28a docs: improve CodeDocsSearchTool README
- Fix tool name in custom model example
2024-11-30 00:34:04 +08:00
Carlos Souza
e677a271e5 More explicit model config 2024-11-29 05:57:09 -05:00
Carlos Souza
49ad43ff08 Do not reraise exception
Tool use is optional and missing dependency
should not raise error
2024-11-29 05:51:55 -05:00
Carlos Souza
a94470772f Fix pydantic related errors on FirecrawlScrapeWebsiteTool 2024-11-28 19:09:44 -05:00
Mike Plachta
dd18c59a9b Update jina_scrape_website_tool.py 2024-11-27 19:57:52 -08:00
theCyberTech
cbec6d5cd7 docs: fix API key reference in MultiOnTool README 2024-11-28 11:15:18 +08:00
Mike Plachta
15970734e3 Jina Website Scraper v1 2024-11-27 17:52:56 -08:00
Eduardo Chiarotti
601abb2bc3 Merge pull request #125 from crewAIInc/feat/remove-langchain
feat: remove langchain from code and update Dockerfile from CodeInterpreter
2024-11-26 16:56:29 -03:00
Eduardo Chiarotti
488782fb4a feat: remove langchain from code and change to CrewStructuredTool and update Dockerilf CodeInterpreter 2024-11-25 16:14:49 -03:00
theCyberTech
1c37158208 fix: correct variable name typo in exa_base_tool 2024-11-20 18:58:58 +08:00
João Moura
a3630418f9 Merge pull request #121 from piotrm0/piotrm/base_tool
remove independent BaseTool
2024-11-10 19:48:52 -03:00
Piotr Mardziel
10639d8775 Update base_tool.py 2024-11-05 16:22:35 -08:00
Brandon Hancock
2061f8ca41 Improve firecrawl tool 2024-11-01 17:19:59 -04:00
Ernest Poletaev
1f8791953e fix: retain line breaks 2024-10-25 22:33:24 +07:00
Ernest Poletaev
96e52767ad fix: web scraper concatenate words 2024-10-25 22:03:59 +07:00
Rip&Tear
9eac65f9f6 Merge pull request #115 from adanbu/main
Fixing errors of the File Writer tool
2024-10-24 12:28:20 +08:00
Brandon Hancock
8e15bc6386 add support for unsafe code execution 2024-10-23 10:36:29 -04:00
Adan Butto
6a7e917e1d Changed order of the arguments, placing 'content' last.
It tends to forget context when it gets to filling other arguments when content is on the longer side.
2024-10-22 18:47:52 +03:00
Adan Butto
857d6c135c reverted directory variable back to optional 2024-10-20 20:37:59 +03:00
Adan Butto
96429040de Fixed File Writer tool errors for better interaction with the agents 2024-10-20 18:54:01 +03:00
João Moura
c4f8a1cdf1 Merge pull request #107 from masorensen/bug/ragTools-kwargs
Scoping issue causing error in RAG tools
2024-10-17 16:43:11 -03:00
João Moura
d54b8a6e8d Merge pull request #112 from 11bluetree/patch-1
fix: SpiderTool import
2024-10-17 14:19:22 -03:00
Aoki Haruhito
fe172cb4de fix: SpiderTool import 2024-10-17 10:03:37 +09:00
Eduardo Chiarotti
1e76b66234 Merge pull request #111 from crewAIInc/feat/migrate-uv
Feat/migrate uv
2024-10-15 14:49:39 -03:00
Eduardo Chiarotti
90a13cb6f7 feat: change to uv on docs 2024-10-15 09:16:17 -03:00
Mike Sorensen
1cc8966e2e fixed scoping issue causing error in RAG tools 2024-09-23 22:18:22 -05:00
Rip&Tear
a04d98f62f Merge pull request #101 from crewAIInc/brandon/cre-250-llamaindex-pydantic-v2
Pydantic v1 issues
2024-09-13 21:53:32 +08:00
Brandon Hancock
35fe222ca1 Move off v1 2024-09-03 15:57:29 -04:00
Rip&Tear
d19bba72b0 Merge pull request #96 from crewAIInc/docs_update
Updated GitHub repo links and readme.md
2024-08-31 12:32:52 +08:00
theCyberTech
5957573625 Updated github repo links _ readme.md 2024-08-29 17:41:43 +08:00
João Moura
91c394ffce Merge pull request #95 from crewAIInc/feat/update-code-interpreter
feat: Add volume option
2024-08-27 07:25:29 -07:00
Eduardo Chiarotti
d146e4a961 feat: change the anme of user dockerfile path 2024-08-27 09:01:09 -03:00
Eduardo Chiarotti
8007938d6b feat: ADd volume option 2024-08-27 08:35:56 -03:00
Thiago Moretto
859e6162e8 Merge pull request #93 from crewAIInc/fix-nl2sql-pydantic-conflict
Fix NL2SQL pydantic version conflict
2024-08-19 13:49:06 -03:00
Thiago Moretto
e8b185e607 Fix NL2SQL pydantic version conflict 2024-08-14 14:05:44 -03:00
Eduardo Chiarotti
c32023df29 Merge pull request #91 from crewAIInc/fix/dalle-docs
docs: fix issue on Dalle tool docs
2024-08-13 11:25:25 -03:00
Eduardo Chiarotti
a228732423 docs: fix 2024-08-13 08:40:12 -03:00
Eduardo Chiarotti
b47926b1d9 docs: fix plural 2024-08-13 08:39:49 -03:00
Eduardo Chiarotti
64762887f0 docs: fix issue on Dalle tool docs 2024-08-13 08:39:20 -03:00
João Moura
5dd49762e3 Fixing imports and cutting new patch 2024-08-11 00:46:32 -03:00
João Moura
d861dcc3c4 Merge pull request #85 from rafaelsideguide/fix/firecrawl-timeout-description
[Bug] Improvements on default values and timeout description
2024-08-10 19:59:54 -07:00
João Moura
32abada521 Merge pull request #81 from Ryuzaki1415/patch-1
Corrected the acronym 'RAG'
2024-08-10 19:59:15 -07:00
João Moura
2416c08760 Merge pull request #41 from antunsz/feature/add-folder-file-writer
adding file writer tool and documentation
2024-08-10 19:40:24 -07:00
João Moura
fba480c582 Merge branch 'main' into feature/add-folder-file-writer 2024-08-10 19:40:03 -07:00
João Moura
50dc37ad5b adding dalle import 2024-08-10 23:35:46 -03:00
João Moura
1227c3fc7c Merge pull request #35 from antunsz/feature/add-mysql-tool
Feature/add mysql tool
2024-08-10 19:35:21 -07:00
João Moura
2da8cfcf99 Merge branch 'main' into feature/add-mysql-tool 2024-08-10 19:35:08 -07:00
João Moura
e7078f6502 Merge pull request #83 from crewAIInc/feat/add-vision-tool
feat: Add Vision tool to the CrewAI tool
2024-08-10 19:22:01 -07:00
rafaelsideguide
a2e38b6121 Improvements on default values and description 2024-08-06 13:56:44 -03:00
Eduardo Chiarotti
4835c2bf68 feat: Add Vision tool to the CrewAI tool 2024-07-31 17:10:26 -03:00
João Moura
d28dba453e Merge pull request #82 from crewAIInc/feat/dall-e-tool
feat: Add Dall-E tool to generate images
2024-07-30 18:37:34 -07:00
Eduardo Chiarotti
0070df7451 docs: Add documentation for the DallETool 2024-07-30 22:29:45 -03:00
Eduardo Chiarotti
b343c71b9b feat: Add Dall-E tool to generate images 2024-07-30 22:17:23 -03:00
Eduardo Chiarotti
88becbd6e1 Merge pull request #80 from crewAIInc/feat/NL2SQL-tool
feat: Add nl2sql tool to run and execute sql queries in databases
2024-07-26 14:25:01 -03:00
Dheeraj Unni
225ee06030 Corrected the acronym 'RAG' 2024-07-26 17:05:58 +05:30
Eduardo Chiarotti
18a28261a4 docs: Add documentation for NL2SqlTool 2024-07-25 15:25:48 -03:00
Eduardo Chiarotti
c372641be8 feat: format code 2024-07-24 21:39:49 -03:00
Eduardo Chiarotti
6fd02cdf82 feat: remove unecessary code 2024-07-24 21:38:52 -03:00
Eduardo Chiarotti
2df29f3dde feat: Add nl2sql tool to run and execute sql queries in databases 2024-07-24 21:37:22 -03:00
João Moura
8506505301 Merge pull request #78 from wuloi/main
fixing serply_api_tool
2024-07-19 09:33:11 -07:00
ai.flyingwheel
25343727fd fixing serply_api_tool 2024-07-19 23:11:10 +08:00
João Moura
0386120a5a fixing serper tool 2024-07-19 00:28:27 -04:00
Carlos Antunes
21342fa0f6 adding the proper imports into __init__.py files, and fixing the folder name 2024-07-15 13:00:06 -03:00
Carlos Antunes
d5e6b95817 adding the appropriate imports on the __init__.py files 2024-07-15 12:41:53 -03:00
João Moura
d8c98f2e64 Merge pull request #38 from mishushakov/main
updated browserbase tool
2024-07-14 17:10:42 -07:00
João Moura
33a0f05804 Merge pull request #42 from WilliamEspegren/main
Added Spider Tool
2024-07-14 15:24:27 -07:00
João Moura
d9ad8c62b9 Merge branch 'main' into main 2024-07-14 15:23:27 -07:00
João Moura
3f3ef03395 Merge pull request #44 from SuperMuel/add-more-parameters-to-serperdev-search-payload
Add more parameters to serperdev search payload
2024-07-14 14:00:02 -07:00
João Moura
f447f71a8e Update serper_dev_tool.py 2024-07-14 17:59:17 -03:00
João Moura
ac3ee8576d Merge branch 'main' into add-more-parameters-to-serperdev-search-payload 2024-07-14 13:48:54 -07:00
João Moura
7227a0e740 Merge pull request #45 from mazen-r/main
Add Scrapfly website scrape tool
2024-07-14 13:46:19 -07:00
João Moura
1111a1ac6b Merge branch 'main' into main 2024-07-14 13:46:10 -07:00
João Moura
7dd33e0b3a Merge pull request #51 from smsajjadzaidi/fix/serper_dev_tool
fixed use of arg n_results
2024-07-14 13:39:20 -07:00
João Moura
75ee346d18 Merge pull request #53 from googio/adding-serply-api
Adding Serply API
2024-07-14 13:37:03 -07:00
João Moura
2bcb9e7000 Merge branch 'main' into adding-serply-api 2024-07-14 13:36:25 -07:00
João Moura
c9d22489b8 Merge pull request #58 from strnad/fix-ragtool-parameters
fix: Ensure tools handle parameters passed post-creation correctly
2024-07-14 12:08:11 -07:00
João Moura
1a676c6340 Merge pull request #64 from sethcoast/pdf-search-tool-query-fix
Limit PDF search results to the provided PDF (IF a PDF is provided)
2024-07-14 12:07:34 -07:00
João Moura
1cf2ebb07b Merge pull request #55 from theCyberTech/patch-2
Update serper_dev_tool.py
2024-07-14 11:31:14 -07:00
João Moura
acf776f91a Merge pull request #61 from celobusana/busana/fix-selenium-firefox-options
Fix: Selenium incorrect firefox options import
2024-07-14 11:30:46 -07:00
João Moura
f0d924fab1 Merge pull request #71 from strnad/add_tools_params_description
arguments descriptions added to tool description
2024-07-14 11:30:02 -07:00
João Moura
fc52061bc9 Merge pull request #60 from MULTI-ON/main
add multion tool
2024-07-12 09:10:01 -07:00
João Moura
3be455e971 Merge pull request #73 from strnad/fix_ScrapeWebsiteTool_encoding
bugfix: ScrapeWebsiteTool encoding
2024-07-12 09:09:27 -07:00
Naman Garg
676e714c8b Merge branch 'main' into main 2024-07-08 15:12:25 -07:00
Naman Garg
6f45c6ed09 Updated Readme 2024-07-08 15:11:04 -07:00
Jakub Strnad
65855cbe56 bugfix: ScrapeWebsiteTool encoding
fixed problem with garbage output of ScrapeWebsiteTool on some websites
2024-07-08 15:24:26 +02:00
João Moura
f056764132 adding firecrawl imports 2024-07-08 01:15:00 -04:00
Jakub
cb1dc13a9d fixed intendation 2024-07-05 18:42:16 +02:00
Jakub Strnad
a5d2839431 arguments descriptions added to tool description
so now the agent knows how to use the tools params
2024-07-05 16:30:41 +02:00
João Moura
cf67b424c2 Merge pull request #70 from joaomdmoura/fix/code-interpreter-description
fix: fix type hinting, add container name and handle exception and returned old description
2024-07-04 12:59:29 -07:00
Eduardo Chiarotti
ba05d18ab1 fix: fix type hinting, add container name and handle exception and returned old description 2024-07-04 16:42:29 -03:00
João Moura
b4d91d1ce0 adding new result_as_answer options 2024-07-04 00:10:31 -04:00
João Moura
a801f1cd24 Merge pull request #34 from rafaelsideguide/added-firecrawl-tools
added Firecrawl tools
2024-07-03 14:46:44 -07:00
João Moura
f2063d01fa Merge pull request #69 from joaomdmoura/fix/import-code-tool
fix: add code interpreter tool
2024-07-02 09:00:11 -07:00
Eduardo Chiarotti
d000bd2fc8 fix: add code interpreter tool 2024-07-02 12:00:04 -03:00
João Moura
f743a5ce61 Merge pull request #62 from angrybayblade/feat/composio-tool
Add `composio` CrewAI tool wrapper
2024-07-01 18:12:53 -07:00
João Moura
241dc37ba3 Merge branch 'main' into feat/composio-tool 2024-07-01 18:12:45 -07:00
João Moura
f79c385bf7 revamping code interpreter 2024-07-01 00:55:21 -07:00
João Moura
00e573c960 Merge pull request #67 from MervinPraison/main
Update __init__.py to Add CodeInterpreterTool
2024-06-30 20:38:12 -07:00
Mervin Praison
a3d3a70b5a Update __init__.py to Add CodeInterpreterTool 2024-07-01 04:34:39 +01:00
angrybayblade
9a8d88b8aa fix: merge from_app and from_use_case 2024-06-27 13:35:57 +05:30
angrybayblade
58354ec638 chore: update README 2024-06-27 12:23:05 +05:30
angrybayblade
369c03a257 feat: add check for auth accounts 2024-06-27 12:16:22 +05:30
angrybayblade
7ffd8f5129 Merge branch 'main' into feat/composio-tool 2024-06-27 11:56:55 +05:30
angrybayblade
ab484172ef chore: update readme 2024-06-27 11:40:02 +05:30
angrybayblade
be6e1a79dd feat: add search utility methods 2024-06-27 11:39:42 +05:30
angrybayblade
41478abdf5 feat: define ComposioTool in the top level imports 2024-06-27 11:36:52 +05:30
João Moura
7a6e588c58 Merge pull request #59 from joaomdmoura/feat/code-interpreter
Feat: Code Interpreter tool
2024-06-27 02:25:25 -03:00
João Moura
25339f3ee1 Merge branch 'main' into feat/code-interpreter 2024-06-27 02:25:18 -03:00
Seth Donaldson
a95f5c27c6 Create PDFEmbedchainAdapter class and utilize it in PDFSearchTool 2024-06-26 15:52:54 -04:00
Seth Donaldson
f5d092f6a3 clean copy of embedchain_adapter.py 2024-06-26 15:46:14 -04:00
angrybayblade
d4449ee5f0 feat: add composio CrewAI tool wrapper 2024-06-24 20:49:09 +05:30
Marcelo Busana
f9c803a8c1 Fix: Selenium incorrect firefox options import 2024-06-23 15:33:55 -03:00
Naman Garg
d84a616572 update local option description in readme 2024-06-21 15:01:08 -07:00
Naman Garg
c97678bb11 add multion tool 2024-06-21 14:48:24 -07:00
Jakub Strnad
2f80840c74 fix: Ensure tools handle parameters passed post-creation correctly (#3)
- 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>
2024-06-21 15:06:17 +02:00
Eduardo Chiarotti
161c72b29f feat: update README 2024-06-20 21:55:25 -03:00
Eduardo Chiarotti
61cce93fd0 feat: remove unused Makefile, update README and update code 2024-06-20 21:41:12 -03:00
Eduardo Chiarotti
94e6651b55 feat: add code-interpreter tool to init and add unit tests 2024-06-20 20:43:19 -03:00
Eduardo Chiarotti
1a4ac76b1e feat: update code 2024-06-20 20:24:47 -03:00
Eduardo Chiarotti
da75d51fe8 feat: add Dockerfile, Makefile and update version of code 2024-06-20 20:24:26 -03:00
João Moura
bd13b55afd Adding new PDFTextWritingTool 2024-06-20 12:56:35 -03:00
Serply
0f703950d9 Merge branch 'main' into adding-serply-api 2024-06-20 08:22:18 -04:00
Eduardo Chiarotti
2b47377a78 feat: add code-interpreter tool 2024-06-19 20:45:04 -03:00
João Moura
f3bf13e1b1 Merge pull request #50 from jerryjliu/jerry/add_llamaindex_tool
add llamaindex tool
2024-06-14 01:12:41 -03:00
teampen
806f884956 using GET in markdown 2024-06-14 01:43:25 +00:00
Rip&Tear
5e8e711170 Update serper_dev_tool.py
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)
2024-06-13 12:53:35 +08:00
teampen
2c0f90dd22 adding serply job search tool 2024-06-11 13:03:17 -04:00
teampen
ffe3829cef adding webpage to markdown 2024-06-10 21:34:53 -04:00
teampen
d8b8edab08 adding google search, sholar, and news 2024-06-10 21:15:21 -04:00
smsajjadzaidi
ff80e6cb79 fixed use of arg n_results 2024-06-10 02:54:21 +05:00
Jerry Liu
7ee7d846e2 cr 2024-06-08 21:42:28 -07:00
Mazen Ramadan
53e9b40725 Add Scrapfly website scrape tool 2024-05-27 14:48:38 +03:00
WilliamEspegren
ad965357ce refined spider_tool.py 2024-05-25 22:40:48 +02:00
WilliamEspegren
f0f1ab175a remove unecessary os import 2024-05-25 22:36:30 +02:00
WilliamEspegren
7d40c98434 remove full tool import 2024-05-25 22:28:48 +02:00
WilliamEspegren
56146b7df4 remove full tool, refined tool 2024-05-25 22:22:50 +02:00
SuperMuel
438c979a2e Add n_results, country, location and locale parameters to payload 2024-05-23 13:51:17 +02:00
WilliamEspegren
5b7276c0bb x 2024-05-23 12:03:48 +02:00
WilliamEspegren
70b5a3ab85 fixed white space 2024-05-22 17:05:46 +02:00
WilliamEspegren
60eb6e7c6f spider_tool working, not spider_full_tool 2024-05-21 23:34:05 +02:00
WilliamEspegren
dd15dab111 added full params 2024-05-21 21:26:12 +02:00
WilliamEspegren
0b49403635 remove print from testing 2024-05-21 12:06:08 +02:00
WilliamEspegren
4e1425665c spider tool 2024-05-21 11:48:52 +02:00
Carlos Antunes
1f08d74015 adding file writer tool and documentation 2024-05-20 22:00:34 -03:00
Mish Ushakov
bedbac2aaf updated browserbase tool readme 2024-05-20 09:02:55 +00:00
Mish Ushakov
5c2d8c4cfa updated browserbase tool 2024-05-20 08:58:25 +00:00
Carlos Antunes
a11cc57345 adding MySQLSearcherTool 2024-05-18 16:58:40 -03:00
Carlos Antunes
e36af697cd adding MySQLSearchTool README 2024-05-18 16:56:06 -03:00
rafaelsideguide
a51a7000c5 added Firecrawl tools 2024-05-16 11:20:36 -03:00
João Moura
53c7d815ae preapring new verison with new version of Exa tool 2024-05-13 21:30:34 -03:00
João Moura
4b11881a70 Merge pull request #32 from slavakurilyak/feature/fix-docx-search-tool
Fix TypeError in DOCXSearchTool Schema
2024-05-08 17:20:03 -03:00
Slava Kurilyak (slavakurilyak.eth)
cecfde6608 Fix TypeError in FixedDOCXSearchToolSchema by correcting Optional usage with Field 2024-05-06 15:21:23 -03:00
Slava Kurilyak (slavakurilyak.eth)
b14f2d4bf1 Revert "Fix TypeError in FixedDOCXSearchToolSchema by correcting Optional usage with Field"
This reverts commit e0840e4826.
2024-05-06 15:21:07 -03:00
Slava Kurilyak (slavakurilyak.eth)
e0840e4826 Fix TypeError in FixedDOCXSearchToolSchema by correcting Optional usage with Field 2024-05-06 15:19:37 -03:00
João Moura
7c6b1249fb cutring new version with improved docs search 2024-05-06 14:02:09 -03:00
João Moura
037e80c6a3 cutting new verison with exa search tool 2024-05-02 23:15:32 -03:00
João Moura
59d9d9eb1f moving EXA env dependency to tool execution 2024-05-02 04:12:45 -03:00
João Moura
cf6231384c quick fix 2024-05-02 03:56:14 -03:00
João Moura
a95cbfdc6a TYPO 2024-05-02 03:04:48 -03:00
João Moura
cf96d5579f Update README.md 2024-05-02 02:54:18 -03:00
João Moura
768bb74a2c renaming exa tool 2024-05-02 02:50:54 -03:00
João Moura
ffd5942b31 pushing initial exa search tool 2024-05-02 02:48:21 -03:00
João Moura
5fb9ddfa2a updating serperdev to allow for query and search_query 2024-05-02 02:37:47 -03:00
João Moura
b992238a5d Merge pull request #13 from eltociear/main
Update serper_dev_tool.py
2024-05-02 02:28:24 -03:00
João Moura
a474745b67 Merge pull request #18 from jeroen-vet/jeroen-vet-patch-1
Update serper_dev_tool.py consider n_results parameter
2024-05-02 02:26:55 -03:00
João Moura
5d64a5c41c Merge branch 'main' into jeroen-vet-patch-1 2024-05-02 02:26:48 -03:00
João Moura
d4fc993f1e Update serper_dev_tool.py 2024-05-02 02:25:55 -03:00
João Moura
843c982ba9 Merge pull request #19 from Tavernari/main
Improve File Reading Robustness in FileReadTool
2024-05-02 02:24:54 -03:00
João Moura
e6da49754d Merge pull request #28 from mishushakov/main
Updated Browserbase load tool
2024-05-02 02:23:41 -03:00
Mish Ushakov
f78011e68c added args_schema to browserbase tool 2024-04-29 11:53:10 +02:00
Mish Ushakov
39aba4cb48 updated browserbase load tool 2024-04-25 12:15:31 +00:00
João Moura
ed58694675 Merge pull request #25 from mishushakov/main
added BrowserbaseLoadTool
2024-04-24 00:03:04 -03:00
Mish Ushakov
e0d799c075 updated browserbase integration 2024-04-19 11:40:03 +00:00
Mish Ushakov
b80dd1ca8b added BrowserbaseLoadTool 2024-04-17 13:36:21 +00:00
João Moura
031fe500fb Merge pull request #24 from Christian24/patch-1
Fix wrong comments / descriptions for SerperDevTool
2024-04-16 10:42:05 -03:00
Christian24
aab3acbaa6 Fix wrong comments / descriptions for SerperDevTool 2024-04-15 22:14:16 +02:00
João Moura
3aa1bc3894 Merge pull request #23 from joaomdmoura/gui/fix-descriptions
Fix tool descriptions
2024-04-10 11:49:28 -03:00
Gui Vieira
c5fd5196e2 Fix tool descriptions 2024-04-10 11:48:23 -03:00
João Moura
be1a60554f TYPO 2024-04-07 18:22:09 -03:00
João Moura
873112d696 fxing docs 2024-04-07 18:12:16 -03:00
João Moura
9f41fb4057 Adding timeout to scrapping website tool 2024-04-07 14:18:41 -03:00
João Moura
dd2349a90a Merge pull request #22 from joaomdmoura/gui/fix-github-search-tool
Fix GithubSearchTool
2024-04-05 18:06:09 -03:00
Gui Vieira
776826ec99 Fix GithubSearchTool 2024-04-05 18:04:45 -03:00
João Moura
9c98ad455d Merge pull request #21 from joaomdmoura/gui/fix-rag-tools
Fix RAG tools
2024-04-04 13:45:28 -03:00
Gui Vieira
4e9709b8fb Fix RAG tools 2024-04-04 13:42:30 -03:00
Victor C Tavernari
92abe0b726 Enhance file reading with error handling
- 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.
2024-03-31 23:41:02 +01:00
João Moura
80f9613959 Adding two default arguments to cache function 2024-03-27 15:04:45 -03:00
Jeroen Vet
3b77de7b21 Update serper_dev_tool.py consider n_results parameter
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.
2024-03-23 18:36:08 +01:00
João Moura
f17057898d Merge pull request #17 from joaomdmoura/gui/custom-model-docs
Custom model docs
2024-03-22 03:01:52 -03:00
Gui Vieira
95fb44be88 Custom model docs 2024-03-21 21:13:36 -03:00
Gui Vieira
1c8d010601 Custom model config for RAG tools 2024-03-19 18:47:13 -03:00
João Moura
73cae1997d Merge pull request #15 from joaomdmoura/joaomdmoura/cache-option
adding cache_function to base_tool
2024-03-19 13:42:08 -03:00
João Moura
b8e86b0fb4 adding cache_function to base_tool 2024-03-19 13:33:20 -03:00
Ikko Eltociear Ashimine
c09f62cf47 Update serper_dev_tool.py
stirng -> string
2024-03-17 12:32:08 +09:00
João Moura
cf4f49c6e9 cutting new version 2024-03-07 20:32:18 -03:00
João Moura
37aa8d6b63 Adding docs for all tools 2024-03-03 22:14:30 -03:00
João Moura
8ffbd9665b avoinding organic error on serper dev tool 2024-03-03 12:32:13 -03:00
João Moura
7f683b21f5 preparring new version 2024-03-03 12:29:46 -03:00
João Moura
d19814d7a3 fixing TYPO 2024-03-03 12:29:32 -03:00
João Moura
51358b3cc4 updating scrapping tool 2024-03-02 12:41:55 -03:00
João Moura
ec97e15a3a Adding new description generator 2024-02-29 03:10:11 -03:00
João Moura
640b5a9461 adding intial selenium scrapping tool 2024-02-29 03:10:11 -03:00
João Moura
f2dfa07221 Merge pull request #5 from slavakurilyak/fix-none-type-query-error
Fix NoneType object has no attribute 'query' error by updating app attribute
2024-02-27 23:38:51 -03:00
Slava Kurilyak (slavakurilyak.eth)
467b05532f Fix NoneType object has no attribute 'query' error by updating app attribute 2024-02-27 22:33:04 -03:00
João Moura
79eec51c9a Cutting new version with improved scrapping 2024-02-26 06:52:22 -03:00
João Moura
cff6082f1c improving scrapping tools 2024-02-26 06:20:15 -03:00
João Moura
9e560ff951 adding new scrapping tools 2024-02-26 06:15:15 -03:00
João Moura
80942bf38c properly adding serper tool 2024-02-26 06:01:05 -03:00
João Moura
50bae27948 revamping crewai tool 2024-02-25 21:11:09 -03:00
João Moura
7c99e9ab50 preparing new verion and adding new tools 2024-02-24 03:13:17 -03:00
João Moura
f3c693a5bb very much work in progress version 2024-02-22 19:56:42 -03:00
João Moura
e94fd2cad2 quick fixes 2024-02-15 18:27:38 -03:00
João Moura
b4f270ad1f quick fixes 2024-02-15 18:26:15 -03:00
João Moura
7ee9926f2e quick fixes 2024-02-15 18:24:16 -03:00
João Moura
a20481d023 adding RAG spefic readme and implementing specific helpers 2024-02-15 18:01:53 -03:00
João Moura
aa7e336989 adding assets 2024-02-15 14:03:58 -03:00
João Moura
db5d371769 Quick tools reorganization 2024-02-15 14:02:42 -03:00
João Moura
a232bfbe60 Merge pull request #1 from joaomdmoura/gui/rag-tool
First take on a rag tool
2024-02-15 13:22:52 -03:00
Gui Vieira
c1182eb322 First take on a rag tool 2024-02-13 20:10:56 -03:00
João Moura
54e4554f49 first commit 2024-01-14 11:54:26 -03:00
1747 changed files with 156421 additions and 33570 deletions

46
.github/workflows/build-uv-cache.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Build uv cache
on:
push:
branches:
- main
paths:
- "uv.lock"
- "pyproject.toml"
workflow_dispatch:
permissions:
contents: read
jobs:
build-cache:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.8.4"
python-version: ${{ matrix.python-version }}
enable-cache: false
- name: Install dependencies and populate cache
run: |
echo "Building global UV cache for Python ${{ matrix.python-version }}..."
uv sync --all-groups --all-extras
echo "Cache populated successfully"
- name: Save uv caches
uses: actions/cache/save@v4
with:
path: |
~/.cache/uv
~/.local/share/uv
.venv
key: uv-main-py${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}

102
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,102 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced"
on:
push:
branches: [ "main" ]
paths-ignore:
- "src/crewai/cli/templates/**"
pull_request:
branches: [ "main" ]
paths-ignore:
- "src/crewai/cli/templates/**"
jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write
# 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' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

View File

@@ -2,6 +2,9 @@ name: Lint
on: [pull_request]
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
@@ -15,8 +18,27 @@ jobs:
- name: Fetch Target Branch
run: git fetch origin $TARGET_BRANCH --depth=1
- name: Install Ruff
run: pip install ruff
- name: Restore global uv cache
id: cache-restore
uses: actions/cache/restore@v4
with:
path: |
~/.cache/uv
~/.local/share/uv
.venv
key: uv-main-py3.11-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-main-py3.11-
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.8.4"
python-version: "3.11"
enable-cache: false
- name: Install dependencies
run: uv sync --all-packages --all-extras --no-install-project
- name: Get Changed Python Files
id: changed-files
@@ -33,4 +55,14 @@ jobs:
echo "${{ steps.changed-files.outputs.files }}" \
| tr ' ' '\n' \
| grep -v 'src/crewai/cli/templates/' \
| xargs -I{} ruff check "{}"
| xargs -I{} uv run ruff check "{}"
- name: Save uv caches
if: steps.cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
~/.cache/uv
~/.local/share/uv
.venv
key: uv-main-py3.11-${{ hashFiles('uv.lock') }}

View File

@@ -1,23 +0,0 @@
name: Security Checker
on: [pull_request]
jobs:
security-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11.9"
- name: Install dependencies
run: pip install bandit
- name: Run Bandit
run: bandit -c pyproject.toml -r src/ -ll

View File

@@ -3,7 +3,7 @@ name: Run Tests
on: [pull_request]
permissions:
contents: write
contents: read
env:
OPENAI_API_KEY: fake-api-key
@@ -22,29 +22,77 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for proper diff
# - name: Restore global uv cache
# id: cache-restore
# uses: actions/cache/restore@v4
# with:
# path: |
# ~/.cache/uv
# ~/.local/share/uv
# .venv
# key: uv-main-py${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}
# restore-keys: |
# uv-main-py${{ matrix.python-version }}-
- name: Install uv
uses: astral-sh/setup-uv@v3
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
cache-dependency-glob: |
**/pyproject.toml
**/uv.lock
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
version: "0.8.4"
python-version: ${{ matrix.python-version }}
enable-cache: false
- name: Install the project
run: uv sync --dev --all-extras
run: uv sync --all-packages --all-extras
# - name: Restore test durations
# uses: actions/cache/restore@v4
# with:
# path: .test_durations_py*
# key: test-durations-py${{ matrix.python-version }}
- name: Run tests (group ${{ matrix.group }} of 8)
run: |
uv run pytest \
PYTHON_VERSION_SAFE=$(echo "${{ matrix.python-version }}" | tr '.' '_')
DURATION_FILE=".test_durations_py${PYTHON_VERSION_SAFE}"
# Temporarily always skip cached durations to fix test splitting
# When durations don't match, pytest-split runs duplicate tests instead of splitting
echo "Using even test splitting (duration cache disabled until fix merged)"
DURATIONS_ARG=""
# Original logic (disabled temporarily):
# if [ ! -f "$DURATION_FILE" ]; then
# echo "No cached durations found, tests will be split evenly"
# DURATIONS_ARG=""
# elif git diff origin/${{ github.base_ref }}...HEAD --name-only 2>/dev/null | grep -q "^tests/.*\.py$"; then
# echo "Test files have changed, skipping cached durations to avoid mismatches"
# DURATIONS_ARG=""
# else
# echo "No test changes detected, using cached test durations for optimal splitting"
# DURATIONS_ARG="--durations-path=${DURATION_FILE}"
# fi
uv run pytest lib/crewai \
--block-network \
--timeout=30 \
-vv \
--splits 8 \
--group ${{ matrix.group }} \
$DURATIONS_ARG \
--durations=10 \
-n auto \
--maxfail=3
--maxfail=3 \
-m "not requires_local_services"
# - name: Save uv caches
# if: steps.cache-restore.outputs.cache-hit != 'true'
# uses: actions/cache/save@v4
# with:
# path: |
# ~/.cache/uv
# ~/.local/share/uv
# .venv
# key: uv-main-py${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}

View File

@@ -3,24 +3,99 @@ name: Run Type Checks
on: [pull_request]
permissions:
contents: write
contents: read
jobs:
type-checker:
type-checker-matrix:
name: type-checker (${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11.9"
fetch-depth: 0 # Fetch all history for proper diff
- name: Install Requirements
- name: Restore global uv cache
id: cache-restore
uses: actions/cache/restore@v4
with:
path: |
~/.cache/uv
~/.local/share/uv
.venv
key: uv-main-py${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-main-py${{ matrix.python-version }}-
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.8.4"
python-version: ${{ matrix.python-version }}
enable-cache: false
- name: Install dependencies
run: uv sync --all-packages --all-extras
- name: Get changed Python files
id: changed-files
run: |
pip install mypy
# Get the list of changed Python files compared to the base branch
echo "Fetching changed files..."
git diff --name-only --diff-filter=ACMRT origin/${{ github.base_ref }}...HEAD -- '*.py' > changed_files.txt
- name: Run type checks
run: mypy src
# Filter for files in src/ directory only (excluding tests/)
grep -E "^src/" changed_files.txt > filtered_changed_files.txt || true
# Check if there are any changed files
if [ -s filtered_changed_files.txt ]; then
echo "Changed Python files in src/:"
cat filtered_changed_files.txt
echo "has_changes=true" >> $GITHUB_OUTPUT
# Convert newlines to spaces for mypy command
echo "files=$(cat filtered_changed_files.txt | tr '\n' ' ')" >> $GITHUB_OUTPUT
else
echo "No Python files changed in src/"
echo "has_changes=false" >> $GITHUB_OUTPUT
fi
- name: Run type checks on changed files
if: steps.changed-files.outputs.has_changes == 'true'
run: |
echo "Running mypy on changed files with Python ${{ matrix.python-version }}..."
uv run mypy ${{ steps.changed-files.outputs.files }}
- name: No files to check
if: steps.changed-files.outputs.has_changes == 'false'
run: echo "No Python files in src/ were modified - skipping type checks"
- name: Save uv caches
if: steps.cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
~/.cache/uv
~/.local/share/uv
.venv
key: uv-main-py${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}
# Summary job to provide single status for branch protection
type-checker:
name: type-checker
runs-on: ubuntu-latest
needs: type-checker-matrix
if: always()
steps:
- name: Check matrix results
run: |
if [ "${{ needs.type-checker-matrix.result }}" == "success" ] || [ "${{ needs.type-checker-matrix.result }}" == "skipped" ]; then
echo "✅ All type checks passed"
else
echo "❌ Type checks failed"
exit 1
fi

View File

@@ -0,0 +1,71 @@
name: Update Test Durations
on:
push:
branches:
- main
paths:
- 'tests/**/*.py'
workflow_dispatch:
permissions:
contents: read
jobs:
update-durations:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
env:
OPENAI_API_KEY: fake-api-key
PYTHONUNBUFFERED: 1
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Restore global uv cache
id: cache-restore
uses: actions/cache/restore@v4
with:
path: |
~/.cache/uv
~/.local/share/uv
.venv
key: uv-main-py${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-main-py${{ matrix.python-version }}-
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.8.4"
python-version: ${{ matrix.python-version }}
enable-cache: false
- name: Install the project
run: uv sync --all-groups --all-extras
- name: Run all tests and store durations
run: |
PYTHON_VERSION_SAFE=$(echo "${{ matrix.python-version }}" | tr '.' '_')
uv run pytest --store-durations --durations-path=.test_durations_py${PYTHON_VERSION_SAFE} -n auto
continue-on-error: true
- name: Save durations to cache
if: always()
uses: actions/cache/save@v4
with:
path: .test_durations_py*
key: test-durations-py${{ matrix.python-version }}
- name: Save uv caches
if: steps.cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
~/.cache/uv
~/.local/share/uv
.venv
key: uv-main-py${{ matrix.python-version }}-${{ hashFiles('uv.lock') }}

5
.gitignore vendored
View File

@@ -2,7 +2,6 @@
.pytest_cache
__pycache__
dist/
lib/
.env
assets/*
.idea
@@ -21,9 +20,9 @@ crew_tasks_output.json
.mypy_cache
.ruff_cache
.venv
agentops.log
test_flow.html
crewairules.mdc
plan.md
conceptual_plan.md
build_image
build_image
chromadb-*.lock

View File

@@ -1,7 +1,24 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.2
- repo: local
hooks:
- id: ruff
args: ["--fix"]
name: ruff
entry: uv run ruff check
language: system
types: [python]
files: ^lib/crewai/src/
exclude: ^lib/crewai/
- id: ruff-format
name: ruff-format
entry: uv run ruff format
language: system
types: [python]
files: ^lib/crewai/src/
exclude: ^lib/crewai/
- id: mypy
name: mypy
entry: uv run mypy
language: system
types: [python]
files: ^lib/crewai/src/
exclude: ^lib/crewai/

View File

@@ -1,4 +0,0 @@
exclude = [
"templates",
"__init__.py",
]

View File

@@ -418,10 +418,10 @@ Choose CrewAI to easily build powerful, adaptable, and production-ready AI autom
You can test different real life examples of AI crews in the [CrewAI-examples repo](https://github.com/crewAIInc/crewAI-examples?tab=readme-ov-file):
- [Landing Page Generator](https://github.com/crewAIInc/crewAI-examples/tree/main/landing_page_generator)
- [Landing Page Generator](https://github.com/crewAIInc/crewAI-examples/tree/main/crews/landing_page_generator)
- [Having Human input on the execution](https://docs.crewai.com/how-to/Human-Input-on-Execution)
- [Trip Planner](https://github.com/crewAIInc/crewAI-examples/tree/main/trip_planner)
- [Stock Analysis](https://github.com/crewAIInc/crewAI-examples/tree/main/stock_analysis)
- [Trip Planner](https://github.com/crewAIInc/crewAI-examples/tree/main/crews/trip_planner)
- [Stock Analysis](https://github.com/crewAIInc/crewAI-examples/tree/main/crews/stock_analysis)
### Quick Tutorial
@@ -429,19 +429,19 @@ You can test different real life examples of AI crews in the [CrewAI-examples re
### Write Job Descriptions
[Check out code for this example](https://github.com/crewAIInc/crewAI-examples/tree/main/job-posting) or watch a video below:
[Check out code for this example](https://github.com/crewAIInc/crewAI-examples/tree/main/crews/job-posting) or watch a video below:
[![Jobs postings](https://img.youtube.com/vi/u98wEMz-9to/maxresdefault.jpg)](https://www.youtube.com/watch?v=u98wEMz-9to "Jobs postings")
### Trip Planner
[Check out code for this example](https://github.com/crewAIInc/crewAI-examples/tree/main/trip_planner) or watch a video below:
[Check out code for this example](https://github.com/crewAIInc/crewAI-examples/tree/main/crews/trip_planner) or watch a video below:
[![Trip Planner](https://img.youtube.com/vi/xis7rWp-hjs/maxresdefault.jpg)](https://www.youtube.com/watch?v=xis7rWp-hjs "Trip Planner")
### Stock Analysis
[Check out code for this example](https://github.com/crewAIInc/crewAI-examples/tree/main/stock_analysis) or watch a video below:
[Check out code for this example](https://github.com/crewAIInc/crewAI-examples/tree/main/crews/stock_analysis) or watch a video below:
[![Stock Analysis](https://img.youtube.com/vi/e0Uj4yWdaAg/maxresdefault.jpg)](https://www.youtube.com/watch?v=e0Uj4yWdaAg "Stock Analysis")

BIN
assets/crew_only_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
assets/crewai_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,8 @@
---
title: "GET /inputs"
description: "Get required inputs for your crew"
openapi: "/enterprise-api.en.yaml GET /inputs"
mode: "wide"
---

View File

@@ -2,6 +2,7 @@
title: "Introduction"
description: "Complete reference for the CrewAI Enterprise REST API"
icon: "code"
mode: "wide"
---
# CrewAI Enterprise API

View File

@@ -0,0 +1,8 @@
---
title: "POST /kickoff"
description: "Start a crew execution"
openapi: "/enterprise-api.en.yaml POST /kickoff"
mode: "wide"
---

View File

@@ -0,0 +1,8 @@
---
title: "GET /status/{kickoff_id}"
description: "Get execution status"
openapi: "/enterprise-api.en.yaml GET /status/{kickoff_id}"
mode: "wide"
---

1839
docs/en/changelog.mdx Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -2,6 +2,7 @@
title: Agents
description: Detailed guide on creating and managing agents within the CrewAI framework.
icon: robot
mode: "wide"
---
## Overview of an Agent

View File

@@ -2,6 +2,7 @@
title: CLI
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>
@@ -88,7 +89,7 @@ crewai replay [OPTIONS]
- `-t, --task_id TEXT`: Replay the crew from this task ID, including all subsequent tasks
Example:
```shell Terminal
```shell Terminal
crewai replay -t task_123456
```
@@ -134,7 +135,7 @@ crewai test [OPTIONS]
- `-m, --model TEXT`: LLM Model to run the tests on the Crew (default: "gpt-4o-mini")
Example:
```shell Terminal
```shell Terminal
crewai test -n 5 -m gpt-3.5-turbo
```
@@ -151,7 +152,7 @@ Starting from version 0.103.0, the `crewai run` command can be used to run both
</Note>
<Note>
Make sure to run these commands from the directory where your CrewAI project is set up.
Make sure to run these commands from the directory where your CrewAI project is set up.
Some commands may require additional configuration or setup within your project structure.
</Note>
@@ -235,7 +236,7 @@ You must be authenticated to CrewAI Enterprise to use these organization managem
- **Deploy the Crew**: Once you are authenticated, you can deploy your crew or flow to CrewAI Enterprise.
```shell Terminal
crewai deploy push
```
```
- Initiates the deployment process on the CrewAI Enterprise platform.
- Upon successful initiation, it will output the Deployment created successfully! message along with the Deployment Name and a unique Deployment ID (UUID).
@@ -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.
@@ -309,3 +328,86 @@ When you select a provider, the CLI will prompt you to enter the Key name and th
See the following link for each provider's key name:
* [LiteLLM Providers](https://docs.litellm.ai/docs/providers)
### 13. Configuration Management
Manage CLI configuration settings for CrewAI.
```shell Terminal
crewai config [COMMAND] [OPTIONS]
```
#### Commands:
- `list`: Display all CLI configuration parameters
```shell Terminal
crewai config list
```
- `set`: Set a CLI configuration parameter
```shell Terminal
crewai config set <key> <value>
```
- `reset`: Reset all CLI configuration parameters to default values
```shell Terminal
crewai config reset
```
#### Available Configuration Parameters
- `enterprise_base_url`: Base URL of the CrewAI Enterprise instance
- `oauth2_provider`: OAuth2 provider used for authentication (e.g., workos, okta, auth0)
- `oauth2_audience`: OAuth2 audience value, typically used to identify the target API or resource
- `oauth2_client_id`: OAuth2 client ID issued by the provider, used during authentication requests
- `oauth2_domain`: OAuth2 provider's domain (e.g., your-org.auth0.com) used for issuing tokens
#### Examples
Display current configuration:
```shell Terminal
crewai config list
```
Example output:
| Setting | Value | Description |
| :------------------ | :----------------------- | :---------------------------------------------------------- |
| enterprise_base_url | https://app.crewai.com | Base URL of the CrewAI Enterprise instance |
| org_name | Not set | Name of the currently active organization |
| org_uuid | Not set | UUID of the currently active organization |
| oauth2_provider | workos | OAuth2 provider (e.g., workos, okta, auth0) |
| oauth2_audience | client_01YYY | Audience identifying the target API/resource |
| oauth2_client_id | client_01XXX | OAuth2 client ID issued by the provider |
| oauth2_domain | login.crewai.com | Provider domain (e.g., your-org.auth0.com) |
Set the enterprise base URL:
```shell Terminal
crewai config set enterprise_base_url https://my-enterprise.crewai.com
```
Set OAuth2 provider:
```shell Terminal
crewai config set oauth2_provider auth0
```
Set OAuth2 domain:
```shell Terminal
crewai config set oauth2_domain my-company.auth0.com
```
Reset all configuration to defaults:
```shell Terminal
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.
</Note>

View File

@@ -2,6 +2,7 @@
title: Collaboration
description: How to enable agents to work together, delegate tasks, and communicate effectively within CrewAI teams.
icon: screen-users
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Crews
description: Understanding and utilizing crews in the crewAI framework with comprehensive attributes and functionalities.
icon: people-group
mode: "wide"
---
## Overview
@@ -20,8 +21,7 @@ A crew in crewAI represents a collaborative group of agents working together to
| **Function Calling LLM** _(optional)_ | `function_calling_llm` | If passed, the crew will use this LLM to do function calling for tools for all agents in the crew. Each agent can have its own LLM, which overrides the crew's LLM for function calling. |
| **Config** _(optional)_ | `config` | Optional configuration settings for the crew, in `Json` or `Dict[str, Any]` format. |
| **Max RPM** _(optional)_ | `max_rpm` | Maximum requests per minute the crew adheres to during execution. Defaults to `None`. |
| **Memory** _(optional)_ | `memory` | Utilized for storing execution memories (short-term, long-term, entity memory). |
| **Memory Config** _(optional)_ | `memory_config` | Configuration for the memory provider to be used by the crew. |
| **Memory** _(optional)_ | `memory` | Utilized for storing execution memories (short-term, long-term, entity memory). | |
| **Cache** _(optional)_ | `cache` | Specifies whether to use a cache for storing the results of tools' execution. Defaults to `True`. |
| **Embedder** _(optional)_ | `embedder` | Configuration for the embedder to be used by the crew. Mostly used by memory for now. Default is `{"provider": "openai"}`. |
| **Step Callback** _(optional)_ | `step_callback` | A function that is called after each step of every agent. This can be used to log the agent's actions or to perform other operations; it won't override the agent-specific `step_callback`. |
@@ -32,6 +32,7 @@ A crew in crewAI represents a collaborative group of agents working together to
| **Prompt File** _(optional)_ | `prompt_file` | Path to the prompt JSON file to be used for the crew. |
| **Planning** *(optional)* | `planning` | Adds planning ability to the Crew. When activated before each Crew iteration, all Crew data is sent to an AgentPlanner that will plan the tasks and this plan will be added to each task description. |
| **Planning LLM** *(optional)* | `planning_llm` | The language model used by the AgentPlanner in a planning process. |
| **Knowledge Sources** _(optional)_ | `knowledge_sources` | Knowledge sources available at the crew level, accessible to all the agents. |
<Tip>
**Crew Max RPM**: The `max_rpm` attribute sets the maximum number of requests per minute the crew can perform to avoid rate limits and will override individual agents' `max_rpm` settings if you set it.

View File

@@ -2,6 +2,7 @@
title: 'Event Listeners'
description: 'Tap into CrewAI events to build custom integrations and monitoring'
icon: spinner
mode: "wide"
---
## Overview
@@ -44,12 +45,12 @@ To create a custom event listener, you need to:
Here's a simple example of a custom event listener class:
```python
from crewai.utilities.events import (
from crewai.events import (
CrewKickoffStartedEvent,
CrewKickoffCompletedEvent,
AgentExecutionCompletedEvent,
)
from crewai.utilities.events.base_event_listener import BaseEventListener
from crewai.events import BaseEventListener
class MyCustomListener(BaseEventListener):
def __init__(self):
@@ -146,7 +147,7 @@ my_project/
```python
# my_custom_listener.py
from crewai.utilities.events.base_event_listener import BaseEventListener
from crewai.events import BaseEventListener
# ... import events ...
class MyCustomListener(BaseEventListener):
@@ -177,14 +178,7 @@ class MyCustomCrew:
# Your crew implementation...
```
This is exactly how CrewAI's built-in `agentops_listener` is registered. In the CrewAI codebase, you'll find:
```python
# src/crewai/utilities/events/third_party/__init__.py
from .agentops_listener import agentops_listener
```
This ensures the `agentops_listener` is loaded when the `crewai.utilities.events` package is imported.
This is how third-party event listeners are registered in the CrewAI codebase.
## Available Event Types
@@ -280,84 +274,13 @@ The structure of the event object depends on the event type, but all events inhe
Additional fields vary by event type. For example, `CrewKickoffCompletedEvent` includes `crew_name` and `output` fields.
## Real-World Example: Integration with AgentOps
CrewAI includes an example of a third-party integration with [AgentOps](https://github.com/AgentOps-AI/agentops), a monitoring and observability platform for AI agents. Here's how it's implemented:
```python
from typing import Optional
from crewai.utilities.events import (
CrewKickoffCompletedEvent,
ToolUsageErrorEvent,
ToolUsageStartedEvent,
)
from crewai.utilities.events.base_event_listener import BaseEventListener
from crewai.utilities.events.crew_events import CrewKickoffStartedEvent
from crewai.utilities.events.task_events import TaskEvaluationEvent
try:
import agentops
AGENTOPS_INSTALLED = True
except ImportError:
AGENTOPS_INSTALLED = False
class AgentOpsListener(BaseEventListener):
tool_event: Optional["agentops.ToolEvent"] = None
session: Optional["agentops.Session"] = None
def __init__(self):
super().__init__()
def setup_listeners(self, crewai_event_bus):
if not AGENTOPS_INSTALLED:
return
@crewai_event_bus.on(CrewKickoffStartedEvent)
def on_crew_kickoff_started(source, event: CrewKickoffStartedEvent):
self.session = agentops.init()
for agent in source.agents:
if self.session:
self.session.create_agent(
name=agent.role,
agent_id=str(agent.id),
)
@crewai_event_bus.on(CrewKickoffCompletedEvent)
def on_crew_kickoff_completed(source, event: CrewKickoffCompletedEvent):
if self.session:
self.session.end_session(
end_state="Success",
end_state_reason="Finished Execution",
)
@crewai_event_bus.on(ToolUsageStartedEvent)
def on_tool_usage_started(source, event: ToolUsageStartedEvent):
self.tool_event = agentops.ToolEvent(name=event.tool_name)
if self.session:
self.session.record(self.tool_event)
@crewai_event_bus.on(ToolUsageErrorEvent)
def on_tool_usage_error(source, event: ToolUsageErrorEvent):
agentops.ErrorEvent(exception=event.error, trigger_event=self.tool_event)
```
This listener initializes an AgentOps session when a Crew starts, registers agents with AgentOps, tracks tool usage, and ends the session when the Crew completes.
The AgentOps listener is registered in CrewAI's event system through the import in `src/crewai/utilities/events/third_party/__init__.py`:
```python
from .agentops_listener import agentops_listener
```
This ensures the `agentops_listener` is loaded when the `crewai.utilities.events` package is imported.
## Advanced Usage: Scoped Handlers
For temporary event handling (useful for testing or specific operations), you can use the `scoped_handlers` context manager:
```python
from crewai.utilities.events import crewai_event_bus, CrewKickoffStartedEvent
from crewai.events import crewai_event_bus, CrewKickoffStartedEvent
with crewai_event_bus.scoped_handlers():
@crewai_event_bus.on(CrewKickoffStartedEvent)

View File

@@ -2,6 +2,7 @@
title: Flows
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:
- Declare multiple unconditional starts: `@start()`
- Gate a start on a prior method or router label: `@start("method_or_label")`
- Provide a callable condition to control when a start should fire
All satisfied `@start()` methods will execute (often in parallel) when the Flow begins or resumes.
### @listen()

View File

@@ -2,6 +2,7 @@
title: Knowledge
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."}],
)
results = client.search(collection_name="docs", query="collaborative agents", limit=3)
clear_rag_config() # optional reset
```
This RAG client is separate from Knowledges built-in storage. Use it when you need direct vector-store control or custom retrieval pipelines.
### Basic String Knowledge Example
```python Code
@@ -681,11 +717,11 @@ CrewAI emits events during the knowledge retrieval process that you can listen f
#### Example: Monitoring Knowledge Retrieval
```python
from crewai.utilities.events import (
from crewai.events import (
KnowledgeRetrievalStartedEvent,
KnowledgeRetrievalCompletedEvent,
BaseEventListener,
)
from crewai.utilities.events.base_event_listener import BaseEventListener
class KnowledgeMonitorListener(BaseEventListener):
def setup_listeners(self, crewai_event_bus):

View File

@@ -2,6 +2,7 @@
title: 'LLMs'
description: 'A comprehensive guide to configuring and using Large Language Models (LLMs) in your CrewAI projects'
icon: 'microchip-ai'
mode: "wide"
---
## Overview
@@ -270,7 +271,7 @@ In this section, you'll find detailed examples that help you select, configure,
from crewai import LLM
llm = LLM(
model="gemini/gemini-1.5-pro-latest",
model="gemini-1.5-pro-latest", # or vertex_ai/gemini-1.5-pro-latest
temperature=0.7,
vertex_credentials=vertex_credentials_json
)
@@ -733,10 +734,10 @@ CrewAI supports streaming responses from LLMs, allowing your application to rece
CrewAI emits events for each chunk received during streaming:
```python
from crewai.utilities.events import (
from crewai.events import (
LLMStreamChunkEvent
)
from crewai.utilities.events.base_event_listener import BaseEventListener
from crewai.events import BaseEventListener
class MyCustomListener(BaseEventListener):
def setup_listeners(self, crewai_event_bus):
@@ -758,8 +759,8 @@ CrewAI supports streaming responses from LLMs, allowing your application to rece
```python
from crewai import LLM, Agent, Task, Crew
from crewai.utilities.events import LLMStreamChunkEvent
from crewai.utilities.events.base_event_listener import BaseEventListener
from crewai.events import LLMStreamChunkEvent
from crewai.events import BaseEventListener
class MyCustomListener(BaseEventListener):
def setup_listeners(self, crewai_event_bus):

View File

@@ -2,15 +2,15 @@
title: Memory
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:
1. **Basic Memory System** - Built-in short-term, long-term, and entity memory
2. **User Memory** - User-specific memory with Mem0 integration (legacy approach)
3. **External Memory** - Standalone external memory providers (new approach)
2. **External Memory** - Standalone external memory providers
## Memory System Components
@@ -19,7 +19,7 @@ The CrewAI framework provides a sophisticated memory system designed to signific
| **Short-Term Memory**| Temporarily stores recent interactions and outcomes using `RAG`, enabling agents to recall and utilize information relevant to their current context during the current executions.|
| **Long-Term Memory** | Preserves valuable insights and learnings from past executions, allowing agents to build and refine their knowledge over time. |
| **Entity Memory** | Captures and organizes information about entities (people, places, concepts) encountered during tasks, facilitating deeper understanding and relationship mapping. Uses `RAG` for storing entity information. |
| **Contextual Memory**| Maintains the context of interactions by combining `ShortTermMemory`, `LongTermMemory`, and `EntityMemory`, aiding in the coherence and relevance of agent responses over a sequence of tasks or a conversation. |
| **Contextual Memory**| Maintains the context of interactions by combining `ShortTermMemory`, `LongTermMemory`, `ExternalMemory` and `EntityMemory`, aiding in the coherence and relevance of agent responses over a sequence of tasks or a conversation. |
## 1. Basic Memory System (Recommended)
@@ -202,7 +202,7 @@ crew = Crew(
tasks=[task],
memory=True,
embedder={
"provider": "anthropic", # Match your LLM provider
"provider": "anthropic", # Match your LLM provider
"config": {
"api_key": "your-anthropic-key",
"model": "text-embedding-3-small"
@@ -540,16 +540,71 @@ crew = Crew(
)
```
### Mem0 Provider
Short-Term Memory and Entity Memory both supports a tight integration with both Mem0 OSS and Mem0 Client as a provider. Here is how you can use Mem0 as a provider.
```python
from crewai.memory.short_term.short_term_memory import ShortTermMemory
from crewai.memory.entity_entity_memory import EntityMemory
mem0_oss_embedder_config = {
"provider": "mem0",
"config": {
"user_id": "john",
"local_mem0_config": {
"vector_store": {"provider": "qdrant","config": {"host": "localhost", "port": 6333}},
"llm": {"provider": "openai","config": {"api_key": "your-api-key", "model": "gpt-4"}},
"embedder": {"provider": "openai","config": {"api_key": "your-api-key", "model": "text-embedding-3-small"}}
},
"infer": True # Optional defaults to True
},
}
mem0_client_embedder_config = {
"provider": "mem0",
"config": {
"user_id": "john",
"org_id": "my_org_id", # Optional
"project_id": "my_project_id", # Optional
"api_key": "custom-api-key" # Optional - overrides env var
"run_id": "my_run_id", # Optional - for short-term memory
"includes": "include1", # Optional
"excludes": "exclude1", # Optional
"infer": True # Optional defaults to True
"custom_categories": new_categories # Optional - custom categories for user memory
},
}
short_term_memory_mem0_oss = ShortTermMemory(embedder_config=mem0_oss_embedder_config) # Short Term Memory with Mem0 OSS
short_term_memory_mem0_client = ShortTermMemory(embedder_config=mem0_client_embedder_config) # Short Term Memory with Mem0 Client
entity_memory_mem0_oss = EntityMemory(embedder_config=mem0_oss_embedder_config) # Entity Memory with Mem0 OSS
entity_memory_mem0_client = EntityMemory(embedder_config=mem0_client_embedder_config) # Short Term Memory with Mem0 Client
crew = Crew(
memory=True,
short_term_memory=short_term_memory_mem0_oss, # or short_term_memory_mem0_client
entity_memory=entity_memory_mem0_oss # or entity_memory_mem0_client
)
```
### Choosing the Right Embedding Provider
| Provider | Best For | Pros | Cons |
|:---------|:----------|:------|:------|
| **OpenAI** | General use, reliability | High quality, well-tested | Cost, requires API key |
| **Ollama** | Privacy, cost savings | Free, local, private | Requires local setup |
| **Google AI** | Google ecosystem | Good performance | Requires Google account |
| **Azure OpenAI** | Enterprise, compliance | Enterprise features | Complex setup |
| **Cohere** | Multilingual content | Great language support | Specialized use case |
| **VoyageAI** | Retrieval tasks | Optimized for search | Newer provider |
When selecting an embedding provider, consider factors like performance, privacy, cost, and integration needs.
Below is a comparison to help you decide:
| Provider | Best For | Pros | Cons |
| -------------- | ------------------------------ | --------------------------------- | ------------------------- |
| **OpenAI** | General use, high reliability | High quality, widely tested | Paid service, API key required |
| **Ollama** | Privacy-focused, cost savings | Free, runs locally, fully private | Requires local installation/setup |
| **Google AI** | Integration in Google ecosystem| Strong performance, good support | Google account required |
| **Azure OpenAI** | Enterprise & compliance needs| Enterprise-grade features, security | More complex setup process |
| **Cohere** | Multilingual content handling | Excellent language support | More niche use cases |
| **VoyageAI** | Information retrieval & search | Optimized for retrieval tasks | Relatively new provider |
| **Mem0** | Per-user personalization | Search-optimized embeddings | Paid service, API key required |
### Environment Variable Configuration
@@ -623,7 +678,7 @@ for provider in providers_to_test:
**Model not found errors:**
```python
# Verify model availability
from crewai.utilities.embedding_configurator import EmbeddingConfigurator
from crewai.rag.embeddings.configurator import EmbeddingConfigurator
configurator = EmbeddingConfigurator()
try:
@@ -684,67 +739,29 @@ print(f"OpenAI: {openai_time:.2f}s")
print(f"Ollama: {ollama_time:.2f}s")
```
## 2. User Memory with Mem0 (Legacy)
### Entity Memory batching behavior
<Warning>
**Legacy Approach**: While fully functional, this approach is considered legacy. For new projects requiring user-specific memory, consider using External Memory instead.
</Warning>
Entity Memory supports batching when saving multiple entities at once. When you pass a list of `EntityMemoryItem`, the system:
User Memory integrates with [Mem0](https://mem0.ai/) to provide user-specific memory that persists across sessions and integrates with the crew's contextual memory 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)
### Prerequisites
```bash
pip install mem0ai
```
This improves performance and observability when writing many entities in one operation.
### Mem0 Cloud Configuration
## 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.
### Basic External Memory with Mem0
```python
import os
from crewai import Crew, Process
from crewai import Agent, Crew, Process, Task
from crewai.memory.external.external_memory import ExternalMemory
# Set your Mem0 API key
os.environ["MEM0_API_KEY"] = "m0-your-api-key"
crew = Crew(
agents=[...],
tasks=[...],
memory=True, # Required for contextual memory integration
memory_config={
"provider": "mem0",
"config": {"user_id": "john"},
"user_memory": {} # Required - triggers user memory initialization
},
process=Process.sequential,
verbose=True
)
```
### Advanced Mem0 Configuration
```python
crew = Crew(
agents=[...],
tasks=[...],
memory=True,
memory_config={
"provider": "mem0",
"config": {
"user_id": "john",
"org_id": "my_org_id", # Optional
"project_id": "my_project_id", # Optional
"api_key": "custom-api-key" # Optional - overrides env var
},
"user_memory": {}
}
)
```
### Local Mem0 Configuration
```python
crew = Crew(
agents=[...],
tasks=[...],
memory=True,
memory_config={
# Create external memory instance with local Mem0 Configuration
external_memory = ExternalMemory(
embedder_config={
"provider": "mem0",
"config": {
"user_id": "john",
@@ -761,37 +778,60 @@ crew = Crew(
"provider": "openai",
"config": {"api_key": "your-api-key", "model": "text-embedding-3-small"}
}
}
},
"infer": True # Optional defaults to True
},
"user_memory": {}
}
)
```
## 3. External Memory (New Approach)
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.
### Basic External Memory with Mem0
```python
import os
from crewai import Agent, Crew, Process, Task
from crewai.memory.external.external_memory import ExternalMemory
os.environ["MEM0_API_KEY"] = "your-api-key"
# Create external memory instance
external_memory = ExternalMemory(
embedder_config={
"provider": "mem0",
"config": {"user_id": "U-123"}
}
)
crew = Crew(
agents=[...],
tasks=[...],
external_memory=external_memory, # Separate from basic memory
external_memory=external_memory, # Separate from basic memory
process=Process.sequential,
verbose=True
)
```
### Advanced External Memory with Mem0 Client
When using Mem0 Client, you can customize the memory configuration further, by using parameters like 'includes', 'excludes', 'custom_categories', 'infer' and 'run_id' (this is only for short-term memory).
You can find more details in the [Mem0 documentation](https://docs.mem0.ai/).
```python
import os
from crewai import Agent, Crew, Process, Task
from crewai.memory.external.external_memory import ExternalMemory
new_categories = [
{"lifestyle_management_concerns": "Tracks daily routines, habits, hobbies and interests including cooking, time management and work-life balance"},
{"seeking_structure": "Documents goals around creating routines, schedules, and organized systems in various life areas"},
{"personal_information": "Basic information about the user including name, preferences, and personality traits"}
]
os.environ["MEM0_API_KEY"] = "your-api-key"
# Create external memory instance with Mem0 Client
external_memory = ExternalMemory(
embedder_config={
"provider": "mem0",
"config": {
"user_id": "john",
"org_id": "my_org_id", # Optional
"project_id": "my_project_id", # Optional
"api_key": "custom-api-key" # Optional - overrides env var
"run_id": "my_run_id", # Optional - for short-term memory
"includes": "include1", # Optional
"excludes": "exclude1", # Optional
"infer": True # Optional defaults to True
"custom_categories": new_categories # Optional - custom categories for user memory
},
}
)
crew = Crew(
agents=[...],
tasks=[...],
external_memory=external_memory, # Separate from basic memory
process=Process.sequential,
verbose=True
)
@@ -830,17 +870,18 @@ crew = Crew(
)
```
## Memory System Comparison
## 🧠 Memory System Comparison
| **Category** | **Feature** | **Basic Memory** | **External Memory** |
|---------------------|------------------------|-----------------------------|------------------------------|
| **Ease of Use** | Setup Complexity | Simple | Moderate |
| | Integration | Built-in (contextual) | Standalone |
| **Persistence** | Storage | Local files | Custom / Mem0 |
| | Cross-session Support | ✅ | ✅ |
| **Personalization** | User-specific Memory | ❌ | ✅ |
| | Custom Providers | Limited | Any provider |
| **Use Case Fit** | Recommended For | Most general use cases | Specialized / custom needs |
| Feature | Basic Memory | User Memory (Legacy) | External Memory |
|---------|-------------|---------------------|----------------|
| **Setup Complexity** | Simple | Medium | Medium |
| **Integration** | Built-in contextual | Contextual + User-specific | Standalone |
| **Storage** | Local files | Mem0 Cloud/Local | Custom/Mem0 |
| **Cross-session** | ✅ | ✅ | ✅ |
| **User-specific** | ❌ | ✅ | ✅ |
| **Custom providers** | Limited | Mem0 only | Any provider |
| **Recommended for** | Most use cases | Legacy projects | Specialized needs |
## Supported Embedding Providers
@@ -1012,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
from crewai.utilities.events import (
from crewai.events import (
BaseEventListener,
MemoryQueryCompletedEvent,
MemorySaveCompletedEvent
)
@@ -1047,8 +1088,8 @@ memory_monitor = MemoryPerformanceMonitor()
Log memory operations for debugging and insights:
```python
from crewai.utilities.events.base_event_listener import BaseEventListener
from crewai.utilities.events import (
from crewai.events import (
BaseEventListener,
MemorySaveStartedEvent,
MemoryQueryStartedEvent,
MemoryRetrievalCompletedEvent
@@ -1088,8 +1129,8 @@ memory_logger = MemoryLogger()
Capture and respond to memory errors:
```python
from crewai.utilities.events.base_event_listener import BaseEventListener
from crewai.utilities.events import (
from crewai.events import (
BaseEventListener,
MemorySaveFailedEvent,
MemoryQueryFailedEvent
)
@@ -1138,8 +1179,8 @@ error_tracker = MemoryErrorTracker(notify_email="admin@example.com")
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
from crewai.utilities.events import (
from crewai.events import (
BaseEventListener,
MemoryQueryCompletedEvent,
MemorySaveCompletedEvent
)

View File

@@ -2,6 +2,7 @@
title: Planning
description: Learn how to add planning to your CrewAI Crew and improve their performance.
icon: ruler-combined
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Processes
description: Detailed guide on workflow management through processes in CrewAI, with updated implementation details.
icon: bars-staggered
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Reasoning
description: "Learn how to enable and use agent reasoning to improve task execution."
icon: brain
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Tasks
description: Detailed guide on managing and creating tasks within the CrewAI framework.
icon: list-check
mode: "wide"
---
## Overview
@@ -54,9 +55,17 @@ crew = Crew(
| **Markdown** _(optional)_ | `markdown` | `Optional[bool]` | Whether the task should instruct the agent to return the final answer formatted in Markdown. Defaults to False. |
| **Config** _(optional)_ | `config` | `Optional[Dict[str, Any]]` | Task-specific configuration parameters. |
| **Output File** _(optional)_ | `output_file` | `Optional[str]` | File path for storing the task output. |
| **Create Directory** _(optional)_ | `create_directory` | `Optional[bool]` | Whether to create the directory for output_file if it doesn't exist. Defaults to True. |
| **Output JSON** _(optional)_ | `output_json` | `Optional[Type[BaseModel]]` | A Pydantic model to structure the JSON output. |
| **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. |
<Note type="warning" title="Deprecated: max_retries">
The task attribute `max_retries` is deprecated and will be removed in v1.0.0.
Use `guardrail_max_retries` instead to control retry attempts when a guardrail fails.
</Note>
## Creating Tasks
@@ -332,9 +341,11 @@ Task guardrails provide a way to validate and transform task outputs before they
are passed to the next task. This feature helps ensure data quality and provides
feedback to agents when their output doesn't meet specific criteria.
### Using Task Guardrails
Guardrails are implemented as Python functions that contain custom validation logic, giving you complete control over the validation process and ensuring reliable, deterministic results.
To add a guardrail to a task, provide a validation function through the `guardrail` parameter:
### Function-Based Guardrails
To add a function-based guardrail to a task, provide a validation function through the `guardrail` parameter:
```python Code
from typing import Tuple, Union, Dict, Any
@@ -372,9 +383,7 @@ blog_task = Task(
- On success: it returns a tuple of `(bool, Any)`. For example: `(True, validated_result)`
- On Failure: it returns a tuple of `(bool, str)`. For example: `(False, "Error message explain the failure")`
### LLMGuardrail
The `LLMGuardrail` class offers a robust mechanism for validating task outputs.
### Error Handling Best Practices
@@ -429,7 +438,7 @@ When a guardrail returns `(False, error)`:
2. The agent attempts to fix the issue
3. The process repeats until:
- The guardrail returns `(True, result)`
- Maximum retries are reached
- Maximum retries are reached (`guardrail_max_retries`)
Example with retry handling:
```python Code
@@ -450,7 +459,7 @@ task = Task(
expected_output="A valid JSON object",
agent=analyst,
guardrail=validate_json_output,
max_retries=3 # Limit retry attempts
guardrail_max_retries=3 # Limit retry attempts
)
```
@@ -798,184 +807,91 @@ While creating and executing tasks, certain validation mechanisms are in place t
These validations help in maintaining the consistency and reliability of task executions within the crewAI framework.
## Task Guardrails
Task guardrails provide a powerful way to validate, transform, or filter task outputs before they are passed to the next task. Guardrails are optional functions that execute before the next task starts, allowing you to ensure that task outputs meet specific requirements or formats.
### Basic Usage
#### Define your own logic to validate
```python Code
from typing import Tuple, Union
from crewai import Task
def validate_json_output(result: str) -> Tuple[bool, Union[dict, str]]:
"""Validate that the output is valid JSON."""
try:
json_data = json.loads(result)
return (True, json_data)
except json.JSONDecodeError:
return (False, "Output must be valid JSON")
task = Task(
description="Generate JSON data",
expected_output="Valid JSON object",
guardrail=validate_json_output
)
```
#### Leverage a no-code approach for validation
```python Code
from crewai import Task
task = Task(
description="Generate JSON data",
expected_output="Valid JSON object",
guardrail="Ensure the response is a valid JSON object"
)
```
#### Using YAML
```yaml
research_task:
...
guardrail: make sure each bullet contains a minimum of 100 words
...
```
```python Code
@CrewBase
class InternalCrew:
agents_config = "config/agents.yaml"
tasks_config = "config/tasks.yaml"
...
@task
def research_task(self):
return Task(config=self.tasks_config["research_task"]) # type: ignore[index]
...
```
#### Use custom models for code generation
```python Code
from crewai import Task
from crewai.llm import LLM
task = Task(
description="Generate JSON data",
expected_output="Valid JSON object",
guardrail=LLMGuardrail(
description="Ensure the response is a valid JSON object",
llm=LLM(model="gpt-4o-mini"),
)
)
```
### How Guardrails Work
1. **Optional Attribute**: Guardrails are an optional attribute at the task level, allowing you to add validation only where needed.
2. **Execution Timing**: The guardrail function is executed before the next task starts, ensuring valid data flow between tasks.
3. **Return Format**: Guardrails must return a tuple of `(success, data)`:
- If `success` is `True`, `data` is the validated/transformed result
- If `success` is `False`, `data` is the error message
4. **Result Routing**:
- On success (`True`), the result is automatically passed to the next task
- On failure (`False`), the error is sent back to the agent to generate a new answer
### Common Use Cases
#### Data Format Validation
```python Code
def validate_email_format(result: str) -> Tuple[bool, Union[str, str]]:
"""Ensure the output contains a valid email address."""
import re
email_pattern = r'^[\w\.-]+@[\w\.-]+\.\w+$'
if re.match(email_pattern, result.strip()):
return (True, result.strip())
return (False, "Output must be a valid email address")
```
#### Content Filtering
```python Code
def filter_sensitive_info(result: str) -> Tuple[bool, Union[str, str]]:
"""Remove or validate sensitive information."""
sensitive_patterns = ['SSN:', 'password:', 'secret:']
for pattern in sensitive_patterns:
if pattern.lower() in result.lower():
return (False, f"Output contains sensitive information ({pattern})")
return (True, result)
```
#### Data Transformation
```python Code
def normalize_phone_number(result: str) -> Tuple[bool, Union[str, str]]:
"""Ensure phone numbers are in a consistent format."""
import re
digits = re.sub(r'\D', '', result)
if len(digits) == 10:
formatted = f"({digits[:3]}) {digits[3:6]}-{digits[6:]}"
return (True, formatted)
return (False, "Output must be a 10-digit phone number")
```
### Advanced Features
#### Chaining Multiple Validations
```python Code
def chain_validations(*validators):
"""Chain multiple validators together."""
def combined_validator(result):
for validator in validators:
success, data = validator(result)
if not success:
return (False, data)
result = data
return (True, result)
return combined_validator
# Usage
task = Task(
description="Get user contact info",
expected_output="Email and phone",
guardrail=chain_validations(
validate_email_format,
filter_sensitive_info
)
)
```
#### Custom Retry Logic
```python Code
task = Task(
description="Generate data",
expected_output="Valid data",
guardrail=validate_data,
max_retries=5 # Override default retry limit
)
```
## Creating Directories when Saving Files
You can now specify if a task should create directories when saving its output to a file. This is particularly useful for organizing outputs and ensuring that file paths are correctly structured.
The `create_directory` parameter controls whether CrewAI should automatically create directories when saving task outputs to files. This feature is particularly useful for organizing outputs and ensuring that file paths are correctly structured, especially when working with complex project hierarchies.
### Default Behavior
By default, `create_directory=True`, which means CrewAI will automatically create any missing directories in the output file path:
```python Code
# ...
save_output_task = Task(
description='Save the summarized AI news to a file',
expected_output='File saved successfully',
agent=research_agent,
tools=[file_save_tool],
output_file='outputs/ai_news_summary.txt',
create_directory=True
# Default behavior - directories are created automatically
report_task = Task(
description='Generate a comprehensive market analysis report',
expected_output='A detailed market analysis with charts and insights',
agent=analyst_agent,
output_file='reports/2025/market_analysis.md', # Creates 'reports/2025/' if it doesn't exist
markdown=True
)
```
#...
### Disabling Directory Creation
If you want to prevent automatic directory creation and ensure that the directory already exists, set `create_directory=False`:
```python Code
# Strict mode - directory must already exist
strict_output_task = Task(
description='Save critical data that requires existing infrastructure',
expected_output='Data saved to pre-configured location',
agent=data_agent,
output_file='secure/vault/critical_data.json',
create_directory=False # Will raise RuntimeError if 'secure/vault/' doesn't exist
)
```
### YAML Configuration
You can also configure this behavior in your YAML task definitions:
```yaml tasks.yaml
analysis_task:
description: >
Generate quarterly financial analysis
expected_output: >
A comprehensive financial report with quarterly insights
agent: financial_analyst
output_file: reports/quarterly/q4_2024_analysis.pdf
create_directory: true # Automatically create 'reports/quarterly/' directory
audit_task:
description: >
Perform compliance audit and save to existing audit directory
expected_output: >
A compliance audit report
agent: auditor
output_file: audit/compliance_report.md
create_directory: false # Directory must already exist
```
### Use Cases
**Automatic Directory Creation (`create_directory=True`):**
- Development and prototyping environments
- Dynamic report generation with date-based folders
- Automated workflows where directory structure may vary
- Multi-tenant applications with user-specific folders
**Manual Directory Management (`create_directory=False`):**
- Production environments with strict file system controls
- Security-sensitive applications where directories must be pre-configured
- Systems with specific permission requirements
- Compliance environments where directory creation is audited
### Error Handling
When `create_directory=False` and the directory doesn't exist, CrewAI will raise a `RuntimeError`:
```python Code
try:
result = crew.kickoff()
except RuntimeError as e:
# Handle missing directory error
print(f"Directory creation failed: {e}")
# Create directory manually or use fallback location
```
Check out the video below to see how to use structured outputs in CrewAI:

View File

@@ -2,6 +2,7 @@
title: Testing
description: Learn how to test your CrewAI Crew and evaluate their performance.
icon: vial
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Tools
description: Understanding and leveraging tools within the CrewAI framework for agent collaboration and task execution.
icon: screwdriver-wrench
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Training
description: Learn how to train your CrewAI agents by giving them feedback early on and get consistent results.
icon: dumbbell
mode: "wide"
---
## Overview
@@ -21,13 +22,17 @@ To use the training feature, follow these steps:
3. Run the following command:
```shell
crewai train -n <n_iterations> <filename> (optional)
crewai train -n <n_iterations> -f <filename.pkl>
```
<Tip>
Replace `<n_iterations>` with the desired number of training iterations and `<filename>` with the appropriate filename ending with `.pkl`.
</Tip>
### Training Your Crew Programmatically
<Note>
If you omit `-f`, the output defaults to `trained_agents_data.pkl` in the current working directory. You can pass an absolute path to control where the file is written.
</Note>
### Training your Crew programmatically
To train your crew programmatically, use the following steps:
@@ -51,19 +56,65 @@ except Exception as e:
raise Exception(f"An error occurred while training the crew: {e}")
```
### Key Points to Note
## How trained data is used by agents
- **Positive Integer Requirement:** Ensure that the number of iterations (`n_iterations`) is a positive integer. The code will raise a `ValueError` if this condition is not met.
- **Filename Requirement:** Ensure that the filename ends with `.pkl`. The code will raise a `ValueError` if this condition is not met.
- **Error Handling:** The code handles subprocess errors and unexpected exceptions, providing error messages to the user.
CrewAI uses the training artifacts in two ways: during training to incorporate your human feedback, and after training to guide agents with consolidated suggestions.
It is important to note that the training process may take some time, depending on the complexity of your agents and will also require your feedback on each iteration.
### Training data flow
Once the training is complete, your agents will be equipped with enhanced capabilities and knowledge, ready to tackle complex tasks and provide more consistent and valuable insights.
```mermaid
flowchart TD
A["Start training<br/>CLI: crewai train -n -f<br/>or Python: crew.train(...)"] --> B["Setup training mode<br/>- task.human_input = true<br/>- disable delegation<br/>- init training_data.pkl + trained file"]
Remember to regularly update and retrain your agents to ensure they stay up-to-date with the latest information and advancements in the field.
subgraph "Iterations"
direction LR
C["Iteration i<br/>initial_output"] --> D["User human_feedback"]
D --> E["improved_output"]
E --> F["Append to training_data.pkl<br/>by agent_id and iteration"]
end
Happy training with CrewAI! 🚀
B --> C
F --> G{"More iterations?"}
G -- "Yes" --> C
G -- "No" --> H["Evaluate per agent<br/>aggregate iterations"]
H --> I["Consolidate<br/>suggestions[] + quality + final_summary"]
I --> J["Save by agent role to trained file<br/>(default: trained_agents_data.pkl)"]
J --> K["Normal (non-training) runs"]
K --> L["Auto-load suggestions<br/>from trained_agents_data.pkl"]
L --> M["Append to prompt<br/>for consistent improvements"]
```
### During training runs
- On each iteration, the system records for every agent:
- `initial_output`: the agents first answer
- `human_feedback`: your inline feedback when prompted
- `improved_output`: the agents follow-up answer after feedback
- This data is stored in a working file named `training_data.pkl` keyed by the agents internal ID and iteration.
- While training is active, the agent automatically appends your prior human feedback to its prompt to enforce those instructions on subsequent attempts within the training session.
Training is interactive: tasks set `human_input = true`, so running in a non-interactive environment will block on user input.
### After training completes
- When `train(...)` finishes, CrewAI evaluates the collected training data per agent and produces a consolidated result containing:
- `suggestions`: clear, actionable instructions distilled from your feedback and the difference between initial/improved outputs
- `quality`: a 010 score capturing improvement
- `final_summary`: a step-by-step set of action items for future tasks
- These consolidated results are saved to the filename you pass to `train(...)` (default via CLI is `trained_agents_data.pkl`). Entries are keyed by the agents `role` so they can be applied across sessions.
- During normal (non-training) execution, each agent automatically loads its consolidated `suggestions` and appends them to the task prompt as mandatory instructions. This gives you consistent improvements without changing your agent definitions.
### File summary
- `training_data.pkl` (ephemeral, per-session):
- Structure: `agent_id -> { iteration_number: { initial_output, human_feedback, improved_output } }`
- Purpose: capture raw data and human feedback during training
- Location: saved in the current working directory (CWD)
- `trained_agents_data.pkl` (or your custom filename):
- Structure: `agent_role -> { suggestions: string[], quality: number, final_summary: string }`
- Purpose: persist consolidated guidance for future runs
- Location: written to the CWD by default; use `-f` to set a custom (including absolute) path
## Small Language Model Considerations
@@ -129,3 +180,18 @@ Happy training with CrewAI! 🚀
</Warning>
</Tab>
</Tabs>
### Key Points to Note
- **Positive Integer Requirement:** Ensure that the number of iterations (`n_iterations`) is a positive integer. The code will raise a `ValueError` if this condition is not met.
- **Filename Requirement:** Ensure that the filename ends with `.pkl`. The code will raise a `ValueError` if this condition is not met.
- **Error Handling:** The code handles subprocess errors and unexpected exceptions, providing error messages to the user.
- Trained guidance is applied at prompt time; it does not modify your Python/YAML agent configuration.
- Agents automatically load trained suggestions from a file named `trained_agents_data.pkl` located in the current working directory. If you trained to a different filename, either rename it to `trained_agents_data.pkl` before running, or adjust the loader in code.
- You can change the output filename when calling `crewai train` with `-f/--filename`. Absolute paths are supported if you want to save outside the CWD.
It is important to note that the training process may take some time, depending on the complexity of your agents and will also require your feedback on each iteration.
Once the training is complete, your agents will be equipped with enhanced capabilities and knowledge, ready to tackle complex tasks and provide more consistent and valuable insights.
Remember to regularly update and retrain your agents to ensure they stay up-to-date with the latest information and advancements in the field.

View File

@@ -2,6 +2,7 @@
title: 'Agent Repositories'
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.

View File

@@ -2,6 +2,7 @@
title: Hallucination Guardrail
description: "Prevent and detect AI hallucinations in your CrewAI tasks"
icon: "shield-check"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Integrations
description: "Connected applications for your agents to take actions."
icon: "plug"
mode: "wide"
---
## Overview
@@ -59,7 +60,7 @@ Before using Authentication Integrations, ensure you have:
3. Click **Connect** on your desired service from the Authentication Integrations section
4. Complete the OAuth authentication flow
5. Grant necessary permissions for your use case
6. Get your Enterprise Token from your [CrewAI Enterprise](https://app.crewai.com) account page - https://app.crewai.com/crewai_plus/settings/account
6. All set! Get your Enterprise Token from your [CrewAI Enterprise](https://app.crewai.com) in **Integration** tab
<Frame>
![Integrations](/images/enterprise/enterprise_action_auth_token.png)

View File

@@ -0,0 +1,104 @@
---
title: "Role-Based Access Control (RBAC)"
description: "Control access to crews, tools, and data with roles, scopes, and granular permissions."
icon: "shield"
mode: "wide"
---
## Overview
RBAC in CrewAI Enterprise enables secure, scalable access management through a combination of organizationlevel roles and automationlevel visibility controls.
<Frame>
<img src="/images/enterprise/users_and_roles.png" alt="RBAC overview in CrewAI Enterprise" />
</Frame>
## Users and Roles
Each member in your CrewAI workspace is assigned a role, which determines their access across various features.
You can:
- Use predefined roles (Owner, Member)
- Create custom roles tailored to specific permissions
- Assign roles at any time through the settings panel
You can configure users and roles in Settings → Roles.
<Steps>
<Step title="Open Roles settings">
Go to <b>Settings → Roles</b> in CrewAI Enterprise.
</Step>
<Step title="Choose a role type">
Use a predefined role (<b>Owner</b>, <b>Member</b>) or click <b>Create role</b> to define a custom one.
</Step>
<Step title="Assign to members">
Select users and assign the role. You can change this anytime.
</Step>
</Steps>
### Configuration summary
| Area | Where to configure | Options |
|:---|:---|:---|
| Users & Roles | Settings → Roles | Predefined: Owner, Member; Custom roles |
| Automation visibility | Automation → Settings → Visibility | Private; Whitelist users/roles |
## Automationlevel Access Control
In addition to organizationwide roles, CrewAI Automations support finegrained visibility settings that let you restrict access to specific automations by user or role.
This is useful for:
- Keeping sensitive or experimental automations private
- Managing visibility across large teams or external collaborators
- Testing automations in isolated contexts
Deployments can be configured as private, meaning only whitelisted users and roles will be able to:
- View the deployment
- Run it or interact with its API
- Access its logs, metrics, and settings
The organization owner always has access, regardless of visibility settings.
You can configure automationlevel access control in Automation → Settings → Visibility tab.
<Steps>
<Step title="Open Visibility tab">
Navigate to <b>Automation → Settings → Visibility</b>.
</Step>
<Step title="Set visibility">
Choose <b>Private</b> to restrict access. The organization owner always retains access.
</Step>
<Step title="Whitelist access">
Add specific users and roles allowed to view, run, and access logs/metrics/settings.
</Step>
<Step title="Save and verify">
Save changes, then confirm that nonwhitelisted users cannot view or run the automation.
</Step>
</Steps>
### Private visibility: access outcomes
| Action | Owner | Whitelisted user/role | Not whitelisted |
|:---|:---|:---|:---|
| View automation | ✓ | ✓ | ✗ |
| Run automation/API | ✓ | ✓ | ✗ |
| Access logs/metrics/settings | ✓ | ✓ | ✗ |
<Tip>
The organization owner always has access. In private mode, only whitelisted users and roles can view, run, and access logs/metrics/settings.
</Tip>
<Frame>
<img src="/images/enterprise/visibility.png" alt="Automation Visibility settings in CrewAI Enterprise" />
</Frame>
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
Contact our support team for assistance with RBAC questions.
</Card>

View File

@@ -2,6 +2,7 @@
title: Tool Repository
description: "Using the Tool Repository to manage your tools"
icon: "toolbox"
mode: "wide"
---
## Overview
@@ -35,6 +36,52 @@ crewai tool install <tool-name>
This installs the tool and adds it to `pyproject.toml`.
You can use the tool by importing it and adding it to your agents:
```python
from your_tool.tool import YourTool
custom_tool = YourTool()
researcher = Agent(
role='Market Research Analyst',
goal='Provide up-to-date market analysis of the AI industry',
backstory='An expert analyst with a keen eye for market trends.',
tools=[custom_tool],
verbose=True
)
```
## 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.
## Creating and Publishing Tools
To create a new tool project:

View File

@@ -2,6 +2,7 @@
title: Traces
description: "Using Traces to monitor your Crews"
icon: "timeline"
mode: "wide"
---
## Overview
@@ -141,6 +142,16 @@ Traces are invaluable for troubleshooting issues with your crews:
</Step>
</Steps>
## Performance and batching
CrewAI batches trace uploads to reduce overhead on high-volume runs:
- A TraceBatchManager buffers events and sends them in batches via the Plus API client
- Reduces network chatter and improves reliability on flaky connections
- Automatically enabled in the default trace listener; no configuration needed
This yields more stable tracing under load while preserving detailed task/agent telemetry.
<Card title="Need Help?" icon="headset" href="mailto:support@crewai.com">
Contact our support team for assistance with trace analysis or any other CrewAI Enterprise features.
</Card>

View File

@@ -2,6 +2,7 @@
title: Webhook Streaming
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.

View File

@@ -0,0 +1,179 @@
---
title: "Automation Triggers"
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:
**🔗 [CrewAI Enterprise Trigger Payload Samples](https://github.com/crewAIInc/crewai-enterprise-trigger-payload-samples)**
This repository contains:
- **Real payload examples** from different trigger sources (Gmail, Google Drive, etc.)
- **Payload structure documentation** showing the format and available fields
### Triggers with Crew
Your existing crew definitions work seamlessly with triggers, you just need to have a task to parse the received payload:
```python
@CrewBase
class MyAutomatedCrew:
@agent
def researcher(self) -> Agent:
return Agent(
config=self.agents_config['researcher'],
)
@task
def parse_trigger_payload(self) -> Task:
return Task(
config=self.tasks_config['parse_trigger_payload'],
agent=self.researcher(),
)
@task
def analyze_trigger_content(self) -> Task:
return Task(
config=self.tasks_config['analyze_trigger_data'],
agent=self.researcher(),
)
```
The crew will automatically receive and can access the trigger payload through the standard CrewAI context mechanisms.
<Note>
Crew and Flow inputs can include `crewai_trigger_payload`. CrewAI automatically injects this payload:
- Tasks: appended to the first task's description by default ("Trigger Payload: {crewai_trigger_payload}")
- Control via `allow_crewai_trigger_context`: set `True` to always inject, `False` to never inject
- Flows: any `@start()` method that accepts a `crewai_trigger_payload` parameter will receive it
</Note>
### Integration with Flows
For flows, you have more control over how trigger data is handled:
#### Accessing Trigger Payload
All `@start()` methods in your flows will accept an additional parameter called `crewai_trigger_payload`:
```python
from crewai.flow import Flow, start, listen
class MyAutomatedFlow(Flow):
@start()
def handle_trigger(self, crewai_trigger_payload: dict = None):
"""
This start method can receive trigger data
"""
if crewai_trigger_payload:
# Process the trigger data
trigger_id = crewai_trigger_payload.get('id')
event_data = crewai_trigger_payload.get('payload', {})
# Store in flow state for use by other methods
self.state.trigger_id = trigger_id
self.state.trigger_type = event_data
return event_data
# Handle manual execution
return None
@listen(handle_trigger)
def process_data(self, trigger_data):
"""
Process the data from the trigger
"""
# ... process the trigger
```
#### Triggering Crews from Flows
When kicking off a crew within a flow that was triggered, pass the trigger payload as it:
```python
@start()
def delegate_to_crew(self, crewai_trigger_payload: dict = None):
"""
Delegate processing to a specialized crew
"""
crew = MySpecializedCrew()
# Pass the trigger payload to the crew
result = crew.crew().kickoff(
inputs={
'a_custom_parameter': "custom_value",
'crewai_trigger_payload': crewai_trigger_payload
},
)
return result
```
## Troubleshooting
**Trigger not firing:**
- Verify the trigger is enabled
- Check integration connection status
**Execution failures:**
- Check the execution logs for error details
- 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.

View File

@@ -2,6 +2,7 @@
title: "Azure OpenAI Setup"
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.
<Frame>
<img src="/images/enterprise/azure-openai-studio.png" alt="Azure OpenAI Studio" />
<img src="/images/enterprise/azure-openai-studio.png" alt="Azure AI Foundry" />
</Frame>
</Step>
@@ -48,4 +49,4 @@ If you encounter issues:
- Verify the Target URI format matches the expected pattern
- Check that the API key is correct and has proper permissions
- Ensure network access is configured to allow CrewAI connections
- Confirm the deployment model matches what you've configured in CrewAI
- Confirm the deployment model matches what you've configured in CrewAI

View File

@@ -2,6 +2,7 @@
title: "Build Crew"
description: "A Crew is a group of agents that work together to complete a task."
icon: "people-arrows"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: "Deploy Crew"
description: "Deploying a Crew on CrewAI Enterprise"
icon: "rocket"
mode: "wide"
---
<Note>

View File

@@ -2,6 +2,7 @@
title: "Enable Crew Studio"
description: "Enabling Crew Studio on CrewAI Enterprise"
icon: "comments"
mode: "wide"
---
<Tip>

View File

@@ -2,6 +2,7 @@
title: "HubSpot Trigger"
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.

View File

@@ -2,6 +2,7 @@
title: "HITL 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.

View File

@@ -2,6 +2,7 @@
title: "Kickoff Crew"
description: "Kickoff a Crew on CrewAI Enterprise"
icon: "flag-checkered"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: "React Component Export"
description: "Learn how to export and integrate CrewAI Enterprise React components into your applications"
icon: "react"
mode: "wide"
---
This guide explains how to export CrewAI Enterprise crews as React components and integrate them into your own applications.

View File

@@ -2,6 +2,7 @@
title: "Salesforce Trigger"
description: "Trigger CrewAI crews from Salesforce workflows for CRM automation"
icon: "salesforce"
mode: "wide"
---
CrewAI Enterprise can be triggered from Salesforce to automate customer relationship management workflows and enhance your sales operations.

View File

@@ -2,6 +2,7 @@
title: "Slack Trigger"
description: "Trigger CrewAI crews directly from Slack using slash commands"
icon: "slack"
mode: "wide"
---
This guide explains how to start a crew directly from Slack using CrewAI triggers.

View File

@@ -2,6 +2,7 @@
title: "Team Management"
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.

View File

@@ -2,6 +2,7 @@
title: "Update Crew"
description: "Updating a Crew on CrewAI Enterprise"
icon: "pencil"
mode: "wide"
---
<Note>

View File

@@ -2,6 +2,7 @@
title: "Webhook Automation"
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.",
"kickoff_id": "97eba64f-958c-40a0-b61c-625fe635a3c0",
"meta": {
"requestId": "travel-req-123",
"source": "web-app"
}
}
```
</Tab>
@@ -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.",
"output_json": {
"industry": "financial",
"key_opportunities": ["digital customer engagement", "risk management", "regulatory compliance"]
},
"kickoff_id": "97eba64f-958c-40a0-b61c-625fe635a3c0",
"meta": {
"requestId": "travel-req-123",
"source": "web-app"
}
}
```
</Tab>
@@ -105,8 +129,9 @@ CrewAI Enterprise allows you to automate your workflow using webhooks. This arti
```json
{
"task_id": "97eba64f-958c-40a0-b61c-625fe635a3c0",
"result": {
"kickoff_id": "97eba64f-958c-40a0-b61c-625fe635a3c0",
"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."
]
},
"token_usage": {
"total_tokens": 1250,
"prompt_tokens": 800,
"completion_tokens": 450
},
"meta": {
"requestId": "travel-req-123",
"source": "web-app"
}
}
```

View File

@@ -2,6 +2,7 @@
title: "Zapier Trigger"
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.

View File

@@ -2,6 +2,7 @@
title: Asana Integration
description: "Team task and project coordination with Asana integration for CrewAI."
icon: "circle"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Box Integration
description: "File storage and document management with Box integration for CrewAI."
icon: "box"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: ClickUp Integration
description: "Task and productivity management with ClickUp integration for CrewAI."
icon: "list-check"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: GitHub Integration
description: "Repository and issue management with GitHub integration for CrewAI."
icon: "github"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Gmail Integration
description: "Email and contact management with Gmail integration for CrewAI."
icon: "envelope"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Google Calendar Integration
description: "Event and schedule management with Google Calendar integration for CrewAI."
icon: "calendar"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Google Sheets Integration
description: "Spreadsheet data synchronization with Google Sheets integration for CrewAI."
icon: "google"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: "HubSpot Integration"
description: "Manage companies and contacts in HubSpot with CrewAI."
icon: "briefcase"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Jira Integration
description: "Issue tracking and project management with Jira integration for CrewAI."
icon: "bug"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Linear Integration
description: "Software project and bug tracking with Linear integration for CrewAI."
icon: "list-check"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Notion Integration
description: "Page and database management with Notion integration for CrewAI."
icon: "book"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Salesforce Integration
description: "CRM and sales automation with Salesforce integration for CrewAI."
icon: "salesforce"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Shopify Integration
description: "E-commerce and online store management with Shopify integration for CrewAI."
icon: "shopify"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Slack Integration
description: "Team communication and collaboration with Slack integration for CrewAI."
icon: "slack"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Stripe Integration
description: "Payment processing and subscription management with Stripe integration for CrewAI."
icon: "stripe"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Zendesk Integration
description: "Customer support and helpdesk management with Zendesk integration for CrewAI."
icon: "headset"
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: "CrewAI Enterprise"
description: "Deploy, monitor, and scale your AI agent workflows"
icon: "globe"
mode: "wide"
---
## Introduction

View File

@@ -2,6 +2,7 @@
title: FAQs
description: "Frequently asked questions about CrewAI Enterprise"
icon: "circle-question"
mode: "wide"
---
<AccordionGroup>

View File

@@ -0,0 +1,23 @@
---
title: CrewAI Cookbooks
description: Feature-focused quickstarts and notebooks for learning patterns fast.
icon: book
mode: "wide"
---
## Quickstarts & Demos
<CardGroup cols={2}>
<Card title="Task Guardrails" icon="shield-check" href="https://github.com/crewAIInc/crewAI-quickstarts/tree/main/Task%20Guardrails">
Interactive notebooks for hands-on exploration.
</Card>
<Card title="Browse Quickstarts" icon="bolt" href="https://github.com/crewAIInc/crewAI-quickstarts">
Feature demos and small projects showcasing specific CrewAI capabilities.
</Card>
</CardGroup>
<Tip>
Use Cookbooks to learn a pattern quickly, then jump to Full Examples for productiongrade implementations.
</Tip>

View File

@@ -1,62 +1,86 @@
---
title: CrewAI Examples
description: A collection of examples that show how to use CrewAI framework to automate workflows.
description: Explore curated examples organized by Crews, Flows, Integrations, and Notebooks.
icon: rocket-launch
mode: "wide"
---
## Crews
<CardGroup cols={3}>
<Card
title="Marketing Strategy"
color="#F3A78B"
href="https://github.com/crewAIInc/crewAI-examples/tree/main/marketing_strategy"
icon="bullhorn"
iconType="solid"
>
Automate marketing strategy creation with CrewAI.
<Card title="Marketing Strategy" icon="bullhorn" href="https://github.com/crewAIInc/crewAI-examples/tree/main/crews/marketing_strategy">
Multiagent marketing campaign planning.
</Card>
<Card title="Surprise Trip" icon="plane" href="https://github.com/crewAIInc/crewAI-examples/tree/main/crews/surprise_trip">
Personalized surprise travel planning.
</Card>
<Card title="Match Profile to Positions" icon="id-card" href="https://github.com/crewAIInc/crewAI-examples/tree/main/crews/match_profile_to_positions">
CVtojob matching with vector search.
</Card>
<Card title="Job Posting" icon="newspaper" href="https://github.com/crewAIInc/crewAI-examples/tree/main/crews/job-posting">
Automated job description creation.
</Card>
<Card title="Game Builder Crew" icon="gamepad" href="https://github.com/crewAIInc/crewAI-examples/tree/main/crews/game-builder-crew">
Multiagent team that designs and builds Python games.
</Card>
<Card title="Recruitment" icon="user-group" href="https://github.com/crewAIInc/crewAI-examples/tree/main/crews/recruitment">
Candidate sourcing and evaluation.
</Card>
<Card title="Browse all Crews" icon="users" href="https://github.com/crewAIInc/crewAI-examples/tree/main/crews">
See the full list of crew examples.
</Card>
</CardGroup>
## Flows
<CardGroup cols={3}>
<Card title="Content Creator Flow" icon="pen" href="https://github.com/crewAIInc/crewAI-examples/tree/main/flows/content_creator_flow">
Multicrew content generation with routing.
</Card>
<Card title="Email Auto Responder" icon="envelope" href="https://github.com/crewAIInc/crewAI-examples/tree/main/flows/email_auto_responder_flow">
Automated email monitoring and replies.
</Card>
<Card title="Lead Score Flow" icon="chart-line" href="https://github.com/crewAIInc/crewAI-examples/tree/main/flows/lead_score_flow">
Lead qualification with humanintheloop.
</Card>
<Card title="Meeting Assistant Flow" icon="calendar" href="https://github.com/crewAIInc/crewAI-examples/tree/main/flows/meeting_assistant_flow">
Notes processing with integrations.
</Card>
<Card title="Self Evaluation Loop" icon="rotate" href="https://github.com/crewAIInc/crewAI-examples/tree/main/flows/self_evaluation_loop_flow">
Iterative selfimprovement workflows.
</Card>
<Card title="Write a Book (Flows)" icon="book" href="https://github.com/crewAIInc/crewAI-examples/tree/main/flows/write_a_book_with_flows">
Parallel chapter generation.
</Card>
<Card title="Browse all Flows" icon="diagram-project" href="https://github.com/crewAIInc/crewAI-examples/tree/main/flows">
See the full list of flow examples.
</Card>
</CardGroup>
## Integrations
<CardGroup cols={3}>
<Card title="CrewAI ↔ LangGraph" icon="link" href="https://github.com/crewAIInc/crewAI-examples/tree/main/integrations/crewai-langgraph">
Integration with LangGraph framework.
</Card>
<Card title="Azure OpenAI" icon="cloud" href="https://github.com/crewAIInc/crewAI-examples/tree/main/integrations/azure_model">
Using CrewAI with Azure OpenAI.
</Card>
<Card title="NVIDIA Models" icon="microchip" href="https://github.com/crewAIInc/crewAI-examples/tree/main/integrations/nvidia_models">
NVIDIA ecosystem integrations.
</Card>
<Card title="Browse Integrations" icon="puzzle-piece" href="https://github.com/crewAIInc/crewAI-examples/tree/main/integrations">
See all integration examples.
</Card>
</CardGroup>
## Notebooks
<CardGroup cols={2}>
<Card title="Simple QA Crew + Flow" icon="book" href="https://github.com/crewAIInc/crewAI-examples/tree/main/Notebooks/Simple%20QA%20Crew%20%2B%20Flow">
Simple QA Crew + Flow.
</Card>
<Card title="All Notebooks" icon="book" href="https://github.com/crewAIInc/crewAI-examples/tree/main/Notebooks">
Interactive examples for learning and experimentation.
</Card>
<Card
title="Surprise Trip"
color="#F3A78B"
href="https://github.com/crewAIInc/crewAI-examples/tree/main/surprise_trip"
icon="plane"
iconType="duotone"
>
Create a surprise trip itinerary with CrewAI.
</Card>
<Card
title="Match Profile to Positions"
color="#F3A78B"
href="https://github.com/crewAIInc/crewAI-examples/tree/main/match_profile_to_positions"
icon="linkedin"
iconType="duotone"
>
Match a profile to jobpositions with CrewAI.
</Card>
<Card
title="Create Job Posting"
color="#F3A78B"
href="https://github.com/crewAIInc/crewAI-examples/tree/main/job-posting"
icon="newspaper"
iconType="duotone"
>
Create a job posting with CrewAI.
</Card>
<Card
title="Game Generator"
color="#F3A78B"
href="https://github.com/crewAIInc/crewAI-examples/tree/main/game-builder-crew"
icon="gamepad"
iconType="duotone"
>
Create a game with CrewAI.
</Card>
<Card
title="Find Job Candidates"
color="#F3A78B"
href="https://github.com/crewAIInc/crewAI-examples/tree/main/recruitment"
icon="user-group"
iconType="duotone"
>
Find job candidates with CrewAI.
</Card>
</CardGroup>

View File

@@ -2,6 +2,7 @@
title: Customizing Prompts
description: Dive deeper into low-level prompt customization for CrewAI, enabling super custom and complex use cases for different models and languages.
icon: message-pen
mode: "wide"
---
## Why Customize Prompts?

View File

@@ -2,6 +2,7 @@
title: Fingerprinting
description: Learn how to use CrewAI's fingerprinting system to uniquely identify and track components throughout their lifecycle.
icon: fingerprint
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Crafting Effective Agents
description: Learn best practices for designing powerful, specialized AI agents that collaborate effectively to solve complex problems.
icon: robot
mode: "wide"
---
## The Art and Science of Agent Design

View File

@@ -2,6 +2,7 @@
title: Evaluating Use Cases for CrewAI
description: Learn how to assess your AI application needs and choose the right approach between Crews and Flows based on complexity and precision requirements.
icon: scale-balanced
mode: "wide"
---
## Understanding the Decision Framework

View File

@@ -2,6 +2,7 @@
title: Build Your First Crew
description: Step-by-step tutorial to create a collaborative AI team that works together to solve complex problems.
icon: users-gear
mode: "wide"
---
## Unleashing the Power of Collaborative AI

View File

@@ -2,6 +2,7 @@
title: Build Your First Flow
description: Learn how to create structured, event-driven workflows with precise control over execution.
icon: diagram-project
mode: "wide"
---
## Taking Control of AI Workflows with Flows

View File

@@ -2,6 +2,7 @@
title: Mastering Flow State Management
description: A comprehensive guide to managing, persisting, and leveraging state in CrewAI Flows for building robust AI applications.
icon: diagram-project
mode: "wide"
---
## Understanding the Power of State in Flows
@@ -348,6 +349,31 @@ class SelectivePersistFlow(Flow):
## Advanced State Patterns
### Conditional starts and resumable execution
Flows support conditional `@start()` and resumable execution for HITL/cyclic scenarios:
```python
from crewai.flow.flow import Flow, start, listen, and_, or_
class ResumableFlow(Flow):
@start() # unconditional start
def init(self):
...
# Conditional start: run after "init" or external trigger name
@start("init")
def maybe_begin(self):
...
@listen(and_(init, maybe_begin))
def proceed(self):
...
```
- Conditional `@start()` accepts a method name, a router label, or a callable condition.
- During resume, listeners continue from prior checkpoints; cycle/router branches honor resumption flags.
### State-Based Conditional Logic
You can use state to implement complex conditional logic in your flows:

View File

@@ -2,6 +2,7 @@
title: Installation
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**.

View File

@@ -2,6 +2,7 @@
title: Introduction
description: Build AI agent teams that work together to tackle complex tasks
icon: handshake
mode: "wide"
---
# What is CrewAI?

View File

@@ -1,6 +1,7 @@
---
title: Before and After Kickoff Hooks
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.

View File

@@ -2,6 +2,7 @@
title: Bring your own agent
description: Learn how to bring your own agents that work within a Crew.
icon: robots
mode: "wide"
---
Interoperability is a core concept in CrewAI. This guide will show you how to bring your own agents that work within a Crew.

View File

@@ -2,6 +2,7 @@
title: Coding Agents
description: Learn how to enable your CrewAI Agents to write and execute code, and explore advanced features for enhanced functionality.
icon: rectangle-code
mode: "wide"
---
## Introduction

View File

@@ -2,6 +2,7 @@
title: Conditional Tasks
description: Learn how to use conditional tasks in a crewAI kickoff
icon: diagram-subtask
mode: "wide"
---
## Introduction

View File

@@ -2,6 +2,7 @@
title: Create Custom Tools
description: Comprehensive guide on crafting, using, and managing custom tools within the CrewAI framework, including new functionalities and error handling.
icon: hammer
mode: "wide"
---
## Creating and Utilizing Tools in CrewAI

View File

@@ -2,6 +2,7 @@
title: Custom LLM Implementation
description: Learn how to create custom LLM implementations in CrewAI.
icon: code
mode: "wide"
---
## Overview

View File

@@ -2,6 +2,7 @@
title: Custom Manager Agent
description: Learn how to set a custom agent as the manager in CrewAI, providing more control over task management and coordination.
icon: user-shield
mode: "wide"
---
# Setting a Specific Agent as Manager in CrewAI

View File

@@ -2,6 +2,7 @@
title: Customize Agents
description: A comprehensive guide to tailoring agents for specific roles, tasks, and advanced customizations within the CrewAI framework.
icon: user-pen
mode: "wide"
---
## Customizable Attributes

View File

@@ -2,6 +2,7 @@
title: "Image Generation with DALL-E"
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.

View File

@@ -2,6 +2,7 @@
title: Force Tool Output as Result
description: Learn how to force tool output as the result in an Agent's task in CrewAI.
icon: wrench-simple
mode: "wide"
---
## Introduction

View File

@@ -2,6 +2,7 @@
title: Hierarchical Process
description: A comprehensive guide to understanding and applying the hierarchical process within your CrewAI projects, updated to reflect the latest coding practices and functionalities.
icon: sitemap
mode: "wide"
---
## Introduction

View File

@@ -2,6 +2,7 @@
title: "Human-in-the-Loop (HITL) 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.

View File

@@ -2,6 +2,7 @@
title: Human Input on Execution
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.
icon: user-check
mode: "wide"
---
## Human input in agent execution

View File

@@ -2,6 +2,7 @@
title: Kickoff Crew Asynchronously
description: Kickoff a Crew Asynchronously
icon: rocket-launch
mode: "wide"
---
## Introduction

Some files were not shown because too many files have changed in this diff Show More