devin-ai-integration[bot]
bb40f3934d
Fix interpolation for output_file in Task ( #1803 ) ( #1814 )
...
* fix: interpolate output_file attribute from YAML
Co-Authored-By: Joe Moura <joao@crewai.com >
* fix: add security validation for output_file paths
Co-Authored-By: Joe Moura <joao@crewai.com >
* fix: add _original_output_file private attribute to fix type-checker error
Co-Authored-By: Joe Moura <joao@crewai.com >
* fix: update interpolate_only to handle None inputs and remove duplicate attribute
Co-Authored-By: Joe Moura <joao@crewai.com >
* fix: improve output_file validation and error messages
Co-Authored-By: Joe Moura <joao@crewai.com >
* test: add end-to-end tests for output_file functionality
Co-Authored-By: Joe Moura <joao@crewai.com >
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <joao@crewai.com >
2025-02-09 23:56:43 +00:00
João Moura
ee9437c838
fixing file paths for knowledge source
2025-02-09 23:56:43 +00:00
Devin AI
318a3ad3e7
test: Use ChromaDB in-memory mode for tests to avoid file system issues
...
Co-Authored-By: Joe Moura <joao@crewai.com >
2025-02-09 23:47:35 +00:00
Devin AI
dbea3758eb
test: Add proper environment variable cleanup in memory reset tests
...
Co-Authored-By: Joe Moura <joao@crewai.com >
2025-02-09 23:43:39 +00:00
Devin AI
528ab0c410
style: Fix import sorting in test_memory_reset.py
...
Co-Authored-By: Joe Moura <joao@crewai.com >
2025-02-09 23:39:44 +00:00
Devin AI
d058f23d93
style: Fix standard library import order
...
Co-Authored-By: Joe Moura <joao@crewai.com >
2025-02-09 23:35:27 +00:00
Devin AI
d488859f41
style: Fix import sorting order
...
Co-Authored-By: Joe Moura <joao@crewai.com >
2025-02-09 23:33:30 +00:00
Devin AI
1353be12ce
style: Fix import sorting in test file
...
Co-Authored-By: Joe Moura <joao@crewai.com >
2025-02-09 23:32:27 +00:00
Devin AI
a293a37ef8
test: Handle both directory removal and empty directory cases
...
Co-Authored-By: Joe Moura <joao@crewai.com >
2025-02-09 23:29:21 +00:00
Devin AI
0dfa5b05d3
test: Use custom embedder for cleanup test
...
Co-Authored-By: Joe Moura <joao@crewai.com >
2025-02-09 23:28:23 +00:00
Devin AI
24eeffb87e
test: Add OpenAI API key to cleanup test
...
Co-Authored-By: Joe Moura <joao@crewai.com >
2025-02-09 23:27:49 +00:00
Devin AI
e6698e24cd
fix: Convert PosixPath to str for ChromaDB
...
Co-Authored-By: Joe Moura <joao@crewai.com >
2025-02-09 23:26:51 +00:00
Devin AI
d56523a01a
fix: Update embedding configuration and fix type errors
...
- Add configurable embedding provider support
- Remove OpenAI dependency for memory reset
- Add tests for different embedding providers
- Fix type hints and improve docstrings
Co-Authored-By: Joe Moura <joao@crewai.com >
2025-02-09 23:25:38 +00:00
João Moura
82647358b2
Adding Multimodal Abilities to Crew ( #1805 )
...
* initial fix on delegation tools
* fixing tests for delegations and coding
* Refactor prepare tool and adding initial add images logic
* supporting image tool
* fixing linter
* fix linter
* Making sure multimodal feature support i18n
* fix linter and types
* mixxing translations
* fix types and linter
* Revert "fixing linter"
This reverts commit 2eda5fdeed .
* fix linters
* test
* fix
* fix
* fix linter
* fix
* ignore
* type improvements
2024-12-27 17:03:35 -03:00
Brandon Hancock (bhancock_ai)
6cc2f510bf
Feat/joao flow improvement requests ( #1795 )
...
* Add in or and and in router
* In the middle of improving plotting
* final plot changes
---------
Co-authored-by: João Moura <joaomdmoura@gmail.com >
2024-12-24 18:55:44 -03:00
Lorenze Jay
b3185ad90c
Feat/docling-support ( #1763 )
...
* added tool for docling support
* docling support installation
* use file_paths instead of file_path
* fix import
* organized imports
* run_type docs
* needs to be list
* fixed logic
* logged but file_path is backwards compatible
* use file_paths instead of file_path 2
* added test for multiple sources for file_paths
* fix run-types
* enabling local files to work and type cleanup
* linted
* fix test and types
* fixed run types
* fix types
* renamed to CrewDoclingSource
* linted
* added docs
* resolve conflicts
---------
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com >
Co-authored-by: Brandon Hancock <brandon@brandonhancock.io >
2024-12-23 13:19:58 -05:00
devin-ai-integration[bot]
c887ff1f47
feat: Add interpolate_only method and improve error handling ( #1791 )
...
* Fixed output_file not respecting system path
* Fixed yaml config is not escaped properly for output requirements
* feat: Add interpolate_only method and improve error handling
- Add interpolate_only method for string interpolation while preserving JSON structure
- Add comprehensive test coverage for interpolate_only
- Add proper type annotation for logger using ClassVar
- Improve error handling and documentation for _save_file method
Co-Authored-By: Joe Moura <joao@crewai.com >
* fix: Sort imports to fix lint issues
Co-Authored-By: Joe Moura <joao@crewai.com >
* fix: Reorganize imports using ruff --fix
Co-Authored-By: Joe Moura <joao@crewai.com >
* fix: Consolidate imports and fix formatting
Co-Authored-By: Joe Moura <joao@crewai.com >
* fix: Apply ruff automatic import sorting
Co-Authored-By: Joe Moura <joao@crewai.com >
* fix: Sort imports using ruff --fix
Co-Authored-By: Joe Moura <joao@crewai.com >
---------
Co-authored-by: Frieda (Jingying) Huang <jingyingfhuang@gmail.com >
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com >
Co-authored-by: Frieda Huang <124417784+frieda-huang@users.noreply.github.com >
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <joao@crewai.com >
2024-12-23 13:05:29 -05:00
devin-ai-integration[bot]
22e5d39884
feat: Add task guardrails feature ( #1742 )
...
* feat: Add task guardrails feature
Add support for custom code guardrails in tasks that validate outputs
before proceeding to the next task. Features include:
- Optional task-level guardrail function
- Pre-next-task execution timing
- Tuple return format (success, data)
- Automatic result/error routing
- Configurable retry mechanism
- Comprehensive documentation and tests
Link to Devin run: https://app.devin.ai/sessions/39f6cfd6c5a24d25a7bd70ce070ed29a
Co-Authored-By: Joe Moura <joao@crewai.com >
* fix: Add type check for guardrail result and remove unused import
Co-Authored-By: Joe Moura <joao@crewai.com >
* fix: Remove unnecessary f-string prefix
Co-Authored-By: Joe Moura <joao@crewai.com >
* feat: Add guardrail validation improvements
- Add result/error exclusivity validation in GuardrailResult
- Make return type annotations optional in Task guardrail validator
- Improve error messages for validation failures
Co-Authored-By: Joe Moura <joao@crewai.com >
* docs: Add comprehensive guardrails documentation
- Add type hints and examples
- Add error handling best practices
- Add structured error response patterns
- Document retry mechanisms
- Improve documentation organization
Co-Authored-By: Joe Moura <joao@crewai.com >
* refactor: Update guardrail functions to handle TaskOutput objects
Co-Authored-By: Joe Moura <joao@crewai.com >
* feat: Add task guardrails feature
Add support for custom code guardrails in tasks that validate outputs
before proceeding to the next task. Features include:
- Optional task-level guardrail function
- Pre-next-task execution timing
- Tuple return format (success, data)
- Automatic result/error routing
- Configurable retry mechanism
- Comprehensive documentation and tests
Link to Devin run: https://app.devin.ai/sessions/39f6cfd6c5a24d25a7bd70ce070ed29a
Co-Authored-By: Joe Moura <joao@crewai.com >
* fix: Add type check for guardrail result and remove unused import
Co-Authored-By: Joe Moura <joao@crewai.com >
* fix: Remove unnecessary f-string prefix
Co-Authored-By: Joe Moura <joao@crewai.com >
* feat: Add guardrail validation improvements
- Add result/error exclusivity validation in GuardrailResult
- Make return type annotations optional in Task guardrail validator
- Improve error messages for validation failures
Co-Authored-By: Joe Moura <joao@crewai.com >
* docs: Add comprehensive guardrails documentation
- Add type hints and examples
- Add error handling best practices
- Add structured error response patterns
- Document retry mechanisms
- Improve documentation organization
Co-Authored-By: Joe Moura <joao@crewai.com >
* refactor: Update guardrail functions to handle TaskOutput objects
Co-Authored-By: Joe Moura <joao@crewai.com >
* style: Fix import sorting in task guardrails files
Co-Authored-By: Joe Moura <joao@crewai.com >
* fixing docs
* Fixing guardarils implementation
* docs: Enhance guardrail validator docstring with runtime validation rationale
Co-Authored-By: Joe Moura <joao@crewai.com >
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <joao@crewai.com >
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com >
Co-authored-by: João Moura <joaomdmoura@gmail.com >
2024-12-22 00:52:02 -03:00
PJ
9ee6824ccd
Correcting a small grammatical issue that was bugging me: from _satisfy the expect criteria_ to _satisfies the expected criteria_ ( #1783 )
...
Signed-off-by: PJ Hagerty <pjhagerty@gmail.com >
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com >
2024-12-20 10:17:34 -05:00
Brandon Hancock
ee239b1c06
change to <13 instead of <=12
2024-12-17 16:00:15 -05:00
Brandon Hancock (bhancock_ai)
1ffa8904db
apply agent ops changes and resolve merge conflicts ( #1748 )
...
* apply agent ops changes and resolve merge conflicts
* Trying to fix tests
* add back in vcr
* update tools
* remove pkg_resources which was causing issues
* Fix tests
* experimenting to see if unique content is an issue with knowledge
* experimenting to see if unique content is an issue with knowledge
* update chromadb which seems to have issues with upsert
* generate new yaml for failing test
* Investigating upsert
* Drop patch
* Update casettes
* Fix duplicate document issue
* more fixes
* add back in vcr
* new cassette for test
---------
Co-authored-by: Lorenze Jay <lorenzejaytech@gmail.com >
2024-12-12 15:04:32 -05:00
André Lago
8094754239
Fix small typo in sample tool ( #1747 )
...
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com >
2024-12-12 10:11:47 -05:00
Bowen Liang
0b0f2d30ab
sort imports with isort rules by ruff linter ( #1730 )
...
* sort imports
* update
---------
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com >
Co-authored-by: Eduardo Chiarotti <dudumelgaco@hotmail.com >
2024-12-11 10:46:53 -05:00
Archkon
da4f356fab
fix:typo error ( #1738 )
...
* Update base_agent_tools.py
typo error
* Update main.py
typo error
* Update base_file_knowledge_source.py
typo error
* Update test_main.py
typo error
* Update en.json
* Update prompts.json
---------
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com >
2024-12-10 11:18:45 -05:00
Brandon Hancock (bhancock_ai)
54ebd6cf90
restrict python version compatibility ( #1731 )
...
* drop 3.13
* revert
* Drop test cassette that was causing error
* trying to fix failing test
* adding thiago changes
* resolve final tests
* Drop skip
2024-12-09 14:00:18 -05:00
Brandon Hancock (bhancock_ai)
7b276e6797
Incorporate Stale PRs that have feedback ( #1693 )
...
* incorporate #1683
* add in --version flag to cli. closes #1679 .
* Fix env issue
* Add in suggestions from @caike to make sure ragstorage doesnt exceed os file limit. Also, included additional checks to support windows.
* remove poetry.lock as pointed out by @sanders41 in #1574 .
* Incorporate feedback from crewai reviewer
* Incorporate @lorenzejay feedback
2024-12-05 12:17:23 -05:00
Brandon Hancock (bhancock_ai)
611526596a
Brandon/cre 509 hitl multiple rounds of followup ( #1702 )
...
* v1 of HITL working
* Drop print statements
* HITL code more robust. Still needs to be refactored.
* refactor and more clear messages
* Fix type issue
* fix tests
* Fix test again
* Drop extra print
2024-12-05 10:14:04 -05:00
Brandon Hancock (bhancock_ai)
bbea797b0c
remove all references to pipeline and pipeline router ( #1661 )
...
* remove all references to pipeline and router
* fix linting
* drop poetry.lock
2024-12-04 12:39:34 -05:00
Lorenze Jay
c6a6c918e0
added knowledge to agent level ( #1655 )
...
* added knowledge to agent level
* linted
* added doc
* added from suggestions
* added test
* fixes from discussion
* fix docs
* fix test
* rm cassette for knowledge_sources test as its a mock and update agent doc string
* fix test
* rm unused
* linted
2024-11-27 11:33:07 -08:00
Eduardo Chiarotti
293305790d
Feat/remove langchain ( #1654 )
...
* feat: add initial changes from langchain
* feat: remove kwargs of being processed
* feat: remove langchain, update uv.lock and fix type_hint
* feat: change docs
* feat: remove forced requirements for parameter
* feat add tests for new structure tool
* feat: fix tests and adapt code for args
2024-11-26 16:59:52 -03:00
Brandon Hancock (bhancock_ai)
4069b621d5
Improve typed task outputs ( #1651 )
...
* V1 working
* clean up imports and prints
* more clean up and add tests
* fixing tests
* fix test
* fix linting
* Fix tests
* Fix linting
* add doc string as requested by eduardo
2024-11-26 09:41:14 -05:00
Vini Brasil
63ecb7395d
Log in to Tool Repository on crewai login ( #1650 )
...
This commit adds an extra step to `crewai login` to ensure users also
log in to Tool Repository, that is, exchanging their Auth0 tokens for a
Tool Repository username and password to be used by UV downloads and API
tool uploads.
2024-11-25 15:57:47 -03:00
Brandon Hancock (bhancock_ai)
14a36d3f5e
Knowledge ( #1567 )
...
* initial knowledge
* WIP
* Adding core knowledge sources
* Improve types and better support for file paths
* added additional sources
* fix linting
* update yaml to include optional deps
* adding in lorenze feedback
* ensure embeddings are persisted
* improvements all around Knowledge class
* return this
* properly reset memory
* properly reset memory+knowledge
* consolodation and improvements
* linted
* cleanup rm unused embedder
* fix test
* fix duplicate
* generating cassettes for knowledge test
* updated default embedder
* None embedder to use default on pipeline cloning
* improvements
* fixed text_file_knowledge
* mypysrc fixes
* type check fixes
* added extra cassette
* just mocks
* linted
* mock knowledge query to not spin up db
* linted
* verbose run
* put a flag
* fix
* adding docs
* better docs
* improvements from review
* more docs
* linted
* rm print
* more fixes
* clearer docs
* added docstrings and type hints for cli
---------
Co-authored-by: João Moura <joaomdmoura@gmail.com >
Co-authored-by: Lorenze Jay <lorenzejaytech@gmail.com >
2024-11-20 15:40:08 -08:00
Gui Vieira
495c3859af
Cassettes
2024-11-20 10:26:00 -03:00
Gui Vieira
3e003f5e32
Move kickoff callbacks to crew's domain
2024-11-20 10:06:49 -03:00
João Moura
0b9092702b
adding before and after crew
2024-11-18 00:21:36 -03:00
Dev Khant
e70bc94ab6
Add support for retrieving user preferences and memories using Mem0 ( #1209 )
...
* Integrate Mem0
* Update src/crewai/memory/contextual/contextual_memory.py
Co-authored-by: Deshraj Yadav <deshraj@gatech.edu >
* pending commit for _fetch_user_memories
* update poetry.lock
* fixes mypy issues
* fix mypy checks
* New fixes for user_id
* remove memory_provider
* handle memory_provider
* checks for memory_config
* add mem0 to dependency
* Update pyproject.toml
Co-authored-by: Deshraj Yadav <deshraj@gatech.edu >
* update docs
* update doc
* bump mem0 version
* fix api error msg and mypy issue
* mypy fix
* resolve comments
* fix memory usage without mem0
* mem0 version bump
* lazy import mem0
---------
Co-authored-by: Deshraj Yadav <deshraj@gatech.edu >
Co-authored-by: João Moura <joaomdmoura@gmail.com >
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com >
2024-11-14 10:59:24 -08:00
Thiago Moretto
c57cbd8591
Fix crew_train_success test
2024-11-13 10:47:49 -03:00
Thiago Moretto
36aa4bcb46
Cached prompt tokens on usage metrics
2024-11-13 10:16:30 -03:00
Thiago Moretto
c7b9ae02fd
fix test_agent_usage_metrics_are_captured_for_hierarchical_process
2024-11-12 16:43:43 -03:00
Thiago Moretto
4afb022572
fix LiteLLM callback replacement
2024-11-12 15:04:57 -03:00
Brandon Hancock (bhancock_ai)
faa231e278
Fix flows to support cycles and added in test ( #1556 )
2024-11-05 12:02:54 -05:00
C0deZ
e66a135d5d
refactor: Move BaseTool to main package and centralize tool description generation ( #1514 )
...
* move base_tool to main package and consolidate tool desscription generation
* update import path
* update tests
* update doc
* add base_tool test
* migrate agent delegation tools to use BaseTool
* update tests
* update import path for tool
* fix lint
* update param signature
* add from_langchain to BaseTool for backwards support of langchain tools
* fix the case where StructuredTool doesn't have func
---------
Co-authored-by: c0dez <li@vitablehealth.com >
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com >
2024-11-01 12:30:48 -04:00
Vini Brasil
66698503b8
Replace .netrc with uv environment variables ( #1541 )
...
This commit replaces .netrc with uv environment variables for installing
tools from private repositories. To store credentials, I created a new
and reusable settings file for the CLI in
`$HOME/.config/crewai/settings.json`.
The issue with .netrc files is that they are applied system-wide and are
scoped by hostname, meaning we can't differentiate tool repositories
requests from regular requests to CrewAI's API.
2024-10-31 15:00:58 -03:00
Brandon Hancock (bhancock_ai)
b43f3987ec
Update flows cli to allow you to easily add additional crews to a flow ( #1525 )
...
* Update flows cli to allow you to easily add additional crews to a flow
* fix failing test
* adding more error logs to test thats failing
* try again
2024-10-29 11:53:48 -04:00
Brandon Hancock (bhancock_ai)
9cd4ff05c9
use copy to split testing and training on crews ( #1491 )
...
* use copy to split testing and training on crews
* make tests handle new copy functionality on train and test
* fix last test
* fix test
2024-10-22 21:31:44 -04:00
Brandon Hancock (bhancock_ai)
6bcb3d1080
drop unneccesary tests ( #1484 )
...
* drop uneccesary tests
* fix linting
2024-10-21 15:26:30 -04:00
Vini Brasil
b98256e434
Adapt crewai tool install <tool> to uv ( #1481 )
...
This commit updates the tool install comamnd to uv's new custom index
feature.
Related: https://github.com/astral-sh/uv/pull/7746/
2024-10-21 09:24:03 -03:00
Brandon Hancock (bhancock_ai)
84f48c465d
fix tool calling issue ( #1467 )
...
* fix tool calling issue
* Update tool type check
* Drop print
2024-10-18 15:56:56 -03:00
Lorenze Jay
6d20ba70a1
Feat/memory base ( #1444 )
...
* byom - short/entity memory
* better
* rm uneeded
* fix text
* use context
* rm dep and sync
* type check fix
* fixed test using new cassete
* fixing types
* fixed types
* fix types
* fixed types
* fixing types
* fix type
* cassette update
* just mock the return of short term mem
* remove print
* try catch block
* added docs
* dding error handling here
2024-10-17 13:19:33 -03:00