> ## 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 dev

> Build your own Agent application with the AgentScope Harness SDK, combining context, tools, workspaces, and persistent sessions.

Development version. For the released SDK, use the [2.0 documentation](https://java.agentscope.io/v2/en/intro.md).AGENTSCOPE DEV JAVA

Build agents that work.\
Embed them in your application.
===============================

Build your own Agent application with the Harness SDK. Combine context, workspaces, tools, and persistent sessions, and manage your application's deployment.

[Build with Harness ](https://java.agentscope.io/dev/en/docs/quickstart.md)

[Source on GitHub ](https://github.com/agentscope-ai/agentscope-java)

[SDK · BUILD YOUR OWN
AgentScope Harness&#x20;
Embed the SDK in your application, combine context, workspaces, and tools, and customize Agent behavior while managing your own deployment.
ContextTools & sandboxesPersistent sessions](https://java.agentscope.io/dev/en/docs/harness/architecture.md)

## Build an Agent for your application

Compose Harness SDK capabilities in application code and customize how your Agent works.

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 & workspacesBuild context at each reasoning step, compact long task histories, and load memory, skills, and working files as needed.](https://java.agentscope.io/dev/en/docs/harness/context.md)
[Tools, sandboxes & collaborationConnect Java tools and MCP, choose an execution environment, and delegate independent work to subagents.](https://java.agentscope.io/dev/en/docs/harness/architecture.md)
[Events, interaction & recoveryRecord messages and tool activity, handle user input and approvals, and continue work with persistent sessions and checkpoints.](https://java.agentscope.io/dev/en/docs/harness/session-log.md)

## Start where your application needs you

Embed an Agent in your Java application.

[Java quickstart ](https://java.agentscope.io/dev/en/docs/quickstart.md)

The Harness example shares a Builder and creates an instance per request.

Harness · Java

```java theme={null}
// Share configuration; build per request
var builder = HarnessAgent.builder()
    .name("notes-assistant")
    .agentId("notes-assistant")
    .model("dashscope:qwen-plus")
    .workspace(Path.of(".agentscope/workspace"));

try (var agent = builder.build()) {
    var context = RuntimeContext.builder()
        .userId("alice").sessionId("notes").build();
    agent.streamEvents(
        new UserMessage("Extract tasks and open questions."), context)
        .doOnNext(System.out::println)
        .blockLast();
}
```

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

&#x20;FliggyTaobao Instant CommerceWhale EntertainmentAIDCAlibaba HoldingTaotian TradeTaobao App1688Qwen AppAmapAlibaba CloudAnt InternationalAnt Global Payments… &#x20;

Open Source · Cloud

&#x20;FinanceTransportation & LogisticsRetailManufacturingEnergyHealthcareEducation & Gov MediaInternetSaaSConsultingand more industry leaders &#x20;

## Before you start

<details><summary>How do HarnessAgent and ReActAgent relate?</summary>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.</details>
<details><summary>How can interrupted work continue?</summary>Native Thread journals retain messages, tool facts, and checkpoints. Use Durable for background task queues, interactions, and recovery. Checkpoints do not undo external side effects.</details>
<details><summary>What runtime do I need?</summary>The Java Harness requires JDK 17 or later and credentials for your chosen model. Tools can run locally or in a configured sandbox.</details>

## Bring your next Agent into your business

Develop your application with the Harness SDK and customize its context, tools, and execution environment.

[Build with Harness ](https://java.agentscope.io/dev/en/docs/quickstart.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.