본문으로 건너뛰기
Skillpedia
API 및 서버 (백엔드)6.2k · #14380

agentscope-java

하는 일

이 스킬은 AgentScope 프레임워크로 에이전트를 만드는 Java 가이드입니다. LLM 에이전트, 도구 사용, 다중 에이전트 시스템을 만드는 Java 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓AgentScope 프레임워크로 Java 에이전트를 만들고 싶을 때.
  • ✓언어 모델이나 도구를 AgentScope 에이전트에 연결해야 할 때.
  • ✓리액티브 Java 코드로 다중 에이전트 시스템을 만들고 싶을 때.

스킬 링크

https://github.com/agentscope-ai/agentscope-java/blob/main/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/agentscope-ai/agentscope-java/blob/main/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“날씨 도구와 DashScope 모델을 사용하는 Java AgentScope ReAct 에이전트를 오류 처리와 함께 작성해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

스킬은 리액티브 타입 사용, 환경 변수에서 키 읽기 같은 AgentScope의 규칙과 올바른 API 패턴을 에이전트에게 제공합니다. 그러면 에이전트는 그 패턴에 맞춰 Java 코드를 작성합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

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

✅ ALWAYS DO:

  1. Use Mono and Flux for all asynchronous operations.
  2. Chain operations with .map(), .flatMap(), .then().
  3. Use Builder pattern for creating agents, models, and messages.
  4. Include error handling with .onErrorResume() or .onErrorReturn().
  5. Add logging with SLF4J for important operations.
  6. Use correct imports: import io.agentscope.extensions.model.dashscope.DashScopeChatModel;
  7. Use correct APIs (many methods don't exist or have changed):
    • toolkit.registerTool() NOT registerObject()
    • toolkit.getToolNames() NOT getTools()
    • event.getToolUse().getName() NOT getToolName()
    • result.getOutput() NOT getContent() (ToolResultBlock)
    • event.getToolResult() NOT getResult() (PostActingEvent)
    • toolUse.getInput() NOT getArguments() (ToolUseBlock)
    • Model builder: NO temperature() method, use defaultOptions(GenerateOptions.builder()...)
    • Hook events: NO getMessages(), getResponse(), getIterationCount(), getThinkingBlock() methods
    • ToolResultBlock: NO getToolUseName() method, use event.getToolUse().getName() instead
    • ToolResultBlock.getOutput() returns List<ContentBlock> NOT String, need to convert
    • @ToolParam format: MUST use @ToolParam(name = "x", description = "y") NOT @ToolParam(name="x")

WHEN GENERATING CODE

FIRST: Identify the context

  • Is this a main() method or test code? → .block() is allowed (but add a warning comment)
  • Is this agent logic, service method, or library code? → .block() is FORBIDDEN

For every code example you provide:

  1. Check: Does it use .block()? → If yes in non-main/non-test code, REWRITE IT.
  2. Check: Are all operations non-blocking? → If no, FIX IT.
  3. Check: Does it have error handling? → If no, ADD IT.
  4. Check: Are API keys from environment? → If no, CHANGE IT.
  5. Check: Are imports correct? → If using provider models from io.agentscope.core.model.*, FIX TO io.agentscope.extensions.model.<provider>.*.

Default code structure for agent logic:

// ✅ CORRECT - Non-blocking, reactive (use this pattern by default)
return model.generate(messages, null, null)
    .map(response -> processResponse(response))
    .onErrorResume(e -> {
        log.error("Operation failed", e);
        return Mono.just(fallbackValue);
    });

// ❌ WRONG - Never generate this in agent logic
String result = model.generate(messages, null, null).block(); // DON'T DO THIS

Only for main() methods (add warning comment):

public static void main(String[] args) {
    // ⚠️ .block() is ONLY allowed here because this is a main() method
    Msg response = agent.call(userMsg).block();
    System.out.println(response.getTextContent());
}

PROJECT SETUP

When creating a new AgentScope project, use the correct Maven dependencies:

Maven Configuration (pom.xml)

For production use (recommended):

<properties>
    <java.version>17</java.version>
</properties>

<dependencies>
    <!-- Use the latest stable release from Maven Central -->
    <dependency>
        <groupId>io.agentscope</groupId>
        <artifactId>agentscope</artifactId>
        <version>1.0.12</version>
    </dependency>
</dependencies>

For local development (if working with source code):

<properties>
    <agentscope.version>1.0.12</agentscope.version>
    <java.version>17</java.version>
</properties>

<dependencies>
    <dependency>
        <groupId>io.agentscope</groupId>
        <artifactId>agentscope-core</artifactId>
        <version>${agentscope.version}</version>
    </dependency>
    <dependency>
        <
자주 묻는 질문

AgentScope란 무엇인가요?

AgentScope는 Java에서 Project Reactor 위에 만들어진 다중 에이전트 시스템 프레임워크입니다.

API 키는 어디에 두어야 하나요?

스킬은 환경 변수에서 키를 읽고, 코드에 절대 적지 말라고 안내합니다.

도구와 훅도 다루나요?

네, 설명에 도구 통합과 훅이 언급되어 있습니다.

상세 정보

작성자의 원본 설명

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.

repo: agentscope-ai/agentscope-java

인기도

GitHub 스타
6.2k
순위
#14380
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬