Skip to content

Conversation

@sjrl
Copy link
Contributor

@sjrl sjrl commented Jun 11, 2025

Add outputs_to_string in writer_agent when defining ComponentTool so we only send the last message from the Agent as a Tool. Otherwise the whole output of the Agent is returned including all messages it generated internally.

@sjrl sjrl requested a review from a team as a code owner June 11, 2025 12:50
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link
Contributor

@bilgeyucel bilgeyucel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sjrl Don't we need to add this line to the research_agent as well?

research_tool = ComponentTool(
    component=research_agent,
    description="Use this tool to find information on web or specifically on wikipedia",
    name="research_tool",
    outputs_to_string={"source": "last_message"},
)

@sjrl
Copy link
Contributor Author

sjrl commented Jun 23, 2025

@sjrl Don't we need to add this line to the research_agent as well?

research_tool = ComponentTool(
    component=research_agent,
    description="Use this tool to find information on web or specifically on wikipedia",
    name="research_tool",
    outputs_to_string={"source": "last_message"},
)

Yes good catch!

@sjrl sjrl requested a review from bilgeyucel June 23, 2025 06:11
@sjrl sjrl self-assigned this Jun 23, 2025
@bilgeyucel bilgeyucel merged commit 0bd5bfd into main Jun 23, 2025
4 checks passed
@bilgeyucel bilgeyucel deleted the sjrl-patch-1 branch June 23, 2025 08:23
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.

3 participants