crewAIInc / crewAI

Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks.
https://crewai.com
MIT License
20.74k stars 2.87k forks source link

[BUG] Agent can not have tools and allow_delegation together #1301

Closed hukaidong closed 3 weeks ago

hukaidong commented 1 month ago

Description

When an agent is having non-empty tools and allow_delegation=True together. Two delegation tool descriptions are not present in composed agent tasks.

Steps to Reproduce

  1. Pull and install latest crewAI (0.54.0)
  2. pip install agentops (tested version 0.3.10)
  3. Copy code in README.md section 2 into main.py
  4. Add line tools=[search_tool] in writer: Agent
  5. python main.py
  6. Look at generated prompt in agentops

Expected behavior

There should be 3 tools available for writer `[Delegate work to coworker, Ask question to coworker, Search the internet]

Screenshots/Code snippets

Agentobs shows only one tool available in prompt [Search the internet]

Operating System

Ubuntu 20.04

Python Version

3.12

crewAI Version

0.54.0

crewAI Tools Version

0.8.3

Virtual Environment

Venv

Evidence

You ONLY have access to the following tools, and should NEVER make up tools that are not listed here:

Tool Name: Search the internet(**kwargs: Any) -> Any Tool Description: Search the internet(search_query: 'string') - A tool that can be used to search the internet with a search_query. search_query: 'Mandatory search query you want to use to search the internet' Tool Arguments: {'search_query': {'title': 'Search Query', 'description': 'Mandatory search query you want to use to search the internet', 'type': 'string'}}

Use the following format:

Possible Solution

None

Additional context

Tested in docker ubuntu 20.04 and opensuse tumbleweed

hukaidong commented 1 month ago

The latest version not affected by this bug is 0.51.0.

github-actions[bot] commented 4 weeks ago

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 3 weeks ago

This issue was closed because it has been stalled for 5 days with no activity.