agentscope-ai/agentscope-java

▲ 16 stars today★ 5,917⑂ 1,461

Build distributed, production-grade, long-running agents.

About agentscope-ai/agentscope-java

agentscope-ai/agentscope-java is an open-source project on GitHub, mainly written in Java. Build distributed, production-grade, long-running agents. It currently holds 5,917 stars and 1,461 forks with 906 open issues, and was last pushed on 2026-10-10 (repository created 2025-09-23).

Project Overview

Git Homed tracks it on the Today's Trending board, currently at rank #58 with 16 new stars today.

GitHub Repository Details

Repository agentscope-ai/agentscope-java · default branch main · size 58369 KB · watchers 39 · source: GitHub REST API and repository README

README

https://github.com/agentscope-ai/agentscope-java/blob/HEAD/AgentScope Logo

中文主页 | Documentation

https://github.com/agentscope-ai/agentscope-java/blob/HEAD/discord https://github.com/agentscope-ai/agentscope-java/blob/HEAD/docs https://github.com/agentscope-ai/agentscope-java/blob/HEAD/Maven Central https://github.com/agentscope-ai/agentscope-java/blob/HEAD/JDK 17+ https://github.com/agentscope-ai/agentscope-java/blob/HEAD/license https://github.com/agentscope-ai/agentscope-java/blob/HEAD/Ask DeepWiki

What is AgentScope Java 2.0?

AgentScope Java 2.0 is a production-ready framework for building distributed, enterprise-grade agents, providing essential abstractions that work with rising model capability and built-in support for long-running, safely-controlled agent execution.

https://github.com/agentscope-ai/agentscope-java/blob/HEAD/agentscope

News

Community

Welcome to join our community on

| Discord | DingTalk | WeChat | |--------------------------------------------------------------|-----------------------------------------------------------------------|--------------------------------------------------------------| | | | |

Quickstart

Installation

AgentScope Java requires JDK 17 or higher.

Maven


    io.agentscope
    agentscope-harness
    2.0.3

Model providers are shipped as separate extension modules in 2.0. Add the one you need — for example, DashScope:


    io.agentscope
    agentscope-extensions-model-dashscope
    2.0.3

Other options: agentscope-extensions-model-openai, agentscope-extensions-model-anthropic, agentscope-extensions-model-gemini, agentscope-extensions-model-ollama. See the Model docs for details.

To use the reasoning and tool APIs of ReActAgent and compose application capabilities yourself, depend on agentscope-core and your model extension.

Hello AgentScope!

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 keep the conversation across instances. Set DASHSCOPE_API_KEY before running:

import io.agentscope.core.agent.RuntimeContext;
import io.agentscope.core.event.TextBlockDeltaEvent;
import io.agentscope.core.event.ToolCallStartEvent;
import io.agentscope.core.message.UserMessage;
import io.agentscope.harness.agent.HarnessAgent;
import java.nio.file.Paths;

public class FirstAgent { // Configure once at startup; requests only call build(). private static final HarnessAgent.Builder AGENT_BUILDER = HarnessAgent.builder() .name("assistant") .agentId("assistant") .sysPrompt("You are a helpful AI assistant.") .model("dashscope:qwen-plus") .workspace(Paths.get(".agentscope/workspace"));

public static void main(String[] args) { try (HarnessAgent agent = AGENT_BUILDER.build()) { RuntimeContext ctx = RuntimeContext.builder() .sessionId("demo").userId("alice").build(); agent.call(new UserMessage("Hello!"), ctx).block(); }

// COMMENT_Summarize today in three bullets. try (HarnessAgent agent = AGENT_BUILDER.build()) { RuntimeContext ctx = RuntimeContext.builder() .sessionId("demo").userId("alice").build(); agent.streamEvents(new UserMessage("Summarize today in three bullets."), ctx) .doOnNext(event -> { switch (event.getType()) { case TEXT_BLOCK_DELTA -> System.out.print( ((TextBlockDeltaEvent) event).getDelta()); case TOOL_CALL_START -> System.out.println( "\n[tool] " + ((ToolCallStartEvent) event).getToolCallName()); default -> { } } }) .blockLast(); } } }

Start with call / streamEvents for ordinary replies, multi-turn chat and workflow steps; follow the Quick Start. Both also record Harness conversation history by default. Introduce AgentSession when work must continue after a page closes, queue while busy or resume after interruption. The recoverable chat example shows the full integration.

AgentScope Service

AgentScope Service — an Agent as a Service platform for business applications. Publish capabilities such as proposal writing, document verification, and exception investigation through APIs. Users start work, handle decisions, and review delivery inside their existing product.

+ Business integration. Offer background tasks, interactive assistants, or specialist process steps through Endpoints. Applications retain their interface, data authorization, and acceptance rules. + Persistent work and delivery. Follow status, snapshots, and events through Invocations, handle human interaction, and retrieve results and files for the business process. + Execution suited to the task. Run AgentScope Harness, connect an existing Agent application, or reuse a Coding Agent. Add Teams and Workflows when needed.

Choose an integration in Use cases, then complete a call with the API quickstart.

agentscope-service-architecture.png

Key Design

AgentScope Java 2.0 is a major step up from a "build an agent" toolkit toward a complete platform for running agents in production. The improvements fall into three focus areas:

1 · Harness Engineering — built for long-running, complex tasks

A bare ReAct loop solves one reasoning turn. HarnessAgent layers engineering infrastructure on top of ReActAgent via Middleware and Toolkit channels — the reasoning core stays untouched, capabilities layer on:

2 · Enterprise-grade distributed deployment

Production agents must serve many tenants, run untrusted code safely, and survive rolling restarts. AgentScope 2.0 is built for stateless horizontal scaling:

3 · Foundation framework — a leaner, more developer-friendly core

Messages, events, and the extension model are smaller, more orthogonal — HITL and event streaming are part of how the framework runs, not add-ons:

For the complete architecture overview, see the documentation.

Contributing

We welcome contributions from the community! Please refer to our CONTRIBUTING.md for guidelines on how to contribute.

License

AgentScope is released under Apache License 2.0.

Contributors

All thanks to our contributors:

GitHub Stars & Activity

5,917Stars
1,461Forks
906Open issues
JavaLanguage

GitHub Popularity

GitHub stars5,917
Forks1,461
Open issues906
Primary languageJava
LicenseApache-2.0
Stars gained today16
Created2025-09-23
Last pushed2026-10-10

Trending History

Daily boardrank #58 · ▲ 16 stars

Related GitHub Projects

1

NationalSecurityAgency / ghidra

Java★ 82,717⑂ 9,195▲ 588 stars
→
2

elastic / elasticsearch

Java★ 78,223⑂ 26,116▲ 4 stars
→
3

dbeaver / dbeaver

Java★ 52,011⑂ 4,399▲ 19 stars
→
4

skylot / jadx

Java★ 50,822⑂ 5,794▲ 29 stars
→
5

ReactiveX / RxJava

Java★ 48,258⑂ 7,585▲ 68 stars
→
6

jeecgboot / JeecgBoot

Java★ 48,148⑂ 16,214▲ 26 stars
→
7

YunaiV / ruoyi-vue-pro

Java★ 39,640⑂ 8,552▲ 32 stars
→
8

OpenAPITools / openapi-generator

Java★ 26,784⑂ 7,705▲ 8 stars
→

More Trending Repositories