Skip to content

Conversation

@anuyog1004
Copy link

Description

Adds support for tags to tools, enabling them to be populated in the A2A AgentCard skill metadata.

Related Issues

Resolves #1261

Documentation PR

N/A. This is an additive feature to the existing @tool decorator. Usage is demonstrated in the PR description.

Type of Change

Bug fix

Testing

How have you tested the change?

  • All existing tests pass (1877 tests)
  • Added 4 new tests covering:
    • Tool decorator with tags
    • Tool decorator without tags (backward compatibility)
    • Tool decorator with multiple tags
    • A2A server tags propagation
  • Ran hatch fmt --formatter and hatch fmt --linter - all checks passed
  • Ran hatch test - all tests passed
  • I ran hatch run prepare

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

- Add tags field to ToolSpec TypedDict as NotRequired[list[str]]
- Update @tool decorator to accept optional tags parameter
- Modify A2A server to extract tags from tool config
- Add comprehensive tests for tags functionality

Resolves strands-agents#1261
@anuyog1004
Copy link
Author

The integration test failures are unrelated to this PR:

  • 3 tests timed out (>45s) due to external API latency
  • 215 integration tests passed
  • All unit tests passed locally (1877 tests)

These specific failing tests:

  • test_rate_limit_throttling_integration_no_retries - Tests OpenAI rate limiting behavior
  • test_swarm_resume_from_executing_state - Tests multi-agent swarm execution
  • test_swarm_execution_with_string - Tests swarm with string inputs

The changes in this PR only add a tags field to tools and don't modify any integration test behavior.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add tags to tools to use them downstream in the A2A AgentCard Skill

1 participant