Skip to content

feat(a2a): For issue#234, A2aServer support control message content by configuration.#364

Merged
AlbumenJ merged 2 commits intoagentscope-ai:mainfrom
KomachiSion:main-issue#234
Dec 26, 2025
Merged

feat(a2a): For issue#234, A2aServer support control message content by configuration.#364
AlbumenJ merged 2 commits intoagentscope-ai:mainfrom
KomachiSion:main-issue#234

Conversation

@KomachiSion
Copy link
Contributor

@KomachiSion KomachiSion commented Dec 25, 2025

AgentScope-Java Version

1.0.4

Description

For #234

  • support response with inner message like tool_call when enabled.
  • support response with full response message for completed task when enabled.

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has been formatted with mvn spotless:apply
  • All tests are passing (mvn test)
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

…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
Copy link

codecov bot commented Dec 25, 2025

Codecov Report

❌ Patch coverage is 96.05263% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...io/agentscope/core/a2a/agent/utils/LoggerUtil.java 0.00% 4 Missing ⚠️
...gentscope/core/a2a/server/AgentScopeA2aServer.java 85.71% 0 Missing and 1 partial ⚠️
...e/a2a/server/executor/AgentScopeAgentExecutor.java 99.11% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds configuration support to control message content in A2aServer responses, enabling:

  • Streaming task completion with full message accumulation via completeWithMessage property
  • Inner message handling (e.g., tool call results) via requireInnerMessage property

Key Changes

  • Introduced AgentExecuteProperties class to encapsulate agent execution configuration
  • Added Spring Boot configuration properties agentscope.a2a.server.complete-with-message and agentscope.a2a.server.require-inner-message
  • Refactored AgentScopeAgentExecutor to use handler pattern with BaseFluxEventHandler, BlockingFluxEventHandler, and StreamingFluxEventHandler for cleaner event processing
  • Enhanced logging with task ID prefixes and added LoggerUtil.logAgentEventDetail() for debug logging
  • Fixed bug by removing duplicate call to convertFromContentBlocks() in MessageConvertUtil

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Change-Id: I9732591a077ccad28bf3c3d904d2fea754b0934d
@AlbumenJ AlbumenJ merged commit 6c80660 into agentscope-ai:main Dec 26, 2025
4 checks passed
@KomachiSion KomachiSion deleted the main-issue#234 branch December 26, 2025 08:58
JGoP-L pushed a commit to JGoP-L/agentscope-java that referenced this pull request Dec 29, 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.

2 participants