Skip to content

Conversation

@rodrigocoliveira
Copy link

When using external_execution=True, agents would produce verbose messages like "I have tools to execute, but it needs external execution." which creates a poor UX when tools are designed to be handled silently by the frontend (e.g., displaying confirmation cards).

This adds a silent parameter to the @tool decorator that, when True, suppresses both the content message and the Rich panel output.

Usage:

@tool(external_execution=True, silent=True)
def confirm_counter(current_value: int):
    pass

Summary

Describe key changes, mention related issues or motivation for the changes.

(If applicable, issue number: #____)

Type of change

  • [ x ] Bug fix
  • [ x ] New feature
  • Breaking change
  • Improvement
  • Model update
  • Other:

Checklist

  • Code complies with style guidelines
  • Ran format/validation scripts (./scripts/format.sh and ./scripts/validate.sh)
  • Self-review completed
  • Documentation updated (comments, docstrings)
  • Examples and guides: Relevant cookbook examples have been included or updated (if applicable)
  • Tested in clean environment
  • Tests added/updated (if applicable)

Additional Notes

Add any important context (deployment instructions, screenshots, security considerations, etc.)

When using `external_execution=True`, agents would produce verbose messages
like "I have tools to execute, but it needs external execution." which
creates a poor UX when tools are designed to be handled silently by the
frontend (e.g., displaying confirmation cards).

This adds a `silent` parameter to the `@tool` decorator that, when `True`,
suppresses both the content message and the Rich panel output.

Usage:
```python
@tool(external_execution=True, silent=True)
def confirm_counter(current_value: int):
    pass
```
@mishramonalisha76
Copy link
Contributor

Thanks @rodrigocoliveira for the raising a pr. We will check on this on our end too .

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

Labels

None yet

2 participants