Installation¶
AgentScope Java supports multiple models, RAG backends, and extensions, each requiring different third-party SDKs. Bundling everything together would bloat your project, so we offer two ways to add dependencies:
All-in-one: Single dependency with DashScope SDK and MCP SDK included, get started quickly
Core + extensions: Minimal core package, add extension modules as needed, for strict dependency control
For most cases, all-in-one is enough. Switch to core + extensions when you need fine-grained dependency control.
Requirements: JDK 17+
Dependency Options¶
Approach |
Use Case |
Features |
|---|---|---|
all-in-one |
Quick start, most users |
Single dependency, includes DashScope SDK |
core + extensions |
Fine-grained control |
On-demand imports, minimal dependencies |
All-in-One (Recommended)¶
Maven:
<dependency>
<groupId>io.agentscope</groupId>
<artifactId>agentscope</artifactId>
<version>1.0.7</version>
</dependency>
Gradle:
implementation 'io.agentscope:agentscope:1.0.7'
Included Dependencies¶
The all-in-one package includes these dependencies by default:
DashScope SDK (Qwen series models)
MCP SDK (Model Context Protocol)
Reactor Core, Jackson, SLF4J (base frameworks)
Additional Dependencies¶
When using other models or features, add the corresponding dependencies:
Feature |
Dependency |
Maven Coordinates |
|---|---|---|
OpenAI Models |
|
|
Google Gemini Models |
|
|
Anthropic Models |
|
|
Mem0 Long-term Memory |
|
|
ReME Long-term Memory |
|
|
Bailian RAG |
|
|
Qdrant RAG |
|
|
PgVector RAG |
|
|
Dify RAG |
|
|
RAGFlow RAG |
|
|
HayStack RAG |
|
|
Elasticsearch RAG |
|
|
MySQL Session |
|
|
Redis Session |
|
|
PDF Processing |
|
|
Word Processing |
|
|
Nacos Registry |
|
Example: Using OpenAI Models¶
<!-- Add on top of agentscope -->
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java</artifactId>
</dependency>
Example: Using Qdrant RAG + PDF Processing¶
<!-- Add on top of agentscope -->
<dependency>
<groupId>io.qdrant</groupId>
<artifactId>client</artifactId>
</dependency>
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
</dependency>
Studio Integration¶
Connect to AgentScope Studio for visualization and debugging:
Dependency |
Maven Coordinates |
|---|---|
|
|
|
|
|
|
|
|
|
Full configuration:
<!-- Add on top of agentscope -->
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
</dependency>
<dependency>
<groupId>io.socket</groupId>
<artifactId>socket.io-client</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-exporter-otlp</artifactId>
</dependency>
<dependency>
<groupId>io.opentelemetry.instrumentation</groupId>
<artifactId>opentelemetry-reactor-3.1</artifactId>
</dependency>
Core + Extensions¶
For fine-grained dependency control, use agentscope-core with extension modules:
Maven:
<dependency>
<groupId>io.agentscope</groupId>
<artifactId>agentscope-core</artifactId>
<version>1.0.7</version>
</dependency>
Gradle:
implementation 'io.agentscope:agentscope-core:1.0.7'
Extension Modules¶
Long-term Memory¶
Module |
Feature |
Maven Coordinates |
|---|---|---|
Mem0 Long-term Memory |
|
|
ReME Long-term Memory |
|
|
AutoContext Memory |
|
RAG¶
Module |
Feature |
Maven Coordinates |
|---|---|---|
Bailian RAG |
|
|
Simple RAG (Qdrant, Milvus, PgVector, InMemory, Elasticsearch) |
|
|
Dify RAG |
|
|
RAGFlow RAG |
|
|
HayStack RAG |
|
Session Storage¶
Module |
Feature |
Maven Coordinates |
|---|---|---|
MySQL Session |
|
|
Redis Session |
|
Multi-Agent Collaboration¶
Module |
Feature |
Maven Coordinates |
|---|---|---|
A2A Client |
|
|
A2A Server |
|
Scheduling¶
Module |
Feature |
Maven Coordinates |
|---|---|---|
Scheduler Common |
|
|
XXL-Job Scheduler |
|
User Interface¶
Module |
Feature |
Maven Coordinates |
|---|---|---|
Studio Integration |
|
|
AG-UI Protocol |
|
Extension modules automatically include their required third-party dependencies.
Example: Core + Mem0 Extension¶
<!-- Add on top of agentscope-core -->
<dependency>
<groupId>io.agentscope</groupId>
<artifactId>agentscope-extensions-mem0</artifactId>
<version>1.0.7</version>
</dependency>
Framework Integration¶
Spring Boot¶
<dependency>
<groupId>io.agentscope</groupId>
<artifactId>agentscope-spring-boot-starter</artifactId>
<version>1.0.7</version>
</dependency>
Additional starters:
Starter |
Feature |
Maven Coordinates |
|---|---|---|
agentscope-a2a-spring-boot-starter |
A2A Integration |
|
agentscope-agui-spring-boot-starter |
AG-UI Integration |
|
Quarkus¶
<dependency>
<groupId>io.agentscope</groupId>
<artifactId>agentscope-quarkus-extension</artifactId>
<version>1.0.7</version>
</dependency>
Micronaut¶
<dependency>
<groupId>io.agentscope</groupId>
<artifactId>agentscope-micronaut-extension</artifactId>
<version>1.0.7</version>
</dependency>