feat(a2a): For issue#234, A2aServer support control message content by configuration.#364
Merged
AlbumenJ merged 2 commits intoagentscope-ai:mainfrom Dec 26, 2025
Merged
Conversation
…y configuration. - support response with inner message like tool_call when enabled. - support response with full response message for completed task when enabled. Change-Id: Ibd54345e4a8f75f48de137196a3740827c9cc77f
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds configuration support to control message content in A2aServer responses, enabling:
- Streaming task completion with full message accumulation via
completeWithMessageproperty - Inner message handling (e.g., tool call results) via
requireInnerMessageproperty
Key Changes
- Introduced
AgentExecutePropertiesclass to encapsulate agent execution configuration - Added Spring Boot configuration properties
agentscope.a2a.server.complete-with-messageandagentscope.a2a.server.require-inner-message - Refactored
AgentScopeAgentExecutorto use handler pattern withBaseFluxEventHandler,BlockingFluxEventHandler, andStreamingFluxEventHandlerfor cleaner event processing - Enhanced logging with task ID prefixes and added
LoggerUtil.logAgentEventDetail()for debug logging - Fixed bug by removing duplicate call to
convertFromContentBlocks()inMessageConvertUtil
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| AgentExecuteProperties.java | New properties class defining execution behavior for agent tasks |
| A2aCommonProperties.java | Added Spring Boot configuration properties for the new features |
| AgentscopeA2aAutoConfiguration.java | Wired new properties into auto-configuration, set default port to 8080 |
| AgentScopeAgentExecutor.java | Major refactoring using handler pattern to process events based on properties |
| MessageConvertUtil.java | Added overload for List conversion, removed duplicate method call |
| AgentScopeA2aServer.java | Added builder methods for AgentExecuteProperties and convenience port configuration |
| LoggerUtil.java | Added logAgentEventDetail() for consistent debug logging of agent events |
| AgentscopeA2aAutoConfigurationTest.java | Added tests for new configuration properties and updated existing tests |
| AgentScopeAgentExecutorTest.java | Comprehensive test coverage for blocking/streaming modes with new properties |
| AgentScopeA2aServerTest.java | Added test for new builder methods |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...a2a-server/src/main/java/io/agentscope/core/a2a/server/executor/AgentScopeAgentExecutor.java
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...a2a-server/src/main/java/io/agentscope/core/a2a/server/executor/AgentScopeAgentExecutor.java
Outdated
Show resolved
Hide resolved
...a2a-server/src/main/java/io/agentscope/core/a2a/server/executor/AgentScopeAgentExecutor.java
Outdated
Show resolved
Hide resolved
...scope-extensions-a2a-client/src/main/java/io/agentscope/core/a2a/agent/utils/LoggerUtil.java
Outdated
Show resolved
Hide resolved
...a2a-server/src/main/java/io/agentscope/core/a2a/server/executor/AgentScopeAgentExecutor.java
Outdated
Show resolved
Hide resolved
...tensions-a2a-server/src/test/java/io/agentscope/core/a2a/server/AgentScopeA2aServerTest.java
Outdated
Show resolved
Hide resolved
...boot-starter/src/main/java/io/agentscope/spring/boot/a2a/properties/A2aCommonProperties.java
Show resolved
Hide resolved
...a2a-server/src/main/java/io/agentscope/core/a2a/server/executor/AgentScopeAgentExecutor.java
Outdated
Show resolved
Hide resolved
...a2a-server/src/main/java/io/agentscope/core/a2a/server/executor/AgentScopeAgentExecutor.java
Outdated
Show resolved
Hide resolved
Change-Id: I9732591a077ccad28bf3c3d904d2fea754b0934d
AlbumenJ
approved these changes
Dec 26, 2025
3 tasks
JGoP-L
pushed a commit
to JGoP-L/agentscope-java
that referenced
this pull request
Dec 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AgentScope-Java Version
1.0.4
Description
For #234
Checklist
Please check the following items before code is ready to be reviewed.
mvn spotless:applymvn test)