Skip to content

Conversation

jer96
Copy link
Contributor

@jer96 jer96 commented Aug 4, 2025

Description

This change allows customers to configure the following attributes of the A2A request handler:

  • task_store: Custom task storage implementation (defaults to InMemoryTaskStore)
  • queue_manager: Custom message queue management (optional)
  • push_config_store: Custom push notification configuration storage (optional)
  • push_sender: Custom push notification sender implementation (optional)

These parameters are now optional constructor arguments in A2AServer, providing extensibility points for custom implementations while maintaining backward compatibility.

Backward Compatibility: There are no functional changes to existing A2AServer usage - all new parameters have sensible defaults.

Usage Examples

Basic usage (unchanged):

server = A2AServer(
    strands_agent=my_agent,
    host="localhost", 
    port=8000
)

With custom task storage:

class CustomTaskStore(TaskStore):
    # Implementation details...
    
server = A2AServer(
    strands_agent=my_agent,
    task_store=CustomTaskStore()
)

With push notifications:

server = A2AServer(
    strands_agent=my_agent,
    push_config_store=MyPushConfigStore(),
    push_sender=MyPushSender()
)

Full configuration example:

server = A2AServer(
    strands_agent=my_agent,
    host="localhost",
    port=8000,
    task_store=CustomTaskStore(),
    queue_manager=CustomQueueManager(),
    push_config_store=CustomPushConfigStore(),
    push_sender=CustomPushSender()
)

Interface Requirements

Custom implementations must follow these interfaces:

  • task_store: Must implement TaskStore interface from a2a.server.tasks
  • queue_manager: Must implement QueueManager interface from a2a.server.events
  • push_config_store: Must implement PushNotificationConfigStore interface from a2a.server.tasks
  • push_sender: Must implement PushNotificationSender interface from a2a.server.tasks

See the A2A server documentation for detailed interface specifications.

Related Issues

Documentation PR

Type of Change

Enhancement/New feature

Breaking Changes

None - all new parameters are optional with backward-compatible defaults.

Testing

How have you tested the change? Verify that the changes do not break functionality or introduce warnings in consuming repositories: agents-docs, agents-tools, agents-cli

  • Verified backward compatibility with existing A2AServer usage
  • Tested custom component integration
  • I ran hatch run prepare
  • Confirmed no breaking changes in consuming repositories

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.

@jer96 jer96 marked this pull request as ready for review August 4, 2025 18:19
@jer96 jer96 merged commit 297ec5c into strands-agents:main Aug 6, 2025
22 checks passed
dbschmigelski pushed a commit to dbavro19/sdk-python that referenced this pull request Aug 28, 2025
Co-authored-by: jer <jerebill@amazon.com>
This was referenced Sep 17, 2025
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.

4 participants