# agentscope-java

> agentscope-java is an open-source agent framework for multi-agent frameworks. Java framework for distributed, long-running agents with sandboxes and memory. It is available on self-hosted and API.

- **Kind:** Agent
- **Pricing:** Open source
- **Platforms:** self-hosted, API
- **Website:** https://java.agentscope.io
- **Repository:** https://github.com/agentscope-ai/agentscope-java
- **GitHub stars:** 6,387
- **License:** Apache-2.0
- **Categories:** multi-agent frameworks, developer tools
- **Listing updated:** 2026-11-14

## About

Version 2.0 centres on HarnessAgent, which packages a workspace, memory, sandbox, sub-agents, skills and Plan Mode around a standard ReAct loop without replacing it. The workspace (AGENTS.md, MEMORY.md, skills and sub-agents) is re-injected every turn so identity persists, and context is kept bounded through compaction and tool-result offloading.

Runs can be resumed with the same sessionId across processes, and sandboxes can snapshot. Execution is exposed as typed events (model calls, text deltas, tool calls, confirmations) and human-in-the-loop approvals are first-class. The code example selects a model such as dashscope:qwen-max and a Docker filesystem for isolation.

It is from the AgentScope team under Alibaba Cloud and is Apache-2.0 licensed.

## Features

- **HarnessAgent:** Adds workspace, memory, sandbox and skills around the reasoning loop.
- **Resumable sessions:** Same sessionId resumes across processes.
- **Context management:** Auto-compaction and large tool-result offloading.
- **Typed event streaming:** streamEvents emits model and tool steps.
- **Sandboxed execution:** Local, Docker or remote filesystem swap in one line.
- **Human-in-the-loop:** Approvals and confirmations are built in.

## Good for

- Building Java agents that survive restarts
- Running agent code in a Docker sandbox
- Streaming agent steps to a frontend
- Composing sub-agents and skills declaratively

## FAQ

### Which language?

Java.

### Which models can it use?

The example uses DashScope's qwen-max, resolved through a model registry.

### Licence?

Apache-2.0.

### Is agentscope-java free?

Yes. agentscope-java is open source, so you can use and self-host it for free.

### What are the best alternatives to agentscope-java?

The closest alternatives to agentscope-java are hermes-agent, deepseek-harness, langchain, gemini-cli and deer-flow.

## Alternatives

- [hermes-agent](https://ai-powered.com/agents/hermes-agent): hermes-agent is a freemium open-source agent for ai models and llm tooling.
- [deepseek-harness](https://ai-powered.com/agents/deepseek-harness): deepseek-harness is an open-source agent for multi-agent frameworks.
- [langchain](https://ai-powered.com/agents/langchain): langchain is an open-source agent framework for ai models and llm tooling.
- [gemini-cli](https://ai-powered.com/agents/gemini-cli): gemini-cli is an open-source agent for ai models and llm tooling.
- [deer-flow](https://ai-powered.com/agents/deer-flow): deer-flow is an open-source agent for ai models and llm tooling.
- [ruflo](https://ai-powered.com/agents/ruflo-2): ruflo is an open-source agent framework for knowledge and memory.
- [learn-claude-code](https://ai-powered.com/agents/learn-claude-code): learn-claude-code is an open-source hosted agent for ai models and llm tooling.
- [autogen](https://ai-powered.com/agents/autogen): autogen is an open-source agent framework for multi-agent frameworks.

---
Source: https://ai-powered.com/agents/agentscope-java
