Skip to content

Conversation

@Vidit-Ostwal
Copy link
Contributor

Fixes #2361

Issue: Whenever any tools is being used inside a crew with cli command crewai run.
This creates a virtual environment, which consider crewai_tools as an option dependency.

crewai_tools should be installed regardless of tools are used or not.

@joaomdmoura
Copy link
Collaborator

Disclaimer: This review was made by a crew of AI Agents.

Code Review for PR #2468

Overview

This pull request modifies the pyproject.toml file by moving crewai-tools from optional dependencies to core dependencies, thus making it required for installation. This change aims to enhance the functionality of the CrewAI package but raises some important considerations.

Detailed Analysis

Changes Made

The following adjustments have been made in pyproject.toml:

Dependency Management Changes

# Added to main dependencies
dependencies = [
    ...
    "crewai-tools>=0.37.0"
]

# Removed from optional dependencies
[project.optional-dependencies]
-tools = ["crewai-tools>=0.37.0"]

Advantages

  1. Consistent Availability: All users will have access to crewai-tools, preventing runtime errors related to missing optional dependencies.
  2. Simplified Installation: Users no longer need to specify optional tools, streamlining the installation process.

Potential Concerns

  1. Increased Installation Size: This makes the installation size larger, which could be an issue for users with limited storage.
  2. Mandatory Dependency: Users who do not need crewai-tools will still be required to install it, which may not be ideal for all users.

Recommendations

1. Documentation Updates

It is crucial to update the documentation to reflect the status change of crewai-tools. Here is a suggested addition for the README.md:

## Dependencies
CrewAI now includes `crewai-tools` (>= 0.37.0) as a core dependency, providing essential functionality without requiring additional installation steps.

2. Version Constraints

To mitigate potential future issues with breaking changes, consider specifying a more restricted version range:

dependencies = [
    ...
    "crewai-tools>=0.37.0,<0.38.0"
]

3. Migration Guide

Include migration notes in the CHANGELOG.md to assist users in transitioning from the previous setup:

## Breaking Changes
- `crewai-tools` is now a required dependency.
- Users previously relying on `pip install crewai[tools]` can now use `pip install crewai` directly.

4. Code Quality Improvement

Include a comment in the pyproject.toml justifying the inclusion of crewai-tools as a core dependency:

dependencies = [
    ...
    # CrewAI Tools - Core functionality for agent operations and task management
    "crewai-tools>=0.37.0"
]

5. Installation Instructions Update

Update the installation instructions in your documentation to make it clear that crewai-tools is now included by default.

Conclusion

The proposed changes to the dependency management in PR #2468 are well-structured and align with the overall goal of improving user experience by ensuring necessary tools are always available. Addressing the mentioned documentation updates, version constraints, and additional comments will significantly enhance the clarity and usability of this change. This PR can be approved following the implementation of these recommendations.

@gvcoder
Copy link

gvcoder commented Mar 26, 2025

Fixes #2361

Issue: Whenever any tools is being used inside a crew with cli command crewai run. This creates a virtual environment, which consider crewai_tools as an option dependency.

crewai_tools should be installed regardless of tools are used or not.

I have crewai_tools too in the virtual env

@lucasgomide lucasgomide self-requested a review April 28, 2025 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] ImportError with MYSQL

4 participants