Skip to content

Commit

Permalink
Trying out timeouts (#1840)
Browse files Browse the repository at this point in the history
* Make tests green again

* Add Git validations for publishing tools  (#1381)

This commit prevents tools from being published if the underlying Git
repository is unsynced with origin.

* fix: JSON encoding date objects (#1374)

* Update README  (#1376)

* Change all instaces of crewAI to CrewAI and fix installation step

* Update the  example to use YAML format

* Update  to come after setup and edits

* Remove double tool instance

* docs: correct miswritten command name (#1365)

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* Add `--force` option to `crewai tool publish` (#1383)

This commit adds an option to bypass Git remote validations when
publishing tools.

* add plotting to flows documentation (#1394)

* Brandon/cre 288 add telemetry to flows (#1391)

* Telemetry for flows

* store node names

* Brandon/cre 291 flow improvements (#1390)

* Implement joao feedback

* update colors for crew nodes

* clean up

* more linting clean up

* round legend corners

---------

Co-authored-by: João Moura <[email protected]>

* quick fixes (#1385)

* quick fixes

* add generic name

---------

Co-authored-by: João Moura <[email protected]>

* reduce import time by 6x (#1396)

* reduce import by 6x

* fix linting

* Added version details (#1402)

Co-authored-by: João Moura <[email protected]>

* Update twitter logo to x-twiiter (#1403)

* fix task cloning error (#1416)

* Migrate docs from MkDocs to Mintlify (#1423)

* add new mintlify docs

* add favicon.svg

* minor edits

* add github stats

* Fix/logger - fix #1412 (#1413)

* improved logger

* log file looks better

* better lines written to log file

---------

Co-authored-by: João Moura <[email protected]>

* fixing tests

* preparing new version

* updating init

* Preparing new version

* Trying to fix linting and other warnings (#1417)

* Trying to fix linting

* fixing more type issues

* clean up ci

* more ci fixes

---------

Co-authored-by: Eduardo Chiarotti <[email protected]>

* Feat/poetry to uv migration (#1406)

* feat: Start migrating to UV

* feat: add uv to flows

* feat: update docs on Poetry -> uv

* feat: update docs and uv.locl

* feat: update tests and github CI

* feat: run ruff format

* feat: update typechecking

* feat: fix type checking

* feat: update python version

* feat: type checking gic

* feat: adapt uv command to run the tool repo

* Adapt tool build command to uv

* feat: update logic to let only projects with crew to be deployed

* feat: add uv to tools

* fix; tests

* fix: remove breakpoint

* fix :test

* feat: add crewai update to migrate from poetry to uv

* fix: tests

* feat: add validation for ˆ character on pyproject

* feat: add run_crew to pyproject if doesnt exist

* feat: add validation for poetry migration

* fix: warning

---------

Co-authored-by: Vinicius Brasil <[email protected]>

* fix: training issue (#1433)

* fix: training issue

* fix: output from crew

* fix: message

* Use a slice for the manager request. Make the task use the agent i18n settings (#1446)

* Fix Cache Typo in Documentation (#1441)

* Correct the role for the message being added to the messages list (#1438)

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* fix typo in template file (#1432)

* Adapt Tools CLI to uv (#1455)

* Adapt Tools CLI to UV

* Fix failing test

* use the same i18n as the agent for tool usage (#1440)

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* Upgrade docs to mirror change from `Poetry` to `UV` (#1451)

* Update docs to use  instead of

* Add Flows YouTube tutorial & link images

* feat: ADd warning from poetry -> uv (#1458)

* feat/updated CLI to allow for model selection & submitting API keys (#1430)

* updated CLI to allow for submitting API keys

* updated click prompt to remove default number

* removed all unnecessary comments

* feat: implement crew creation CLI command

- refactor code to multiple functions
- Added ability for users to select provider and model when uing crewai create command and ave API key to .env

* refactered select_choice function for early return

* refactored  select_provider to have an ealry return

* cleanup of comments

* refactor/Move functions into utils file, added new provider file and migrated fucntions thre, new constants file + general function refactor

* small comment cleanup

* fix unnecessary deps

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>
Co-authored-by: Brandon Hancock <[email protected]>

* Fix incorrect parameter name in Vision tool docs page (#1461)

Co-authored-by: João Moura <[email protected]>

* 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

* preparing new version

* fixing annotations

* fix tasks and agents ordering

* Avoiding exceptions

* feat: add poetry.lock to uv migration (#1468)

* fix tool calling issue (#1467)

* fix tool calling issue

* Update tool type check

* Drop print

* cutting new version

* new verison

* 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/

* fix(docs): typo (#1470)

* drop unneccesary tests (#1484)

* drop uneccesary tests

* fix linting

* simplify flow (#1482)

* simplify flow

* propogate changes

* Update docs and scripts

* Template fix

* make flow kickoff sync

* Clean up docs

* Add Cerebras LLM example configuration to LLM docs (#1488)

* ensure original embedding config works (#1476)

* ensure original embedding config works

* some fixes

* raise error on unsupported provider

* WIP: brandons notes

* fixes

* rm prints

* fixed docs

* fixed run types

* updates to add more docs and correct imports with huggingface embedding server enabled

---------

Co-authored-by: Brandon Hancock <[email protected]>

* 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

* preparing new verison

* fix/fixed missing API prompt + CLI docs update (#1464)

* updated CLI to allow for submitting API keys

* updated click prompt to remove default number

* removed all unnecessary comments

* feat: implement crew creation CLI command

- refactor code to multiple functions
- Added ability for users to select provider and model when uing crewai create command and ave API key to .env

* refactered select_choice function for early return

* refactored  select_provider to have an ealry return

* cleanup of comments

* refactor/Move functions into utils file, added new provider file and migrated fucntions thre, new constants file + general function refactor

* small comment cleanup

* fix unnecessary deps

* Added docs for new CLI provider + fixed missing API prompt

* Minor doc updates

* allow user to bypass api key entry + incorect number selected logic + ruff formatting

* ruff updates

* Fix spelling mistake

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>
Co-authored-by: Brandon Hancock <[email protected]>

* chore(readme-fix): fixing step for 'running tests' in the contribution section (#1490)

Co-authored-by: Eduardo Chiarotti <[email protected]>

* support unsafe code execution. add in docker install and running checks. (#1496)

* support unsafe code execution. add in docker install and running checks.

* Update return type

* Fix memory imports for embedding functions (#1497)

* updating crewai version

* new version

* new version

* update plot command (#1504)

* feat: add tomli so we can support 3.10 (#1506)

* feat: add tomli so we can support 3.10

* feat: add validation for poetry data

* Forward install command options to `uv sync` (#1510)

Allow passing additional options from `crewai install` directly to
`uv sync`. This enables commands like `crewai install --locked` to work
as expected by forwarding all flags and options to the underlying uv
command.

* improve tool text description and args (#1512)

* improve tool text descriptoin and args

* fix lint

* Drop print

* add back in docstring

* Improve tooling docs

* Update flow docs to talk about self evaluation example

* Update flow docs to talk about self evaluation example

* Update flows.mdx - Fix link

* 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

* Bugfix/flows with multiple starts plus ands breaking (#1531)

* bugfix/flows-with-multiple-starts-plus-ands-breaking

* fix user found issue

* remove prints

* prepare new version

* Added security.md file (#1533)

* Disable telemetry explicitly (#1536)

* Disable telemetry explicitly

* fix linting

* revert parts to og

* Enhance log storage to support more data types (#1530)

* Add llm providers accordion group (#1534)

* add llm providers accordion group

* fix numbering

* 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.

* 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 <[email protected]>
Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* Update docs  (#1550)

* add llm providers accordion group

* fix numbering

* Fix directory tree & add llms to accordion

* Feat/ibm memory (#1549)

* Everything looks like its working. Waiting for lorenze review.

* Update docs as well.

* clean up for PR

* add inputs to flows (#1553)

* add inputs to flows

* fix flows lint

* Increase providers fetching timeout

* Raise an error if an LLM doesnt return a response (#1548)

* docs update (#1558)

* add llm providers accordion group

* fix numbering

* Fix directory tree & add llms to accordion

* update crewai enterprise link in docs

* Feat/watson in cli (#1535)

* getting cli and .env to work together for different models

* support new models

* clean up prints

* Add support for cerebras

* Fix watson keys

* Fix flows to support cycles and added in test (#1556)

* fix missing config (#1557)

* making sure we don't check for agents that were not used in the crew

* preparing new version

* updating LLM docs

* preparing new version

* curring new version

* preparing new version

* preparing new version

* add missing init

* fix LiteLLM callback replacement

* fix test_agent_usage_metrics_are_captured_for_hierarchical_process

* removing prints

* fix: Step callback issue (#1595)

* fix: Step callback issue

* fix: Add empty thought since its required

* Cached prompt tokens on usage metrics

* do not include cached on total

* Fix crew_train_success test

* feat: Reduce level for Bandit and fix code to adapt (#1604)

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: João Moura <[email protected]>
Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* upgrade chroma and adjust embedder function generator (#1607)

* upgrade chroma and adjust embedder function generator

* >= version

* linted

* preparing enw version

* adding before and after crew

* Update CLI Watson supported models + docs (#1628)

* docs: add gh_token documentation to GithubSearchTool

* Move kickoff callbacks to crew's domain

* Cassettes

* Make mypy happy

* 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 <[email protected]>
Co-authored-by: Lorenze Jay <[email protected]>

* Updated README.md, fix typo(s) (#1637)

* Update Perplexity example in documentation (#1623)

* Fix threading

* preparing new version

* 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.

* add knowledge to mint.json

* 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

* Update Github actions (#1639)

* actions/checkout@v4

* actions/cache@v4

* actions/setup-python@v5

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* update (#1638)

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* fix spelling issue found by @Jacques-Murray (#1660)

* Update readme for running mypy (#1614)

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* 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

* Feat/remove langchain (#1668)

* 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

* fix tool calling for langchain tools

* doc strings

---------

Co-authored-by: Eduardo Chiarotti <[email protected]>

* 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

* Update Agents docs to include two approaches for creating an agent: with and without YAML configuration

* Documentation Improvements: LLM Configuration and Usage (#1684)

* docs: improve tasks documentation clarity and structure

- Add Task Execution Flow section
- Add variable interpolation explanation
- Add Task Dependencies section with examples
- Improve overall document structure and readability
- Update code examples with proper syntax highlighting

* docs: update agent documentation with improved examples and formatting

- Replace DuckDuckGoSearchRun with SerperDevTool
- Update code block formatting to be consistent
- Improve template examples with actual syntax
- Update LLM examples to use current models
- Clean up formatting and remove redundant comments

* docs: enhance LLM documentation with Cerebras provider and formatting improvements

* docs: simplify LLMs documentation title

* docs: improve installation guide clarity and structure

- Add clear Python version requirements with check command
- Simplify installation options to recommended method
- Improve upgrade section clarity for existing users
- Add better visual structure with Notes and Tips
- Update description and formatting

* docs: improve introduction page organization and clarity

- Update organizational analogy in Note section
- Improve table formatting and alignment
- Remove emojis from component table for cleaner look
- Add 'helps you' to make the note more action-oriented

* docs: add enterprise and community cards

- Add Enterprise deployment card in quickstart
- Add community card focused on open source discussions
- Remove deployment reference from community description
- Clean up introduction page cards
- Remove link from Enterprise description text

* Fixes issues with result as answer not properly exiting LLM loop (#1689)

* v1 of fix implemented. Need to confirm with tokens.

* remove print statements

* preparing new version

* fix missing code in flows docs (#1690)

* docs: improve tasks documentation clarity and structure

- Add Task Execution Flow section
- Add variable interpolation explanation
- Add Task Dependencies section with examples
- Improve overall document structure and readability
- Update code examples with proper syntax highlighting

* docs: update agent documentation with improved examples and formatting

- Replace DuckDuckGoSearchRun with SerperDevTool
- Update code block formatting to be consistent
- Improve template examples with actual syntax
- Update LLM examples to use current models
- Clean up formatting and remove redundant comments

* docs: enhance LLM documentation with Cerebras provider and formatting improvements

* docs: simplify LLMs documentation title

* docs: improve installation guide clarity and structure

- Add clear Python version requirements with check command
- Simplify installation options to recommended method
- Improve upgrade section clarity for existing users
- Add better visual structure with Notes and Tips
- Update description and formatting

* docs: improve introduction page organization and clarity

- Update organizational analogy in Note section
- Improve table formatting and alignment
- Remove emojis from component table for cleaner look
- Add 'helps you' to make the note more action-oriented

* docs: add enterprise and community cards

- Add Enterprise deployment card in quickstart
- Add community card focused on open source discussions
- Remove deployment reference from community description
- Clean up introduction page cards
- Remove link from Enterprise description text

* docs: add code snippet to Getting Started section in flows.mdx

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* Update reset memories command based on the SDK (#1688)

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* Update using langchain tools docs (#1664)

* Update example of how to use LangChain tools with correct syntax

* Use .env

* Add  Code back

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* [FEATURE] Support for custom path in RAGStorage (#1659)

* added path to RAGStorage

* added path to short term and entity memory

* add path for long_term_storage for completeness

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* [Doc]: Add documenation for openlit observability (#1612)

* Create openlit-observability.mdx

* Update doc with images and steps

* Update mkdocs.yml and add OpenLIT guide link

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* Fix indentation in llm-connections.mdx code block (#1573)

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* Knowledge project directory standard (#1691)

* Knowledge project directory standard

* fixed types

* comment fix

* made base file knowledge source an abstract class

* cleaner validator on model_post_init

* fix type checker

* cleaner refactor

* better template

* Update README.md (#1694)

Corrected the statement which says users can not disable telemetry, but now users can disable by setting the environment variable OTEL_SDK_DISABLED to true.

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* Talk about getting structured consistent outputs with tasks.

* remove all references to pipeline and pipeline router (#1661)

* remove all references to pipeline and router

* fix linting

* drop poetry.lock

* docs: add nvidia as provider (#1632)

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* add knowledge demo + improve knowledge docs (#1706)

* 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

* New docs about yaml crew with decorators. Simplify template crew with… (#1701)

* New docs about yaml crew with decorators. Simplify template crew with links

* Fix spelling issues.

* updating tools

* curting new verson

* 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

* drop metadata requirement (#1712)

* drop metadata requirement

* fix linting

* Update docs for new knowledge

* more linting

* more linting

* make save_documents private

* update docs to the new way we use knowledge and include clearing memory

* add support for langfuse with litellm (#1721)

* docs: Add quotes to agentops installing command (#1729)

* docs: Add quotes to agentops installing command

* feat: Add ContextualMemory to __init__

* feat: remove import due to circular improt

* feat: update tasks config main template typos

* Fixed output_file not respecting system path (#1726)

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* fix:typo error (#1732)

* Update crew_agent_executor.py

typo error

* Update en.json

typo error

* Fix Knowledge docs Spaceflight News API dead link

* call storage.search in user context search instead of memory.search (#1692)

Co-authored-by: Eduardo Chiarotti <[email protected]>

* Add doc structured tool (#1713)

* Add doc structured tool

* Fix example

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* _execute_tool_and_check_finality 结果给回调参数,这样就可以提前拿到结果信息,去做数据解析判断做预判 (#1716)

Co-authored-by: xiaohan <[email protected]>
Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* format bullet points (#1734)

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* Add missing @functools.wraps when wrapping functions and preserve wrapped class name in @CrewBase. (#1560)

* Update annotations.py

* Update utils.py

* Update crew_base.py

* Update utils.py

* Update crew_base.py

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* Fix disk I/O error when resetting short-term memory. (#1724)

* Fix disk I/O error when resetting short-term memory.

Reset chromadb client and nullifies references before
removing directory.

* Nit for clarity

* did the same for knowledge_storage

* cleanup

* cleanup order

* Cleanup after the rm of the directories

---------

Co-authored-by: Lorenze Jay <[email protected]>
Co-authored-by: Lorenze Jay <[email protected]>

* 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

* Bugfix/restrict python version compatibility (#1736)

* drop 3.13

* revert

* Drop test cassette that was causing error

* trying to fix failing test

* adding thiago changes

* resolve final tests

* Drop skip

* drop pipeline

* Update pyproject.toml and uv.lock to drop crewai-tools as a default requirement (#1711)

* copy googles changes. Fix tests. Improve LLM file (#1737)

* copy googles changes. Fix tests. Improve LLM file

* Fix type issue

* 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) <[email protected]>

* Remove manager_callbacks reference (#1741)

* include event emitter in flows (#1740)

* include event emitter in flows

* Clean up

* Fix linter

* sort imports with isort rules by ruff linter (#1730)

* sort imports

* update

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>
Co-authored-by: Eduardo Chiarotti <[email protected]>

* Added is_auto_end flag in agentops.end session in crew.py (#1320)

When using agentops, we have the option to pass the `skip_auto_end_session` parameter, which is supposed to not end the session if the `end_session` function is called by Crew.

Now the way it works is, the `agentops.end_session` accepts `is_auto_end` flag and crewai should have passed it as `True` (its `False` by default). 

I have changed the code to pass is_auto_end=True

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* NVIDIA Provider : UI changes (#1746)

* docs: add nvidia as provider

* nvidia ui docs changes

* add note for updated list

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* Fix small typo in sample tool (#1747)

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* Feature/add workflow permissions (#1749)

* fix: Call ChromaDB reset before removing storage directory to fix disk I/O errors

* feat: add workflow permissions to stale.yml

* revert rag_storage.py changes

* revert rag_storage.py changes

---------

Co-authored-by: Matt B <[email protected]>
Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* remove pkg_resources which was causing issues (#1751)

* 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 <[email protected]>

* drop print (#1755)

* Fix: CrewJSONEncoder now accepts enums (#1752)

* bugfix: CrewJSONEncoder now accepts enums

* sort imports

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* Fix bool and null handling (#1771)

* include 12 but not 13

* change to <13 instead of <=12

* Gemini 2.0 (#1773)

* Update llms.mdx (Gemini 2.0)

- Add Gemini 2.0 flash to Gemini table.
- Add link to 2 hosting paths for Gemini in Tip.
- Change to lower case model slugs vs names, user convenience.
- Add https://artificialanalysis.ai/ as alternate leaderboard.
- Move Gemma to "other" tab.

* Update llm.py (gemini 2.0)

Add setting for Gemini 2.0 context window to llm.py

---------

Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* Remove relative import in flow `main.py` template (#1782)

* Add `tool.crewai.type` pyproject attribute in templates (#1789)

* 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 <[email protected]>
Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>

* 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 <[email protected]>

* fix: Add type check for guardrail result and remove unused import

Co-Authored-By: Joe Moura <[email protected]>

* fix: Remove unnecessary f-string prefix

Co-Authored-By: Joe Moura <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* refactor: Update guardrail functions to handle TaskOutput objects

Co-Authored-By: Joe Moura <[email protected]>

* 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 <[email protected]>

* fix: Add type check for guardrail result and remove unused import

Co-Authored-By: Joe Moura <[email protected]>

* fix: Remove unnecessary f-string prefix

Co-Authored-By: Joe Moura <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* refactor: Update guardrail functions to handle TaskOutput objects

Co-Authored-By: Joe Moura <[email protected]>

* style: Fix import sorting in task guardrails files

Co-Authored-By: Joe Moura <[email protected]>

* fixing docs

* Fixing guardarils implementation

* docs: Enhance guardrail validator docstring with runtime validation rationale

Co-Authored-By: Joe Moura <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <[email protected]>
Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>
Co-authored-by: João Moura <[email protected]>

* 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 <[email protected]>

* fix: Sort imports to fix lint issues

Co-Authored-By: Joe Moura <[email protected]>

* fix: Reorganize imports using ruff --fix

Co-Authored-By: Joe Moura <[email protected]>

* fix: Consolidate imports and fix formatting

Co-Authored-By: Joe Moura <[email protected]>

* fix: Apply ruff automatic import sorting

Co-Authored-By: Joe Moura <[email protected]>

* fix: Sort imports using ruff --fix

Co-Authored-By: Joe Moura <[email protected]>

---------

Co-authored-by: Frieda (Jingying) Huang <[email protected]>
Co-authored-by: Brandon Hancock (bhancock_ai) <[email protected]>
Co-authored-by: Frieda Huang <[email protected]>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <[email protected]>

* 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) <[email protected]>
Co-authored-by: Brandon Hancock <[email protected]>

* removed some redundancies (#1796)

* removed some redundancies

* cleanup

* 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 <[email protected]>

* 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 ef323e3487e62ee4f5bce7f86378068a5ac77e16.

* fix linters

* test

* fix

* fix

* fix linter

* fix

* ignore

* type improvements

* chore: removing crewai-tools from dev-dependencies (#1760)

As mentioned in issue #1759, listing crewai-tools as dev-dependencies makes pip install it a required dependency, and not an optional

Co-authored-by: João Moura <[email protected]>

* docs: add guide for multimodal agents (#1807)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <[email protected]>

* Portkey Integration with CrewAI (#1233)

* Create Portkey-Observability-and-Guardrails.md

* crewAI update with new changes

* small change

---------

Co-authored-by: siddharthsambharia-portkey <[email protected]>
Co-authored-by: João Moura <[email protected]>

* fix: Change storage initialization to None for KnowledgeStorage (#1804)

* fix: Change storage initialization to None for KnowledgeStorage

* refactor: Change storage field to optional and improve error handling when saving documents

---------

Co-authored-by: João Moura <[email protected]>

* fix: handle optional storage with null checks (#1808)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: João Moura <[email protected]>

* docs: update README to highlight Flows (#1809)

* docs: highlight Flows feature in README

Co-Authored-By: Joe Moura <[email protected]>

* docs: enhance README with LangGraph comparison and flows-crews synergy

Co-Authored-By: Joe Moura <[email protected]>

* docs: replace initial Flow example with advanced Flow+Crew example; enhance LangGraph comparison

Co-Authored-By: Joe Moura <[email protected]>

* docs: incorporate key terms and enhance feature descriptions

Co-Authored-By: Joe Moura <[email protected]>

* docs: refine technical language, enhance feature descriptions, fix string interpolation

Co-Authored-By: Joe Moura <[email protected]>

* docs: update README with performance metrics, feature enhancements, and course links

Co-Authored-By: Joe Moura <[email protected]>

* docs: update LangGraph comparison with paragraph and P.S. section

Co-Authored-By: Joe Moura <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <[email protected]>

* Update README.md

* docs: add agent-specific knowledge documentation and examples (#1811)

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <[email protected]>

* fixing file paths for knowledge source

* Fix interpolation for output_file in Task (#1803) (#1814)

* fix: interpolate output_file attribute from YAML

Co-Authored-By: Joe Moura <[email protected]>

* fix: add security validation for output_file paths

Co-Authored-By: Joe Moura <[email protected]>

* fix: add _original_output_file private attribute to fix type-checker error

Co-Authored-By: Joe Moura <[email protected]>

* fix: update interpolate_only to handle None inputs and remove duplicate attribute

Co-Authored-By: Joe Moura <[email protected]>

* fix: improve output_file validation and error messages

Co-Authored-By: Joe Moura <[email protected]>

* test: add end-to-end tests for output_file functionality

Co-Authored-By: Joe Moura <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <[email protected]>

* fix(manager_llm): handle coworker role name case/whitespace properly (#1820)

* fix(manager_llm): handle coworker role name case/whitespace properly

- Add .strip() to agent name and role comparisons in base_agent_tools.py
- Add test case for varied role name cases and whitespace
- Fix issue #1503 with manager LLM delegation

Co-Authored-By: Joe Moura <[email protected]>

* fix(manager_llm): improve error handling and add debug logging

- Add debug logging for better observability
- Add sanitize_agent_name helper method
- Enhance error messages with more context
- Add parameterized tests for edge cases:
  - Embedded quotes
  - Trailing newlines
  - Multiple whitespace
  - Case variations
  - None values
- Improve error handling with specific exceptions

Co-Authored-By: Joe Moura <[email protected]>

* style: fix import sorting in base_agent_tools and test_manager_llm_delegation

Co-Authored-By: Joe Moura <[email protected]>

* fix(manager_llm): improve whitespace normalization in role name matching

Co-Authored-By: Joe Moura <[email protected]>

* style: fix import sorting in base_agent_tools and test_manager_llm_delegation

Co-Authored-By: Joe Moura <[email protected]>

* fix(manager_llm): add error message template for agent tool execution errors

Co-Authored-By: Joe Moura <[email protected]>

* style: fix import sorting in test_manager_llm_delegation.py

Co-Authored-By: Joe Moura <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <[email protected]>

* fix: add tiktoken as explicit dependency and document Rust requirement (#1826)

* feat: add tiktoken as explicit dependency and document Rust requirement

- Add tiktoken>=0.8.0 as explicit dependency to ensure pre-built wheels are used
- Document Rust compiler requirement as fallback in README.md
- Addresses issue #1824 tiktoken build failure

Co-Authored-By: Joe Moura <[email protected]>

* fix: adjust tiktoken version to ~=0.7.0 for dependency compatibility

- Update tiktoken dependency to ~=0.7.0 to resolve conflict with embedchain
- Maintain compatibility with crewai-tools dependency chain
- Addresses CI build failures

Co-Authored-By: Joe Moura <[email protected]>

* docs: add troubleshooting section and make tiktoken optional

Co-Authored-By: Joe Moura <[email protected]>

* Update README.md

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <[email protected]>
Co-authored-by: João Moura <[email protected]>

* Docstring, Error Handling, and Type Hints Improvements (#1828)

* docs: add comprehensive docstrings to Flow class and methods

- Added NumPy-style docstrings to all decorator functions
- Added detailed documentation to Flow class methods
- Included parameter types, return types, and examples
- Enhanced documentation clarity and completeness

Co-Authored-By: Joe Moura <[email protected]>

* feat: add secure path handling utilities

- Add path_utils.py with safe path handling functions
- Implement path validation and security checks
- Integrate secure path handling in flow_visualizer.py
- Add path validation in html_template_handler.py
- Add comprehensive error handling for path operations

Co-Authored-By: Joe Moura <[email protected]>

* docs: add comprehensive docstrings and type hints to flow utils (#1819)

Co-Authored-By: Joe Moura <[email protected]>

* fix: add type annotations and fix import sorting

Co-Authored-By: Joe Moura <[email protected]>

* fix: add type annotations to flow utils and visualization utils

Co-Authored-By: Joe Moura <[email protected]>

* fix: resolve import sorting and type annotation issues

Co-Authored-By: Joe Moura <[email protected]>

* fix: properly initialize and update edge_smooth variable

Co-Authored-By: Joe Moura <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <[email protected]>

* feat: add docstring (#1819)

Co-authored-by: João Moura <[email protected]>

* fix: Include agent knowledge in planning process (#1818)

* test: Add test demonstrating knowledge not included in planning process

Issue #1703: Add test to verify that agent knowledge sources are not currently
included in the planning process. This test will help validate the fix once
implemented.

- Creates agent with knowledge sources
- Verifies knowledge context missing from planning
- Checks other expected components are present

Co-Authored-By: Joe Moura <[email protected]>

* fix: Include agent knowledge in planning process

Issue #1703: Integrate agent knowledge sources into planning summaries
- Add agent_knowledge field to task summaries in planning_handler
- Update test to verify knowledge inclusion
- Ensure knowledge context is available during planning phase

The planning agent now has access to agent knowledge when creating
task execution plans, allowing for better informed planning decisions.

Co-Authored-By: Joe Moura <[email protected]>

* style: Fix import sorting in test_knowledge_planning.py

- Reorganize imports according to ruff linting rules
- Fix I001 linting error

Co-Authored-By: Joe Moura <[email protected]>

* test: Update task summary assertions to include knowledge field

Co-Authored-By: Joe Moura <[email protected]>

* fix: Update ChromaDB mock path and fix knowledge string formatting

Co-Authored-By: Joe Moura <[email protected]>

* fix: Improve knowledge integration in planning process with error handling

Co-Authored-By: Joe Moura <[email protected]>

* fix: Update task summary format for empty tools and knowledge

- Change empty tools message to 'agent has no tools'
- Remove agent_knowledge field when empty
- Update test assertions to match new format
- Improve test messages for clarity

Co-Authored-By: Joe Moura <[email protected]>

* fix: Update string formatting for agent tools in task summary

Co-Authored-By: Joe Moura <[email protected]>

* fix: Update string formatting for agent tools in task summary

Co-Authored-By: Joe Moura <[email protected]>

* fix: Update string formatting for agent tools and knowledge in task summary

Co-Authored-By: Joe Moura <[email protected]>

* fix: Update knowledge field formatting in task summary

Co-Authored-By: Joe Moura <[email protected]>

* style: Fix import sorting in test_planning_handler.py

Co-Authored-By: Joe Moura <[email protected]>

* style: Fix import sorting order in test_planning_handler.py

Co-Authored-By: Joe Moura <[email protected]>

* test: Add ChromaDB mocking to test_create_tasks_summary_with_knowledge_and_tools

Co-Authored-By: Joe Moura <[email protected]>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <[email protected]>
Co-authored-by: João Moura <[email protected]>

* Suppressed userWarnings from litellm pydantic issues (#1833)

* Suppressed userWarnings from litellm pydantic issues

* change litellm version

* Fix failling ollama tasks

* Trying out timeouts

* Trying out timeouts

* trying next crew_test timeout

* trying next crew_test timeout

* timeout in crew_tests

* timeout in crew_tests

* more timeouts

* more timeouts

* crew_test changes werent applied

* crew_test changes werent applied

* revert uv.lock

* revert uv.lock

* add back in crewai tool dependencies and drop litellm version

* add back in crewai tool dependencies and drop litellm version

* tests should work now

* tests should work now

* more test changes

* more test changes

* Reverting uv.lock and pyproject

* Reverting uv.lock and pyproject

* Update llama3 cassettes

* Update llama3 cassettes

* sync packages with uv.lock

* sync packages with uv.lock

* more test fixes

* fix tets

* drop large file

* final clean up

* drop record new episodes

---------

Signed-off-by: PJ Hagerty <[email protected]>
Co-authored-by: Thiago Moretto <[email protected]>
Co-authored-by: Thiago Moretto <[email protected]>
Co-authored-by: Vini Brasil <[email protected]>
Co-authored-by: Guilherme de Amorim <[email protected]>
Co-authored-by: Tony Kipkemboi <[email protected]>
Co-authored-by: Eren Küçüker <[email protected]>
Co-authored-by: João Moura <[email protected]>
Co-authored-by: Akesh kumar <[email protected]>
Co-authored-by: Lennex Zinyando <[email protected]>
Co-authored-by: Shahar Yair <[email protected]>
Co-authored-by: Eduardo Chiarotti <[email protected]>
Co-authored-by: Stephen Hankinson <[email protected]>
Co-authored-by: Muhammad Noman Fareed <[email protected]>
Co-authored-by: dbubel <[email protected]>
Co-authored-by: Rip&Tear <[email protected]>
Co-authored-by: Rok Benko <[email protected]>
Co-authored-by: Lorenze Jay <[email protected]>
Co-authored-by: Sam <[email protected]>
Co-authored-by: Maicon Peixinho <[email protected]>
Co-authored-by: Robin Wang <[email protected]>
Co-authored-by: C0deZ <[email protected]>
Co-authored-by: c0dez <[email protected]>
Co-authored-by: Gui Vieira <[email protected]>
Co-authored-by: Dev Khant <[email protected]>
Co-authored-by: Deshraj Yadav <[email protected]>
Co-authored-by: Gui Vieira <[email protected]>
Co-authored-by: Lorenze Jay <[email protected]>
Co-authored-by: Bob Conan <[email protected]>
Co-authored-by: Andy Bromberg <[email protected]>
Co-authored-by: Bowen Liang <[email protected]>
Co-authored-by: Ivan Peevski <[email protected]>
Co-authored-by: Rok Benko <[email protected]>
Co-authored-by: Javier Saldaña <[email protected]>
Co-authored-by: Ola Hungerford <[email protected]>
Co-authored-by: Tom Mahler, PhD <[email protected]>
Co-authored-by: Patcher <[email protected]>
Co-authored-by: Feynman Liang <[email protected]>
Co-authored-by: Stephen <[email protected]>
Co-authored-by: Rashmi Pawar <[email protected]>
Co-authored-by: Frieda Huang <[email protected]>
Co-authored-by: Archkon <[email protected]>
Co-authored-by: Aviral Jain <[email protected]>
Co-authored-by: lgesuellip <[email protected]>
Co-authored-by: fuckqqcom <[email protected]>
Co-authored-by: xiaohan <[email protected]>
Co-authored-by: Piotr Mardziel <[email protected]>
Co-authored-by: Carlos Souza <[email protected]>
Co-authored-by: Paul Cowgill <[email protected]>
Co-authored-by: Bowen Liang <[email protected]>
Co-authored-by: Anmol Deep <[email protected]>
Co-authored-by: André Lago <[email protected]>
Co-authored-by: Matt B <[email protected]>
Co-authored-by: Karan Vaidya <[email protected]>
Co-authored-by: alan blount <[email protected]>
Co-authored-by: PJ <[email protected]>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Joe Moura <[email protected]>
Co-authored-by: Frieda (Jingying) Huang <[email protected]>
Co-authored-by: João Igor <[email protected]>
Co-authored-by: siddharth Sambharia <[email protected]>
Co-authored-by: siddharthsambharia-portkey <[email protected]>
Co-authored-by: Erick Amorim <[email protected]>
Co-authored-by: Marco Vinciguerra <[email protected]>
  • Loading branch information
Show file tree
Hide file tree
Showing 12 changed files with 344 additions and 2,356 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies = [
# Core Dependencies
"pydantic>=2.4.2",
"openai>=1.13.3",
"litellm>=1.56.4",
"litellm>=1.44.22",
"instructor>=1.3.3",

# Text Processing
Expand Down
6 changes: 4 additions & 2 deletions tests/agent_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ def test_agent_with_ollama_llama3():
assert agent.llm.model == "ollama/llama3.2:3b"
assert agent.llm.base_url == "http://localhost:11434"

task = "Respond in 20 words. Who are you?"
task = "Respond in 20 words. Which model are you?"
response = agent.llm.call([{"role": "user", "content": task}])

assert response
Expand All @@ -1473,7 +1473,9 @@ def test_llm_call_with_ollama_llama3():
temperature=0.7,
max_tokens=30,
)
messages = [{"role": "user", "content": "Respond in 20 words. Who are you?"}]
messages = [
{"role": "user", "content": "Respond in 20 words. Which model are you?"}
]

response = llm.call(messages)

Expand Down
864 changes: 18 additions & 846 deletions tests/cassettes/test_agent_execute_task_with_ollama.yaml

Large diffs are not rendered by default.

865 changes: 19 additions & 846 deletions tests/cassettes/test_agent_with_ollama_llama3.yaml

Large diffs are not rendered by default.

451 changes: 19 additions & 432 deletions tests/cassettes/test_llm_call_with_ollama_llama3.yaml

Large diffs are not rendered by default.

9 changes: 5 additions & 4 deletions tests/cli/tools/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ def test_create_success(mock_subprocess):
with in_temp_dir():
tool_command = ToolCommand()

with patch.object(tool_command, "login") as mock_login, patch(
"sys.stdout", new=StringIO()
) as fake_out:
with (
patch.object(tool_command, "login") as mock_login,
patch("sys.stdout", new=StringIO()) as fake_out,
):
tool_command.create("test-tool")
output = fake_out.getvalue()

Expand Down Expand Up @@ -82,7 +83,7 @@ def test_install_success(mock_get, mock_subprocess_run):
capture_output=False,
text=True,
check=True,
env=unittest.mock.ANY
env=unittest.mock.ANY,
)

assert "Successfully installed sample-tool" in output
Expand Down
Loading

0 comments on commit 4bcc3b5

Please sign in to comment.