agentscope-ai / agentscope-ai/agentscope-java

[Question]:Intermittent "Retries exhausted: 2/2" error in multi-agent workflows and request for execution trace retrieval

未關閉
#899 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
area/core/agent question
主要語言
Java
星號
5.6k
分支
1.3k
平均合併
4 天 12 小時
30 天內合併 PR
77

描述

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

**Describe the bug**
I am developing a multi-agent system using the AgentScope Java framework and encountering an intermittent issue where specific agent queries fail unexpectedly.

Problem Description:
During execution, the process occasionally terminates prematurely with the following raw event error:
rawEvent={error=Retries exhausted: 2/2}

After this event is returned, the agent output stops immediately without further recovery or fallback logic. Given that AgentScope is designed to provide production-ready tools and comprehensive runtime intervention mechanisms to address common challenges in agent development 1, I expected the system to handle transient failures more gracefully or provide clearer recovery paths rather than halting execution after exactly two retries.

However, I have set the execute config of supervisor agent like this:

```
ExecutionConfig modelConfig = ExecutionConfig.builder()
.timeout(Duration.ofMinutes(2))
.maxAttempts(3)
.build();

return ReActAgent.builder()
.name("SupervisorAgent")
.sysPrompt(sysPrompt)
.model(
DashScopeChatModel.builder()
.apiKey(apiKey)
.modelName("qwen-plus")
.stream(true)
.enableThinking(false)
.formatter(new DashScopeChatFormatter())
.build())
.modelExecutionConfig(modelConfig)
.memory(new InMemoryMemory())
.toolkit(toolkit)
.toolExecutionContext(context)
.build();
```

**Questions:**

Root Cause & Configuration: What are the common causes for the "Retries exhausted: 2/2" error in a multi-agent setup? Is there a configuration option within the agent-config or runtime settings to adjust the retry policy or timeout thresholds to prevent premature termination?
Execution Tracing: To diagnose the root cause of these intermittent failures, I need to inspect the internal execution flow. How can I retrieve or enable detailed execution traces (logs) for the AgentScope Java runtime? Specifically, I am looking for a mechanism to capture the step-by-step reasoning, tool calls, and state changes leading up to the retry exhaustion.

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

- AgentScope-Java Version: 1.0.8
- Java Version: 17

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。