Commit Graph

1141 Commits

Author SHA1 Message Date
jinx
378bd7d284 Correct current year in tasks, to get more up to date results (#2010)
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
2025-02-09 23:56:44 +00:00
Vidit Ostwal
50f6481e2d Fixed the memory documentation (#2031) 2025-02-09 23:56:44 +00:00
Vidit Ostwal
d9c426a50d Fixed the documentation (#2017)
* Fixed the documentation

* Fixed typo, improved description

---------

Co-authored-by: Vidit Ostwal <vidit.ostwal@piramal.com>
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
2025-02-09 23:56:44 +00:00
Brandon Hancock
f7a0da103f update litellm to support o3-mini and deepseek. Update docs. 2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
5286e04dff Brandon/provide llm additional params (#2018)
* Clean up to match enterprise

* add additional params to LLM calls

* make sure additional params are getting passed to llm

* update docs

* drop print
2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
986d7127f3 Clean up to match enterprise (#2009)
* Clean up to match enterprise

* improve feedback prompting
2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
d4f3c8463f Fix llms (#2003)
* iwp

* add in api_base

---------

Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
8ac51daebd Bugfix/fix broken training (#1993)
* Fixing training while refactoring code

* improve prompts

* make sure to raise an error when missing training data

* Drop comment

* fix failing tests

* add clear

* drop bad code

* fix failing test

* Fix type issues pointed out by lorenze

* simplify training
2025-02-09 23:56:44 +00:00
Lorenze Jay
5178c89ea6 fixes interpolation issues when inputs are type dict,list specificall… (#1992)
* fixes interpolation issues when inputs are type dict,list specifically when defined on expected_output

* improvements with type hints, doc fixes and rm print statements

* more tests

* test passing

---------

Co-authored-by: Brandon Hancock <brandon@brandonhancock.io>
2025-02-09 23:56:44 +00:00
Daniel Barreto
0159a6636a docs: add a "Human Input" row to the Task Attributes table (#1999) 2025-02-09 23:56:44 +00:00
Lorenze Jay
d8536deebe fix breakage when cloning agent/crew using knowledge_sources and enable custom knowledge_storage (#1927)
* fix breakage when cloning agent/crew using knowledge_sources

* fixed typo

* better

* ensure use of other knowledge storage works

* fix copy and custom storage

* added tests

* normalized name

* updated cassette

* fix test

* remove fixture

* fixed test

* fix

* add fixture to this

* add fixture to this

* patch twice since

* fix again

* with fixtures

* better mocks

* fix

* simple

* try

* another

* hopefully fixes test

* hopefully fixes test

* this should fix it !

* WIP: test check with prints

* try this

* exclude knowledge

* fixes

* just drop clone for now

* rm print statements

* printing agent_copy

* checker

* linted

* cleanup

* better docs

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
2025-02-09 23:56:44 +00:00
Brandon Hancock
74b78d4eb0 update litellm 2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
9ca2872688 Fix (#1990)
* Fix

* drop failing files
2025-02-09 23:56:44 +00:00
João Moura
6b2d62e5fe preparing new version 2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
900090b4b7 quick fix for mike (#1987) 2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
e189e2133a fix issue pointed out by mike (#1986)
* fix issue pointed out by mike

* clean up

* Drop logger

* drop unused imports
2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
a8dbe4a109 Bugfix/litellm plus generic exceptions (#1965)
* wip

* More clean up

* Fix error

* clean up test

* Improve chat calling messages

* crewai chat improvements

* working but need to clean up

* Clean up chat
2025-02-09 23:56:44 +00:00
devin-ai-integration[bot]
fed2d6bf0d Add version check to crew_chat.py (#1966)
* Add version check to crew_chat.py with min version 0.98.0

Co-Authored-By: brandon@crewai.com <brandon@crewai.com>

* Fix import sorting in crew_chat.py

Co-Authored-By: brandon@crewai.com <brandon@crewai.com>

* Fix import sorting in crew_chat.py (attempt 3)

Co-Authored-By: brandon@crewai.com <brandon@crewai.com>

* Update error message, add version check helper, fix import sorting

Co-Authored-By: brandon@crewai.com <brandon@crewai.com>

* Fix import sorting with Ruff auto-fix

Co-Authored-By: brandon@crewai.com <brandon@crewai.com>

* Remove poetry check and import comment headers in crew_chat.py

Co-Authored-By: brandon@crewai.com <brandon@crewai.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: brandon@crewai.com <brandon@crewai.com>
2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
ae89471271 Fix litellm issues to be more broad (#1960)
* Fix litellm issues to be more broad

* Fix tests
2025-02-09 23:56:44 +00:00
Bobby Lindsey
6f59dcb8d7 Add SageMaker as a LLM provider (#1947)
* Add SageMaker as a LLM provider

* Removed unnecessary constants; updated docs to align with bootstrap naming convention

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
4f20f78f4f Updated calls and added tests to verify (#1953)
* Updated calls and added tests to verify

* Drop unused import
2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
26723936c1 Bugfix/kickoff hangs when llm call fails (#1943)
* Wip to address https://github.com/crewAIInc/crewAI/issues/1934

* implement proper try / except

* clean up PR

* add tests

* Fix tests and code that was broken

* mnore clean up

* Fixing tests

* fix stop type errors]

* more fixes
2025-02-09 23:56:44 +00:00
Tony Kipkemboi
c81c81893c docs: improve formatting and clarity in CLI and Composio Tool docs (#1946)
* docs: improve formatting and clarity in CLI and Composio Tool docs

- Add Terminal label to shell code blocks in CLI docs
- Update Composio Tool title and fix tip formatting

* docs: improve installation guide with virtual environment details

- Update Python version requirements and commands
- Add detailed virtual environment setup instructions
- Clarify project-specific environment activation steps
- Streamline additional tools installation with UV

* docs: simplify installation guide

- Remove redundant virtual environment instructions
- Simplify project creation steps
- Update UV package manager description
2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
26cce7f3ab add docs for crewai chat (#1936)
* add docs for crewai chat

* add version number
2025-02-09 23:56:44 +00:00
Abhishek Patil
b8e7136fba feat: add Composio docs (#1904)
* feat: update Composio tool docs

* Update composiotool.mdx

* fix: minor changes

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
2025-02-09 23:56:44 +00:00
Sanjeed
eff2d8b5e7 Fix wrong llm value in example (#1929)
Original example had `mixtal-llm` which would result in an error.
Replaced with gpt-4o according to https://docs.crewai.com/concepts/llms
2025-02-09 23:56:44 +00:00
João Moura
f27e173e2c Stateful flows (#1931)
* fix: ensure persisted state overrides class defaults

- Remove early return in Flow.__init__ to allow proper state initialization
- Add test_flow_default_override.py to verify state override behavior
- Fix issue where default values weren't being overridden by persisted state

Fixes the issue where persisted state values weren't properly overriding
class defaults when restarting a flow with a previously saved state ID.

Co-Authored-By: Joe Moura <joao@crewai.com>

* test: improve state restoration verification with has_set_count flag

Co-Authored-By: Joe Moura <joao@crewai.com>

* test: add has_set_count field to PoemState

Co-Authored-By: Joe Moura <joao@crewai.com>

* refactoring test

* fix: ensure persisted state overrides class defaults

- Remove early return in Flow.__init__ to allow proper state initialization
- Add test_flow_default_override.py to verify state override behavior
- Fix issue where default values weren't being overridden by persisted state

Fixes the issue where persisted state values weren't properly overriding
class defaults when restarting a flow with a previously saved state ID.

Co-Authored-By: Joe Moura <joao@crewai.com>

* test: improve state restoration verification with has_set_count flag

Co-Authored-By: Joe Moura <joao@crewai.com>

* test: add has_set_count field to PoemState

Co-Authored-By: Joe Moura <joao@crewai.com>

* refactoring test

* Fixing flow state

* fixing peristed stateful flows

* linter

* type fix

---------

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:44 +00:00
devin-ai-integration[bot]
afac425d1a feat: add colored logging for flow operations (#1923)
* feat: add colored logging for flow operations

- Add flow_id property for easy ID access
- Add yellow colored logging for flow start
- Add bold_yellow colored logging for state operations
- Implement consistent logging across flow lifecycle

Co-Authored-By: Joe Moura <joao@crewai.com>

* fix: sort imports to fix lint error

Co-Authored-By: Joe Moura <joao@crewai.com>

* feat: improve flow logging and error handling

- Add centralized logging method for flow events
- Add robust error handling in persistence decorator
- Add consistent log messages and levels
- Add color-coded error messages

Co-Authored-By: Joe Moura <joao@crewai.com>

* fix: sort imports and improve error handling

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: João Moura <joaomdmoura@gmail.com>
2025-02-09 23:56:44 +00:00
João Moura
60d23ef9ee updating tools version 2025-02-09 23:56:44 +00:00
devin-ai-integration[bot]
a4a0946675 docs: add flow persistence section (#1922)
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:44 +00:00
Brandon Hancock (bhancock_ai)
84792a0f17 Brandon/new release cleanup (#1918)
* WIP

* fixes to match enterprise changes
2025-02-09 23:56:44 +00:00
João Moura
32f6e7d24c preparing new verison 2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
b428c95e27 Fix union issue that Daniel was running into (#1910) 2025-02-09 23:56:44 +00:00
fzowl
79bfc9c836 feature: Introducing VoyageAI (#1871)
* Introducing VoyageAI's embedding models

* Adding back the whitespaces

* Adding the whitespaces back
2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
fbf993979d Fix docling issues (#1909)
* Fix docling issues

* update docs
2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
367d4ddf90 Fix nested pydantic model issue (#1905)
* Fix nested pydantic model issue

* fix failing tests

* add in vcr

* cleanup

* drop prints

* Fix vcr issues

* added new recordings

* trying to fix vcr

* add in fix from lorenze.
2025-02-09 23:56:44 +00:00
devin-ai-integration[bot]
a3b95033b4 Fix SQLite log handling issue causing ValueError: Logs cannot be None in tests (#1899)
* Fix SQLite log handling issue causing ValueError: Logs cannot be None in tests

- Add proper error handling in SQLite storage operations
- Set up isolated test environment with temporary storage directory
- Ensure consistent error messages across all database operations

Co-Authored-By: Joe Moura <joao@crewai.com>

* fix: Sort imports in conftest.py

Co-Authored-By: Joe Moura <joao@crewai.com>

* fix: Convert TokenProcess counters to instance variables to fix callback tracking

Co-Authored-By: Joe Moura <joao@crewai.com>

* refactor: Replace print statements with logging and improve error handling

- Add proper logging setup in kickoff_task_outputs_storage.py
- Replace self._printer.print() with logger calls
- Use appropriate log levels (error/warning)
- Add directory validation in test environment setup
- Maintain consistent error messages with DatabaseError format

Co-Authored-By: Joe Moura <joao@crewai.com>

* fix: Comprehensive improvements to database and token handling

- Fix SQLite database path handling in storage classes
- Add proper directory creation and error handling
- Improve token tracking with robust type checking
- Convert TokenProcess counters to instance variables
- Add standardized database error handling
- Set up isolated test environment with temporary storage

Resolves test failures in PR #1899

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: João Moura <joaomdmoura@gmail.com>
2025-02-09 23:56:44 +00:00
devin-ai-integration[bot]
eda8e673d7 Add @persist decorator with FlowPersistence interface (#1892)
* Add @persist decorator with SQLite persistence

- Add FlowPersistence abstract base class
- Implement SQLiteFlowPersistence backend
- Add @persist decorator for flow state persistence
- Add tests for flow persistence functionality

Co-Authored-By: Joe Moura <joao@crewai.com>

* Fix remaining merge conflicts in uv.lock

- Remove stray merge conflict markers
- Keep main's comprehensive platform-specific resolution markers
- Preserve all required dependencies for persistence functionality

Co-Authored-By: Joe Moura <joao@crewai.com>

* Fix final CUDA dependency conflicts in uv.lock

- Resolve NVIDIA CUDA solver dependency conflicts
- Use main's comprehensive platform checks
- Ensure all merge conflict markers are removed
- Preserve persistence-related dependencies

Co-Authored-By: Joe Moura <joao@crewai.com>

* Fix nvidia-cusparse-cu12 dependency conflicts in uv.lock

- Resolve NVIDIA CUSPARSE dependency conflicts
- Use main's comprehensive platform checks
- Complete systematic check of entire uv.lock file
- Ensure all merge conflict markers are removed

Co-Authored-By: Joe Moura <joao@crewai.com>

* Fix triton filelock dependency conflicts in uv.lock

- Resolve triton package filelock dependency conflict
- Use main's comprehensive platform checks
- Complete final systematic check of entire uv.lock file
- Ensure TOML file structure is valid

Co-Authored-By: Joe Moura <joao@crewai.com>

* Fix merge conflict in crew_test.py

- Remove duplicate assertion in test_multimodal_agent_live_image_analysis
- Clean up conflict markers
- Preserve test functionality

Co-Authored-By: Joe Moura <joao@crewai.com>

* Clean up trailing merge conflict marker in crew_test.py

- Remove remaining conflict marker at end of file
- Preserve test functionality
- Complete conflict resolution

Co-Authored-By: Joe Moura <joao@crewai.com>

* Improve type safety in persistence implementation and resolve merge conflicts

Co-Authored-By: Joe Moura <joao@crewai.com>

* fix: Add explicit type casting in _create_initial_state method

Co-Authored-By: Joe Moura <joao@crewai.com>

* fix: Improve type safety in flow state handling with proper validation

Co-Authored-By: Joe Moura <joao@crewai.com>

* fix: Improve type system with proper TypeVar scoping and validation

Co-Authored-By: Joe Moura <joao@crewai.com>

* fix: Improve state restoration logic and add comprehensive tests

Co-Authored-By: Joe Moura <joao@crewai.com>

* fix: Initialize FlowState instances without passing id to constructor

Co-Authored-By: Joe Moura <joao@crewai.com>

* feat: Add class-level flow persistence decorator with SQLite default

- Add class-level @persist decorator support
- Set SQLiteFlowPersistence as default backend
- Use db_storage_path for consistent database location
- Improve async method handling and type safety
- Add comprehensive docstrings and examples

Co-Authored-By: Joe Moura <joao@crewai.com>

* fix: Sort imports in decorators.py to fix lint error

Co-Authored-By: Joe Moura <joao@crewai.com>

* style: Organize imports according to PEP 8 standard

Co-Authored-By: Joe Moura <joao@crewai.com>

* style: Format typing imports with line breaks for better readability

Co-Authored-By: Joe Moura <joao@crewai.com>

* style: Simplify import organization to fix lint error

Co-Authored-By: Joe Moura <joao@crewai.com>

* style: Fix import sorting using Ruff auto-fix

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: João Moura <joaomdmoura@gmail.com>
2025-02-09 23:56:44 +00:00
Tony Kipkemboi
209f852300 docs: update multimodal agents guide and mint.json configuration 2025-02-09 23:56:44 +00:00
Tony Kipkemboi
e9c1b02426 fix: add multimodal docs path to mint.json 2025-02-09 23:56:44 +00:00
Daniel Barreto
e55ff87399 fix: get rid of translation typo (#1880)
Co-authored-by: Brandon Hancock (bhancock_ai) <109994880+bhancockio@users.noreply.github.com>
2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
a956a8a1ad Incorporate y4izus fix (#1893) 2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
732ea8e163 before kickoff breaks if inputs are none. (#1883)
* before kickoff breaks if inputs are none.

* improve none type

* Fix failing tests

* add tests for new code

* Fix failing test

* drop extra comments

* clean up based on eduardo feedback
2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
05e48f0360 drop litellm version to prevent windows issue (#1878)
* drop litellm version to prevent windows issue

* Fix failing tests

* Trying to fix tests

* clean up

* Trying to fix tests

* Drop token calc handler changes

* fix failing test

* Fix failing test

---------

Co-authored-by: João Moura <joaomdmoura@gmail.com>
2025-02-09 23:56:44 +00:00
devin-ai-integration[bot]
200d4c030d feat: add unique ID to flow states (#1888)
* feat: add unique ID to flow states

- Add FlowState base model with UUID field
- Update type variable T to use FlowState
- Ensure all states (structured and unstructured) get UUID
- Fix type checking in _create_initial_state method

Co-Authored-By: Joe Moura <joao@crewai.com>

* docs: update documentation to reflect automatic UUID generation in flow states

Co-Authored-By: Joe Moura <joao@crewai.com>

* fix: sort imports in flow.py

Co-Authored-By: Joe Moura <joao@crewai.com>

* fix: sort imports according to PEP 8

Co-Authored-By: Joe Moura <joao@crewai.com>

* fix: auto-fix import sorting with ruff

Co-Authored-By: Joe Moura <joao@crewai.com>

* test: add comprehensive tests for flow state UUID 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:44 +00:00
Brandon Hancock
8617b46ac2 add important missing parts to creating tools 2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
717452d640 Brandon/eng 290 make tool inputs actual objects and not strings (#1868)
* Improving tool calling to pass dictionaries instead of strings

* Fix issues with parsing none/null

* remove prints and unnecessary comments

* Fix crew_test issues with function calling

* improve prompting

* add back in support for add_image

* add tests for tool validation

* revert back to figure out why tests are timing out

* Update cassette

* trying to find what is timing out

* add back in guardrails

* add back in manager delegation tests

* Trying to fix tests

* Force test to pass

* Trying to fix tests

* add in more role tests

* add back old tool validation

* updating tests

* vcr

* Fix tests

* improve function llm logic

* vcr 2

* drop llm

* Failing test

* add more tests back in

* Revert tool validation
2025-02-09 23:56:44 +00:00
Tony Kipkemboi
fe0f4cb308 docs: roll back modify crew.py example 2025-02-09 23:56:44 +00:00
Tony Kipkemboi
ea40269990 docs: enhance decorator documentation and update LLM syntax 2025-02-09 23:56:44 +00:00
Brandon Hancock (bhancock_ai)
30eda147bd Fixed core invoke loop logic and relevant tests (#1865)
* Fixed core invoke loop logic and relevant tests

* Fix failing tests

* Clean up final print statements

* Additional clean up for PR review
2025-02-09 23:56:44 +00:00