Skip to content

Enh - Use handoff_description as Default Fallback for Tool Description in as_tool() of agents #1199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Kunmeer-SyedMohamedHyder

Summary

Replaced the default fallback value for description_override in the as_tool() method of the Agent class from an empty string ("") to self.handoff_description. This ensures that when no explicit tool description is provided, the agent's handoff_description is used as a meaningful and human-readable default. This improves clarity, reduces the need for redundant arguments, and aligns with the DRY principle.

Issue number

Checks

  • I've added new tests (if relevant)
  • I've added/updated the relevant documentation
  • I've run make lint and make format
  • I've made sure tests pass

@seratch
Copy link
Member

seratch commented Jul 21, 2025

Thanks for sending this. Indeed, using an empty string as the default is not effective, but the handoff_description is meant to be used when the agent itself is the destination of the handoff. So, when this tool is used as a tool, the workflow differs.

I’m proposing to make the tool name and description required parameters to clarify things, as mentioned at #1174 (comment) I believe that’s the best way to configure agents as tools.

@Kunmeer-SyedMohamedHyder
Copy link
Author

Right! Makes sense. Like you have mentioned in the other PR, making name and description mandatory could be a breaking change. But if we are going ahead with the mandatory fields, this PR can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants