**<u>AgentScope-Java is an open-source project. To involve a broader community, we recommend asking your questions in English.</u>** **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. You code 2. How to execute 3. See error **Expected behavior** A clear and concise description of what you expected to happen. **Error messages** Detailed error messages. **Environment (please complete the following information):** - AgentScope-Java Version: [e.g. 1.0.12, 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.
Activity
tanzzj commentedon Jul 17, 2026
1.x版本下的最佳实践是一个对话build一个agent实例出来,而不是复用同一个实例。2.x版本下HarnessAgent支持单例并发。但是如果单例下同一个sessionid发起了多个会话,也会出现agent is still runing
cainiaow1 commentedon Jul 17, 2026
这里不是同一个sessionId发起的多个会话,是多个useId并发提问
tanzzj commentedon Jul 18, 2026
按照AS Java的设计,如果你是1.x版本则每次chat都重新build一个新的Agent实例出来即可。如果你是2.x版本的话,用HarnessAgent单例是没问题的