Skip to content

[BUG] Agent Final Answer includes Agent Thought and Action #3873

@ninad-opsverse

Description

@ninad-opsverse

Description

The Agent Final Answer responds back with Agent Thought and Action instead of a proper response.

Context:
We use a heirarchial crew wherein a single manager agent delegates tasks to agents like Postgres Agent, MySQL Agent etc. If the task delegated to an Agent comes back with a failure message, then the Manager Agent often replies back with the thought and action fields instead of processing the delegated task response and formatting it properly in the final response.

Steps to Reproduce

Create a heirarchial crew where manager agent has 2-3 agents to delegate to (say postgres, mysql, etc). Give a query that the agent will possibly fail to execute and work on.

Check additional Context to see my crew setup.

Expected behavior

The agent should not respond back with the Thought and Action fields that seems to be internal to crewAI and not really required as part of the Agent Final Response.

Screenshots/Code snippets

Task provided for the crew was:
Fetch list of tables from postgres db

Image

Operating System

macOS Sonoma

Python Version

3.12

crewAI Version

0.165.0

crewAI Tools Version

0.62.3

Virtual Environment

Venv

Evidence

Image

Possible Solution

None

Additional context

I have designed a heirarchial crew with a manager agent having access to agents like Postgres Expert, MySQL Expert, etc. The

User task in this case was - Fetch list of tables from postgres db.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions