> ## Documentation Index > Fetch the complete documentation index at: https://java.agentscope.io/llms.txt > Use this file to discover all available pages before exploring further. # AgentScope Java v2 > Build your own Agent application with the AgentScope Harness SDK, or use managed Agent services through AgentScope Service with platform-managed runtimes.

AGENTSCOPE 2.0 JAVA

Build agents that work.
Make them a service.

Build your own Agent application with the Harness SDK, or use managed Agents through the Service platform. Let the platform manage runtimes while your application accesses specialist capabilities and deliverables through APIs.

Build with Harness Explore Service
Source on GitHub
SDK · BUILD YOUR OWN

AgentScope Harness

Embed the SDK in your application, combine context, workspaces, and tools, and customize Agent behavior while managing your own deployment.

ContextTools & sandboxesPersistent sessions
Two approaches to choose or combine
PLATFORM · MANAGED SERVICE

AgentScope Service

Start with the recommended self-hosted deployment, configure Managed Agents built on HarnessAgent, and integrate through APIs. Service manages runtimes centrally, so each Agent application needs no separate runtime service to build and maintain.

Agent as a ServiceTasks · Interaction · Delivery

Build your own or use a managed service?

Choose the Harness SDK for deep customization in application code. Choose Service to focus on business integration while the platform runs your Agents. Managed Agents in Service are built on the AgentScope HarnessAgent core, so both approaches share the same execution core.

HARNESS

AgentScope Harness

For teams embedding Agents in Java or Spring Boot and customizing runtime behavior. HarnessAgent provides reasoning and tool loops, workspaces, context, skills, and sessions. Compose these capabilities in code and own your application's deployment and operations.

Context & workspaces

Build context at each reasoning step, compact long task histories, and load memory, skills, and working files as needed.

Tools, sandboxes & collaboration

Connect Java tools and MCP, choose an execution environment, and delegate independent work to subagents.

Events, interaction & recovery

Record messages and tool activity, handle user input and approvals, and continue work with persistent sessions and checkpoints.

SERVICE

AgentScope Service

For teams using Agent capabilities through APIs and reducing repeated runtime work. Configure instructions, models, tools, and resources to publish a managed Agent service. The platform handles execution, sessions, and tasks; your application focuses on business data, user experience, and acceptance.

Start with a business task

Bring Agents into SaaS pages, business processes, or scheduled work. Design the service around its inputs and deliverables.

From invocation to delivery

Submit tasks or conversations, follow snapshots and events, handle human interaction, and retrieve results and files.

Choose how work executes

Run a managed HarnessAgent, connect an existing application, or reuse a Coding Agent. Add Teams and Workflows as the task requires.

Start where your application needs you

Embed an Agent in Java, or call a managed Agent service over HTTP.

Java quickstart Publish and invoke an Agent

The Harness example shares a Builder and creates an instance per request. The Service example creates a Session selecting an Agent, then submits a Turn.

Battle-tested in Production
Alibaba Group the most widely used agent framework in-house (Java & Python), in production across 13+ business units
Open Source Community adopted by industry leaders across 10+ sectors via open source & Alibaba Cloud
Alibaba Group
FliggyTaobao Instant CommerceWhale EntertainmentAIDCAlibaba HoldingTaotian TradeTaobao App1688Qwen AppAmapAlibaba CloudAnt InternationalAnt Global Payments…
Open Source · Cloud
FinanceTransportation & LogisticsRetailManufacturingEnergyHealthcareEducation & Gov MediaInternetSaaSConsultingand more industry leaders

Before you start

How do HarnessAgent and ReActAgent relate?

ReActAgent provides reasoning, tools, messages, permissions, and middleware. HarnessAgent uses the same ReAct loop and adds workspaces, memory, skills, subagents, and session management. Start with HarnessAgent, or use ReActAgent directly to assemble your own runtime.

Must Harness and Service be used together?

You can choose either: develop and run your own Agent application with the Harness SDK, or configure a Managed Agent directly in Service without first building an SDK application. Managed Agents in Service are built on the AgentScope HarnessAgent core, with the platform managing Agent runtimes centrally. Existing Harness applications can also connect as External Agents, keeping their own processes while using the platform's publishing and invocation capabilities.

Does refreshing a page restart the task?

Snapshots and event cursors restore recorded messages, tool results, and progress. Resuming execution is a separate operation. Continuing interrupted work requires the relevant session operation, and checkpoints do not undo external side effects.

What runtime do I need?

The Java Harness requires JDK 17 or later and credentials for your chosen model. Tools can run locally or in a configured sandbox. Self-hosting is currently recommended for Service. Deploy the platform, configure models and tools, then run your first Managed Agent.

Bring your next Agent into your business

Develop your application with the Harness SDK, or deploy Service and call Managed Agents with platform-managed runtimes.

Build with Harness Deploy and start using Service
This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.