agentscope-ai/agentscope-java

▲ 125 stars today★ 5,632⑂ 1,368

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,632 stars and 1,368 forks with 0 open issues, and was last pushed on an unknown date (repository created unknown).

Project Overview

AI Homed tracks it on the Today's Trending board.

GitHub Repository Details

Repository agentscope-ai/agentscope-java · default branch - · size 0 KB · watchers 0 · 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.1

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.1

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

If you only need a bare ReActAgent without workspace / persistence / sandbox, depend on agentscope-core alone.

Hello AgentScope!

Start your first agent with AgentScope Java 2.0:

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

public class FirstAgent { public static void main(String[] args) { HarnessAgent agent = HarnessAgent.builder() .name("assistant") .sysPrompt("You are a helpful AI assistant.") // ModelRegistry resolves the string and reads the matching // API-key env var (e.g. OPENAI_API_KEY or DEEPSEEK_API_KEY) // automatically. // Examples: "openai:gpt-4.1", "openai:o3", // "deepseek:deepseek-v4-flash", "dashscope:qwen-plus", // "anthropic:claude-sonnet-4-7", "ollama:llama3" .model("dashscope:qwen-plus") // Or pass a ChatModel object directly: // .model(OpenAIChatModel.builder().model("gpt-4.1").build()) .workspace(Paths.get(".agentscope/workspace")) .build();

RuntimeContext ctx = RuntimeContext.builder() .sessionId("demo").userId("alice").build();

// Blocking call agent.call(new UserMessage("Hello!"), ctx).block();

// Or stream events for real-time UI rendering agent.streamEvents(new UserMessage("Summarize today in three bullets."), ctx) .doOnNext(event -> { switch (event.getType()) { case TEXT_BLOCK_DELTA -> System.out.print( ((io.agentscope.core.event.TextBlockDeltaEvent) event).getDelta()); case TOOL_CALL_START -> System.out.println( "\n[tool] " + ((io.agentscope.core.event.ToolCallStartEvent) event).getToolCallName()); default -> { } } }) .blockLast(); } }

AgentScope Service

AgentScope Service — an Agent Control Plane built on AgentScope Harness that provides: + Control Plane. It provides agent registration, discovery, and distributed coordination services for every agent in the enterprise. It works with mainstream agent runtimes including AgentScope, LangChain, ADK, and Claude / Qoder, giving you a single place to inspect agent metrics and operate on live sessions — for example, compressing session context. + Managed Agents Platform Built on the AgentScope Harness runtime, managed agents lets you run multiple Agents on one fully-managed platform under unified operations. The platform hosts Harness capabilities, while tool execution can be delegated to a sandbox that you control. + Agent Teams Agents registered with AgentScope Service can be assembled into one or more Teams, whether the Agent is a self-hosted AgentScope runtime or a low-code Managed Agent Harness runtime, Agents can be orchestrated together to tackle more complex work. 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,632Stars
1,368Forks
0Open issues
JavaLanguage

GitHub Popularity

GitHub stars5,632
Forks1,368
Open issues0
Primary languageJava
License-
Stars gained today125
Created-
Last pushed-

Trending History

Weekly boardrank #74 · ▲ 125 stars

Related AI Projects

1

alibaba / nacos

Java★ 33,372⑂ 13,293▲ 5 stars
2

apache / doris

Java★ 15,918⑂ 3,947▲ 11 stars
3

langchain4j / langchain4j

Java★ 13,106⑂ 2,551▲ 10 stars
4

LaurieWired / GhidraMCP

Java★ 10,063⑂ 1,039▲ 21 stars
5

obra / superpowers

Shell★ 287,295⑂ 25,690▲ 522 stars
6

mattpocock / skills

Shell★ 263,045⑂ 22,188▲ 820 stars
7

ollama / ollama

Go★ 181,102⑂ 17,896▲ 140 stars
8

ggml-org / llama.cpp

C++★ 128,384⑂ 23,249▲ 128 stars

More AI Rankings