AgentScope Java 2.0: A production-oriented Java framework for long-running, distributed agents
Build distributed, production-grade, long-running agents.
At a glance
- What is it?
- AgentScope Java 2.0 is a Java framework for building distributed, long-running agents with an event system, permission gating, middleware, and sandboxed tool execution. This review covers its architecture, setup, limitations, and who should adopt it.
- Who is it for?
- Adopt AgentScope Java 2.0 if you are building Java-based, long-running agents that need distributed session management, human-in-the-loop approval, and sandboxed tool execution, and you are comfortable with a young framework that reached GA in July 2026. Do not adopt it if you need a minimal, single-process agent without persistence or sandboxing, or if you require a stable, battle-tested ecosystem with extensive community examples.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly Java, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- agentscope-ai/agentscope-java6,375 ★ · +1,062
| Repository | 2026-08-27 | 2026-11-15 |
|---|---|---|
| agentscope-ai/agentscope-java | 5.3k | 6.4k |
1,062 Stars in the last 80 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What AgentScope Java 2.0 actually solves
AgentScope Java 2.0 targets a specific pain point: building agents that run for hours or days, survive restarts, and operate across multiple server replicas. The README is explicit about this. It is a 'production-ready framework for building distributed, enterprise-grade agents' with 'built-in support for long-running, safely-controlled agent execution.' That is a different niche from a simple chatbot script. The intended user is a Java engineer who needs an agent that can be interrupted, resumed, and audited. The framework provides abstractions for session persistence, tool-call approval, and event streaming, which are the unglamorous parts of production agent work. If you have only built stateless request-response agents, the emphasis on session recovery and cross-replica routing will be the main draw. The framework does not try to be a low-code platform; it is a Java library with builder patterns and extension modules.
The event system and the permission system: two pillars of control
The event system is a unified event stream with 32 typed events, according to the README. These events serve two purposes: real-time frontend rendering and human-in-the-loop interactions. That means you can stream agent progress to a UI and also pause for user approval. The permission system is the gatekeeper for tool calls. It has three modes: allow, require user approval, and deny. This is a concrete mechanism for safety. Instead of letting an agent call any tool, you can force a human checkpoint before a sensitive operation. But the design is clear: events are the data plane, permissions are the control plane. This separation is useful for audits. You can log every event and every approval decision. The framework also has middleware, described as 'AOP-style hook interception,' which lets you insert logic into the reasoning-acting loop. That is a familiar concept for Java developers, but it is worth noting that middleware adds complexity. You have to reason about ordering and exceptions.
Workspace and sandbox: where tools actually run
Tool execution can use a local subprocess, Docker, Kubernetes or a cloud sandbox. Isolation and host access depend on the selected backend and its configuration; verify those boundaries before running untrusted code. The workspace concept bundles persona, memory, skills, and subagents, as introduced in v1.1.0. That suggests a structured way to manage agent state. The pluggable filesystem (local, shared store, sandbox) further separates concerns. A shared store would allow multiple replicas to see the same files, which is necessary for distributed execution. A remote sandbox can add network and orchestration overhead; evaluate its actual security boundaries and configuration. You would need to consult the documentation at java.agentscope.io to understand the configuration keys. For a production deployment, the choice between Docker and Kubernetes is significant. Docker is simpler, but Kubernetes gives you scaling and resilience. The framework supports both, which is flexible but also means you have to learn two deployment models.
Getting it running: Maven dependencies and the Hello Agent example
The quickstart is straightforward. You need JDK 17 or higher. Add the harness dependency to your Maven pom: io.agentscope:agentscope-harness:2.0.3. Model providers are separate extension modules. For DashScope you add io.agentscope:agentscope-extensions-model-dashscope:2.0.3. Other options include openai, anthropic, gemini, and ollama. If you only need a bare ReActAgent without workspace, persistence, or sandbox, you can depend on agentscope-core and your model extension. That is a useful modularity. The README shows a minimal example that configures a shared builder once at startup, HarnessAgent.builder().name("assistant").agentId("assistant").sysPrompt("You are a helpful AI assistant."), and asks you to set DASHSCOPE_API_KEY before running. The README's pattern is to configure that builder at startup and call builder.build() to create and close an agent for each request. This is a conventional approach. The separation of model providers into extensions means you are not forced to pull in every SDK. The tradeoff is that you must know which extension to add for your provider, and the README lists openai, anthropic, gemini, ollama, and dashscope.
Distributed deployment: statelessness and session recovery
The framework claims 'true distributed session and memory management' with Redis, MySQL, PostgreSQL, OSS, and COS as persistence backends. The release notes for v2.0.0-RC2 say the agent is 'fully stateless' and you can enable a DistributedBackend with one line. That is a strong claim. Statelessness means any replica can handle a request, because the session state lives in the backend. Cross-replica session recovery is mentioned in RC4. That is the mechanism that lets an agent resume after a replica crash. The README does not explain how this recovery works in detail. It is not clear whether the session state is snapshotted continuously or only at event boundaries. This matters for correctness. If the agent is in the middle of a tool call and the replica dies, what happens? The documentation would need to answer that. The storage options are a mix of SQL and NoSQL, plus object storage (OSS, COS). That is a wide range, but it also means you must choose and configure a backend. The framework's distributed features are the main reason to choose it over a simpler library, but they come with operational complexity.
AgentScope Service: a control plane on top
The repository includes a separate module called agentscope-service, described as an agent Control Plane and Dashboard. It is described as being for agent observation, registration and orchestration. The README says it is compatible with AgentScope, LangChain, ADK, and Claude / Qoder. That is a broad compatibility claim, but the README does not specify how the integration works. This is an observability and operations tool. If you run many agents across teams, a central dashboard is useful. The service appears to be an optional add-on, not a core component. You could run AgentScope Java without it. The value proposition is clearer for enterprises that need to manage multiple agent runtimes. But without more documentation, it is hard to assess how mature this service is.
Limitations and the wrong tool cases
The most obvious limitation is that the framework is young. The first GA release was v2.0.0 in July 2026, and the latest is v2.0.4 in October 2026, released the same day as v2.1.0-BETA1. The README lists a rapid release cadence, with multiple RCs in a few months. That means the API could change. The README also mentions that model providers are modularized in RC5, which is a significant architectural change. The documentation is hosted separately, and the README is not exhaustive. You would need to read the docs. The framework is also Java-specific, which is fine for Java shops, but if your team uses Python, this is not the right tool. Finally, the sandbox options (Docker, Kubernetes) require container infrastructure. If you do not have that, the remaining options are local execution or the AgentRun cloud sandbox.
Alternatives and how they differ
The main alternative in the Java ecosystem is Spring AI, which provides a higher-level abstraction for AI applications but does not focus on long-running, distributed agents. Another alternative is LangChain4j, which is a Java port of the LangChain ideas. AgentScope Java's differentiator is that it bundles these production concerns into one framework. The tradeoff is that you adopt a specific architecture (stateless agents, event-driven) that may not fit every use case. If you only need a simple RAG chatbot, LangChain4j or Spring AI might be lighter. If you need distributed orchestration with human approval, AgentScope Java is more purpose-built. The README does not compare itself to these, but the design choices are clear.
Maintenance and upgrade cost, and license uncertainty
The license is Apache-2.0, and the repository carries a LICENSE file at the root. The project is active, with the last push on 2026-11-02 and the v2.0.4 and v2.1.0-BETA1 releases on 2026-10-08. The release notes show a pattern of rapid iteration, which is good for bug fixes but bad for stability. Each RC introduced new features, so the API is likely to evolve. The maintenance cost includes keeping up with new releases and adapting your code. The framework also requires you to manage external dependencies: storage backends, model provider extensions, and possibly container orchestration. Upgrades within 2.0.x (the latest is v2.0.4) are patches, but the jump from v1.1.0 to v2.0.0 was a major redesign, as the README says 'full redesign' for RC1. That is a warning: major version upgrades may break your code. You should plan for that. The documentation site is the primary source, so you need to read it. The README gives a high-level view, but the details are elsewhere.
Editorial conclusion
Adopt AgentScope Java 2.0 if you are building Java-based, long-running agents that need distributed session management, human-in-the-loop approval, and sandboxed tool execution, and you are comfortable with a young framework that reached GA in July 2026. Do not adopt it if you need a minimal, single-process agent without persistence or sandboxing, or if you require a stable, battle-tested ecosystem with extensive community examples. Before adopting, confirm that the model providers you need (OpenAI, Anthropic, Gemini, Ollama, DashScope) have maintained extension modules, and test the distributed backend with your chosen storage (Redis, MySQL, PostgreSQL, OSS, COS) in a pilot. The framework's design choices around statelessness and event-driven execution are sound, but its maturity and documentation depth are still evolving.
Frequently asked questions
What is AgentScope Java 2.0?
It is a Java framework for building distributed, production-grade, long-running agents, carrying an event stream of 32 typed events, a tool-call permission system with allow, require user approval and deny, AOP-style middleware, a workspace with four sandbox backends, subagent spawning, and distributed session storage in Redis, MySQL, PostgreSQL, OSS or COS. It is published under the Apache-2.0 license and requires JDK 17 or higher.
Is AgentScope free to use?
The project ships under the Apache-2.0 license, with LICENSE at the root of the repository and a .licenserc.yaml alongside it. Nothing in the repository states a price, a seat count or a paid tier. One hosted option is named, though: the AgentRun cloud sandbox. The AgentScope Service control plane lives in its own subproject, agentscope-service, rather than in the core modules.
How does AgentScope Java differ from AutoGen?
The repository makes no such comparison. The only cross-runtime statement is about AgentScope Service, the control plane announced as compatible with AgentScope, LangChain, ADK and Claude / Qoder, and about A2A and AG-UI protocol support added in RC2. Any feature-level difference between AutoGen and AgentScope would have to be established outside this project.
Which kinds of agent does AgentScope Java support?
The repository does not enumerate agent types. What it names is the building blocks: HarnessAgent from agentscope-harness, a bare ReActAgent from agentscope-core, subagents created through the agent_spawn and agent_send tools with real-time event forwarding, and a Workspace whose layers are persona, memory, skills and subagents.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/agentscope-ai-agentscope-java)Star history chart for your README
[](https://hysenlabs.com/projects/agentscope-ai-agentscope-java)Was this useful?