agentscope-ai/agentscope-java
Build distributed, production-grade, long-running agents.
What it solves
AgentScope Java 2.0 provides a production-ready framework for building and deploying distributed, enterprise-grade AI agents. It moves beyond simple reasoning loops to solve the challenges of running long-running, complex tasks in production, such as state persistence, secure tool execution, and multi-tenant isolation.
How it works
The framework uses a dual-layer architecture where a reasoning core (like ReActAgent) is wrapped by a "HarnessAgent" that adds engineering infrastructure. It employs a unified event stream for real-time rendering and human-in-the-loop (HITL) interactions, an AOP-style middleware system for intercepting the reasoning-acting loop, and a permission system to gate tool calls. For deployment, it supports stateless horizontal scaling by offloading session and memory management to external stores like Redis, MySQL, or PostgreSQL.
Who it’s for
It is designed for Java developers building enterprise AI applications that require distributed deployment, secure sandboxing for tool execution, and robust session recovery for long-running agentic workflows.
Highlights
- Enterprise Deployment: Supports multi-tenant isolation and cross-replica session recovery using distributed backends (Redis, MySQL, PostgreSQL).
- Secure Execution: Integrated workspace and sandbox support for running tools in isolated environments via Docker, Kubernetes, or cloud sandboxes.
- Harness Engineering: Features layered memory with auto-compaction, a skill repository for self-evolution, and declarative sub-agent orchestration.
- Real-time Event System: A stream of 28 typed events for frontend rendering and first-class human-in-the-loop approval flows.