Repository navigation
feat(tools): Implement A2A tool call visualization - #139
Conversation
- Add client-side skipping logic for a2a_* and mcp_* tools - Tools are visualized but execution is skipped (Gateway handles execution) - Agent mode continues to execute all tools (main agent has full access) - Skipped tools show as "executed on Gateway" with metadata - Add comprehensive table-driven tests - Update documentation for A2A/MCP tool handling Co-authored-by: Eden Reich <[email protected]>
|
@claude I think the SDK should not have hardcoded skip middlewares values, it should make it configurable - defaulting to true. But when the user enables it the API call will go through the A2A or MCP middleware. Maybe we can add those configurations to the gateway.middlewares.a2a and gateway.middlewares.mcp. |
|
Claude finished @edenreich's task —— View job Implementation Complete ✅I've successfully implemented configurable A2A and MCP tool skipping as requested: Changes MadeConfiguration Schema:
Implementation:
Testing:
Documentation:
Usage Examplegateway:
middlewares:
a2a:
skip_on_client: false # Enable A2A tool execution on client
mcp:
skip_on_client: true # Skip MCP tools (default)When Commit: |
Add configurable middleware settings for A2A and MCP tools: - Add gateway.middlewares.a2a.skip_on_client config option (defaults to true) - Add gateway.middlewares.mcp.skip_on_client config option (defaults to true) - Update tool execution orchestrator to use config instead of hardcoded logic - Add comprehensive table-driven tests covering all configuration scenarios - Update documentation to reflect configurable behavior - Maintain backward compatibility with default skip behavior When skip is disabled, A2A and MCP tools will execute normally instead of being skipped for client-side visualization. Co-authored-by: Eden Reich <[email protected]>
|
@claude tools are executed on the server when it comes to MCP - centralized config with shared tools and resources for all clients. Also the A2A is working similar. Let's simplify it and call it simply: gateway:
middlewares:
a2a: true
mcp: true // when this is set to true we set the skip mcp to false on the code |
|
Claude finished @edenreich's task —— View job Configuration Schema Simplification Complete ✅I've successfully implemented the simplified configuration schema as requested: Changes MadeConfiguration Schema Simplified:
Logic Inverted as Requested:
Quality Assurance:
Technical Implementation:
The configuration is now much cleaner and easier to understand. When middleware flags are Commit: | Branch: claude/issue-135-20250827-1958 |
Replace nested skip_on_client config with simple boolean flags: - gateway.middlewares.a2a.skip_on_client -> gateway.middlewares.a2a - gateway.middlewares.mcp.skip_on_client -> gateway.middlewares.mcp When true, tools execute on Gateway (skip on client). When false, tools execute on client. This provides cleaner configuration while maintaining the same functionality. Co-authored-by: Eden Reich <[email protected]>
|
@claude Please fix the CI. |
|
Claude finished @edenreich's task —— View job CI Issues Fixed ✅Todo List:
Problem ResolvedThe CI failure was caused by markdown linting violations in CLAUDE.md where three lines exceeded the 120-character limit. I've fixed this by:
Changes committed: The CI should now pass on the next run. | Branch: claude/issue-135-20250827-1958 |
- Wrap long lines in A2A/MCP tool handling section to stay within 120-character limit - Remove trailing spaces to satisfy markdownlint rules - All linter checks now pass Co-authored-by: Eden Reich <[email protected]>
Signed-off-by: Eden Reich <[email protected]>
Signed-off-by: Eden Reich <[email protected]>
|
@claude There are no shortcuts for /a2a or /mcp? I want to have a shortcut for those to be able to list the connected A2A or MCP servers. |
|
Claude finished @edenreich's task —— View job A2A and MCP Shortcuts Implementation Complete ✅Todo List:
Implementation SummaryI've successfully implemented the New Shortcuts Added:
Features:
Code Quality:
Example Usage:When users type Commit: |
…rvers - Implement A2AShortcut and MCPShortcut with Shortcut interface - Display gateway configuration, middleware status, and connection info - Show helpful configuration examples when gateway is not configured - Add comprehensive table-driven tests covering all scenarios - Register shortcuts in container for automatic availability - Support both enabled/disabled middleware states Co-authored-by: Eden Reich <[email protected]>
|
@claude Use consistent icons from internal/ui/styles/icons and make sure the display looks nice and follow the selected theme styles. |
|
Claude finished @edenreich's task —— View job Claude finished @edenreich's task —— View job A2A and MCP Shortcut Display Improvements Complete ✅Todo List:
Implementation SummaryI've successfully updated the Changes Made:Consistent Icon System:
Theme Integration:
Quality Assurance:
Visual Improvements:
Commit: | Branch: claude/issue-135-20250827-1958 |
…hortcuts - Replace hardcoded emoji icons with theme-aware styled icons - Use icons.StyledCheckMark() and icons.StyledCrossMark() for status indicators - Apply proper color theming using colors.CreateColoredText() for remaining emojis - Integrate with theme system colors (HeaderColor, AccentColor, WarningColor, etc.) - Maintain visual consistency with other shortcuts in the codebase - All tests pass and code follows established patterns Co-authored-by: Eden Reich <[email protected]>
…pdate usage instructions Signed-off-by: Eden Reich <[email protected]>
…ers and their statuses Signed-off-by: Eden Reich <[email protected]>
TODOs
|
|
@claude Can you work on the TODOs ? |
|
Claude finished @edenreich's task —— View job TODOs Implementation Complete ✅Todo List:
Implementation SummaryI've successfully implemented both TODOs as requested: 1. A2A Servers View Component ✨Created a dedicated view component (
Updated A2A Shortcut:
2. Enhanced Gateway Tool Visualization 🎯Improved tool call display for A2A and MCP middleware execution: A2A Tool Examples:
MCP Tool Examples:
Features:
Quality Assurance ✅
Files Modified
The implementation provides a much cleaner user experience with professional UI components and intuitive tool call visualization that clearly shows what's happening on the Gateway without cluttering the chat interface. Commit: |
…visualization - Add SideEffectShowA2AServers to shortcuts interface - Create dedicated A2AServersView component for displaying connected servers - Update A2A shortcut to use view component for `list` command - Enhance Gateway tool visualization with user-friendly formats: - A2A tools: Task(agent="name", action="submit_task", content="...") - MCP tools: MCP(server="name", action="execute_tool", tool="name") - Add enhanced tool formatting for Gateway middleware execution - Improve tool result display with "Executed on Gateway" indicators - Follow existing UI patterns with proper theme integration and styling Co-authored-by: Eden Reich <[email protected]>
- Added a function to resolve Viper environment variables for nested structs. - Introduced new environment variable files for A2A agent and gateway configurations. - Created a README and docker-compose setup for A2A examples. - Enhanced the chat application to support A2A server views and interactions. - Updated state management to include A2A server view transitions. - Implemented shortcuts for A2A server interactions. - Modified tool execution logic to always skip A2A and MCP tools on clients. - Improved tool formatting to reflect A2A and MCP execution status. - Added tests for A2A shortcut functionality and tool execution behavior. Signed-off-by: Eden Reich <[email protected]>
Signed-off-by: Eden Reich <[email protected]>
Signed-off-by: Eden Reich <[email protected]>
- Updated `ChatHandler` to include new tool call events: ToolCallPreviewEvent, ToolCallUpdateEvent, and ToolCallReadyEvent. - Enhanced `AgentServiceImpl` to manage streaming requests with improved state handling and tool call processing. - Introduced a new `streamState` struct to track streaming request state, including tool calls and usage metrics. - Simplified the handling of tool call deltas and integrated real-time UI updates for tool calls. - Removed redundant functions and streamlined the process of generating content streams. - Added synchronization for auto-saving in `PersistentConversationRepository` to prevent race conditions. - Updated `ToolExecutionOrchestrator` to handle cancellation of tool executions and provide appropriate results. - Adjusted tests to reflect changes in tool execution result structure and ensure correctness. Signed-off-by: Eden Reich <[email protected]>
Signed-off-by: Eden Reich <[email protected]>
…message handling Signed-off-by: Eden Reich <[email protected]>
…in RunWithStream Signed-off-by: Eden Reich <[email protected]>
…ionality and database storage Signed-off-by: Eden Reich <[email protected]>
…ation in RunWithStream Signed-off-by: Eden Reich <[email protected]>
…unWithStream methods Signed-off-by: Eden Reich <[email protected]>
…omponents Use a model to summarize the conversation in between every min amount of messages Signed-off-by: Eden Reich <[email protected]>
…ng in multiple storage backends Signed-off-by: Eden Reich <[email protected]>
…iguration access Signed-off-by: Eden Reich <[email protected]>
…ucture and improve error reporting Signed-off-by: Eden Reich <[email protected]>
…l methods I need to store it on the agent object and reset it for the next iteration. Signed-off-by: Eden Reich <[email protected]>
…onMessageToolCallChunk Signed-off-by: Eden Reich <[email protected]>
Signed-off-by: Eden Reich <[email protected]>
Signed-off-by: Eden Reich <[email protected]>
…method Signed-off-by: Eden Reich <[email protected]>
|
This refactor was necessary, now the chat works much more fluent and there is a better control over the agent -> UI event flow. TODOs
It works pretty efficient even when there are no multiple parallel tool calls, perhaps on another PR I'll implement a feature flag to allow certain tools to be parallelized for example Read tool. |
Signed-off-by: Eden Reich <[email protected]>
…g in chat events Signed-off-by: Eden Reich <[email protected]>
Signed-off-by: Eden Reich <[email protected]>
…essaging Signed-off-by: Eden Reich <[email protected]>
…licates Signed-off-by: Eden Reich <[email protected]>
Signed-off-by: Eden Reich <[email protected]>
Signed-off-by: Eden Reich <[email protected]>
|
Will skip MCP implementation since it's not a prio... |
|
🎉 This PR is included in version 0.48.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |


Resolves #135
Implements A2A and MCP tool call visualization with client-side execution skipping.
Changes
a2a_*toolsTesting
Generated with Claude Code