SuperAPIAI Directory

agentscope-java

github.com · AI developer platforms

AgentScope Java 2.0 is a production-oriented Java framework for building distributed, enterprise-grade, long-running agents. It provides core capabilities such as event streams, permission control, middleware, workspace sandboxes, multi-agent orchestration, and distributed deployment, and supports stateless horizontal scaling, session recovery, and human-in-the-loop approval. The framework requires JDK 17 or higher, model providers are supplied as independent extension modules, and it is open source under the Apache 2.0 license.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

AgentScope Java 2.0 is a production-ready framework for building distributed, enterprise-grade agents, providing core abstractions that keep pace with evolving model capabilities and built-in support for long-running, secure and controllable agent execution.

Purpose

This framework targets scenarios that require putting agents into production operation, emphasizing long-running execution, distributed deployment, and enterprise-grade security controls. It has been upgraded from a toolkit for "building agents" to a complete platform for "running agents," with key improvements focused on three areas: Harness engineering, enterprise-grade distributed deployment, and a leaner foundational framework.

Key Capabilities

Event System

Provides a unified event stream containing 32 typed events, supporting real-time frontend rendering and human-in-the-loop (HITL) interaction. Events cover model calls, text deltas, tool execution, and user confirmation, among other stages.

Permission System

Gates tool calls with three states: allow, require user approval, and deny. Sensitive tools can require human approval.

Middleware

Provides AOP-style hook interception with six phases: onAgent, onReasoning, onActing, onModelCall, onSystemPrompt, and onAgentStateReady, enabling flexible extension of the reasoning-acting loop.

Workspace and Sandbox

Supports running tools in isolated environments, including local subprocesses, Docker, Kubernetes, or AgentRun cloud sandboxes, with snapshot and restore support.

Multi-Agent Orchestration

Supports multiple sub-agent definition modes, runtime scheduling via agent_spawn / agent_send, synchronous or background delegation, and real-time event stream forwarding.

Distributed Deployment

Provides true distributed session and memory management, supports storage backends such as Redis, MySQL, PostgreSQL, OSS, and COS, and supports cross-replica session recovery and stateless horizontal scaling. Multi-tenant isolation covers the session, user, agent, and organization dimensions.

Harness Engineering

Layers engineering infrastructure on top of ReActAgent through middleware and toolkit channels, including: self-evolution and skill repository (successful patterns automatically saved as Markdown skills), hierarchical memory (contextual dialogue + MEMORY.md + on-disk fact log, with automatic compaction), sub-agents (Markdown-declared specifications), automatic context management (structured compaction preserving objestatus/discovery/next steps), plan mode (read-only planning state, plan file persistence drives execution).

Agent Evolution

Provides agent observability and auditing, evaluation and experimentation, asset management, and continuous optimization.

Usage

AgentScope Java requires JDK 17 or higher. Model providers are provided as separate extension modules and must be added as needed, for example DashScope: agentscope-extensions-model-dashscope. Other options include agentscope-extensions-model-openai, agentscope-extensions-model-anthropic, agentscope-extensions-model-gemini, agentscope-extensions-model-ollama. If you need to use ReActAgent's reasoning and tool APIs to compose application capabilities yourself, you can depend on agentscope-core and the corresponding model extension.

Basic usage: configure a shared Builder at startup, then use builder.build() to create and close an Agent for each request. The same identity and persistent storage can maintain conversations across instances. The DASHSCOPE_API_KEY environment variable must be set before running. Ordinary replies, multi-turn chats, and workflow steps can start from call / streamEvents; when work needs to continue after the page is closed, be queued while busy, or resume after interruption, introduce AgentSession.

Applicable Scenarios

Suitable for enterprise scenarios that need to build distributed, production-grade, long-running agents, including multi-tenant services, environments that need to securely execute untrusted code, deployments that need zero downtime during rolling restarts, and sensitive operation flows that require human-in-the-loop approval.

Limitations

The materials do not provide specific performance metrics, billing models, or pricing information. The framework requires JDK 17 or higher. Some features (such as 2.1 Durable persistent execution) are still under development.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools