agentscope-ai / agentscope-ai/agentscope-java

[Feature]:For the agent.call call to a2a, if there are tool calls inside, after returning the tool execution results, it does not call the large model again, directly returns the tool call informatio

Aberta
#321 2 comentários 0 reações 0 responsáveis Ver no GitHub
area/ext/integration bug
Linguagem predominante
Java
Estrelas
5.6k
Forks
1.3k
Merge médio
4d 12h
PRs com merge (30d)
77

Descrição

**AgentScope-Java is an open-source project. To involve a broader community, we recommend asking your questions in English.**

**Describe the bug**
A clear and concise description of what the bug is.

对a2a 的agent.call调用,如果里面有工具调用的话,返回工具执行结果以后,没有再次调用大模型,直接返回工具调用和工具执行结果信息,并且工具的调用信息和结果信息也不是结构化的。

**To Reproduce**
Steps to reproduce the behavior:

remote a2a agent调用之后返回如下:
{"last":false,"message":{"content":[{"type":"text","text":"Calling tool query_fee_coupon with arguments: {\"park_id\":\"1001574MX\",\"plate_no\":\"浙A879MN\"} (call ID: call_fc216eae6cfd42dbbb689f)"}],"id":"4fa95a59-9ff1-45d1-aded-c62f14b08788","metadata":{"type":"toolCall"},"name":"agent-response",
"role":"ASSISTANT","timestamp":"2025-12-23 10:02:38.086"},"messageId":"4fa95a59-9ff1-45d1-aded-c62f14b08788","type":"REASONING"}

{"last":false,"message":{"content":[{"type":"text","text":"Tool query_fee_coupon returned result:
[{\"text\":\"{\\\"code\\\":0,\\\"message\\\":\\\"success\\\",\\\"data\\\":{\\\"response_code\\\":\\\"2\\\",\\\"response_data\\\":}}\",\"type\":\"text\"}] (call ID: call_fc216eae6cfd42dbbb689f)"}],"id":"4fa95a59-9ff1-45d1-aded-c62f14b08788","metadata":{"type":"toolResponse"},"name":"agent-response",
"role":"ASSISTANT","timestamp":"2025-12-23 10:02:46.966"},"messageId":"4fa95a59-9ff1-45d1-aded-c62f14b08788","type":"REASONING"}

1. You code
2. How to execute
3. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

1、调用工具后,继续调用大模型

2、输出的工具metadata":{"type":"toolCall"} 和 {"type":"toolResponse"}的时候,text里面的内容只有工具调用和返回结果信息,不要有其他信息,要不然,没法结构化解析,比如:

{"type":"toolCall"}时输出:"text":"Calling tool query_fee_coupon with arguments: {\"park_id\":\"1001574MX\",\"plate_no\":\"浙A879MN\"} 变成JSON结构里面就是工具名称和参数列表

{"type":"toolResponse"}时输出:text":"Tool query_fee_coupon returned result:
[{\"text\":\"{\\\"code\\\":0,\\\"message\\\":\\\"success\\\",\\\"data\\\":{\\\"response_code\\\":\\\"2\\\",
变成只有工具的返回结果,没有前面的Tool query_fee_coupon returned result: ,要不然程序没法结构化解析

**Error messages**
Detailed error messages.

**Environment (please complete the following information):**

- AgentScope-Java Version: [e.g. 1.0.3, check your pom.xml dependency version or run `mvn dependency:tree | grep agentscope-parent:pom`(only mac/linux)]
- Java Version: [e.g. 17]
- OS: [e.g. macos, windows]

**Additional context**
Add any other context about the problem here.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.