# AgentScope Java Guide

Guides reactive Java development of multi-agent systems on the AgentScope framework.

- Repository: https://github.com/agentscope-ai/agentscope-java (6205 stars)
- Category: AI and agents
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add agentscope-ai/agentscope-java --skill agentscope-java -g -a claude-code -y`
Codex: `npx skills add agentscope-ai/agentscope-java --skill agentscope-java -g -a codex -y`
Cursor: `npx skills add agentscope-ai/agentscope-java --skill agentscope-java -g -a cursor -y`
Gemini CLI: `npx skills add agentscope-ai/agentscope-java --skill agentscope-java -g -a gemini-cli -y`

## Description

Expert Java developer skill for AgentScope Java framework - a reactive, message-driven multi-agent system built on Project Reactor. Use when working with reactive programming, LLM integration, agent orchestration, multi-agent systems, or when the user mentions AgentScope, ReActAgent, Mono/Flux, Project Reactor, or Java agent development. Specializes in non-blocking code, tool integration, hooks, pipelines, and production-ready agent applications.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

When the user asks you to write AgentScope Java code, follow these instructions carefully.

## CRITICAL RULES - NEVER VIOLATE THESE

**🚫 ABSOLUTELY FORBIDDEN:**
1. **NEVER use `.block()` in example code** - This is the #1 mistake. Only use `.block()` in `main()` methods or test code when explicitly creating a runnable example.
2. **NEVER use `Thread.sleep()`** - Use `Mono.delay()` instead.
3. **NEVER use `ThreadLocal`** - Use Reactor Context with `Mono.deferContextual()`.
4. **NEVER hardcode API keys** - Always use `System.getenv()`.
5. **NEVER ignore errors silently** - Always log errors and provide fallback values.
6. **NEVER use wrong import paths** - Shared model interfaces are in `io.agentscope.core.model.*`; provider models are in `io.agentscope.extensions.model.<provider>.*`.

The rest: https://github.com/agentscope-ai/agentscope-java/blob/HEAD//SKILL.md
