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 摘要。