Installation¶
AgentScope Java supports multiple models, RAG stores, 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 common model extensions (OpenAI / Gemini / Anthropic / DashScope / Ollama) 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 common model extensions and MCP 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>2.0.0</version>
</dependency>
Gradle:
implementation 'io.agentscope:agentscope:2.0.0'
Included Dependencies¶
The all-in-one package (io.agentscope:agentscope) already bundles the common model extensions and their required third-party SDKs. You do not need to add model-provider SDKs separately:
OpenAI model support (
agentscope-extensions-model-openai, native HTTP — noopenai-javarequired)Google Gemini model support (includes Google GenAI SDK)
Anthropic model support (includes Anthropic Java SDK)
DashScope model support (Qwen series)
Ollama model support
MCP SDK (Model Context Protocol)
Reactor Core, Jackson, SLF4J (base frameworks)
Additional Dependencies¶
Add the following only when using core + extensions, or when you need runtime drivers / optional components that are not covered above. All-in-one users do not need to manually add OpenAI / Gemini / Anthropic / DashScope / Ollama SDKs for the models listed in the previous section.
Feature |
Dependency |
Maven Coordinates |
|---|---|---|
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 |
|
|
Document Processing |
|
|
Nacos Registry |
|
Example: Using Qdrant RAG + PDF Processing¶
<!-- Add on top of agentscope when the runtime drivers are not already available -->
<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>2.0.0</version>
</dependency>
Gradle:
implementation 'io.agentscope:agentscope-core:2.0.0'
Extension Modules¶
Long-term Memory¶
Module |
Feature |
Maven Coordinates |
|---|---|---|
Mem0 Long-term Memory |
|
|
ReME Long-term 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 |
|
|
Quartz 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>2.0.0</version>
</dependency>
Framework Integration¶
Spring Boot¶
<dependency>
<groupId>io.agentscope</groupId>
<artifactId>agentscope-spring-boot-starter</artifactId>
<version>2.0.0</version>
</dependency>
Additional starters:
Starter |
Feature |
Maven Coordinates |
|---|---|---|
agentscope-a2a-spring-boot-starter |
A2A Integration |
|
agentscope-agui-spring-boot-starter |
AG-UI Integration |
|
agentscope-chat-completions-web-starter |
Chat Completions Web Integration |
|
agentscope-nacos-spring-boot-starter |
Nacos Integration |
|
Quarkus¶
<dependency>
<groupId>io.agentscope</groupId>
<artifactId>agentscope-quarkus-extension</artifactId>
<version>2.0.0</version>
</dependency>
Micronaut¶
<dependency>
<groupId>io.agentscope</groupId>
<artifactId>agentscope-micronaut-extension</artifactId>
<version>2.0.0</version>
</dependency>