-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
Description
Summary
Add support for resuming existing tasks/contexts in the tasks submit and tasks submit-streaming commands to enable debugging of ongoing conversations and input-required scenarios.
Background
Based on analysis of the A2A ADK implementation (see inference-gateway/adk#49), the A2A protocol properly supports:
- Context ID maintenance across task sessions
- Task ID resumption for input-required scenarios
- Both streaming and async polling modes with context preservation
However, the a2a-debugger currently lacks the ability to resume existing tasks/contexts, making it difficult to debug scenarios where:
- A task transitions to
input-requiredstate - An agent needs additional context to continue processing
- Debugging multi-turn conversations that span multiple interactions
Feature Request
Enhance the existing tasks submit and tasks submit-streaming commands with new optional parameters:
New Parameters
--task-id <task-id>- Resume an existing task by providing its Task ID--context-id <context-id>- Continue within an existing context (for new tasks in the same conversation)
Usage Examples
# Resume a task that's in input-required state
a2a-debugger tasks submit --url http://agent:8080/a2a --task-id "task-123" --message "Here's the additional information you requested"
# Submit a new task within an existing context
a2a-debugger tasks submit --url http://agent:8080/a2a --context-id "ctx-456" --message "Follow up question"
# Resume with streaming
a2a-debugger tasks submit-streaming --url http://agent:8080/a2a --task-id "task-123" --message "Continue processing"Implementation Details
The commands should:
- Include
taskIdand/orcontextIdfields in the A2A message payload when provided - Handle task resumption responses appropriately
- Maintain backward compatibility with existing usage
- Support both streaming and non-streaming modes
Acceptance Criteria
-
tasks submitcommand accepts optional--task-idand--context-idparameters -
tasks submit-streamingcommand accepts optional--task-idand--context-idparameters - Parameters are properly included in A2A message payload
- Backward compatibility maintained for existing usage
- Error handling for invalid Task IDs or Context IDs
- Documentation updated with usage examples
Use Cases
- Input-Required Debugging: Resume a task that paused for additional input
- Multi-Turn Conversations: Continue debugging a conversation across multiple command invocations
- Context Preservation: Test how agents maintain context across task boundaries
- Task State Transitions: Debug task lifecycle and state management
This enhancement would make the a2a-debugger more powerful for testing complex agent interactions and debugging real-world A2A protocol scenarios.