agentscope-ai / agentscope-ai/agentscope-java

[Feature]: add a Unified IM Bot Gateway (QQ, Feishu, DingTalk, Slack) Adapter Framework for AgentScope-Java

Open
#934 3 comments 2 reactions 0 assignees View on GitHub
area/ext/integration enhancement TBD
Dominant language
Java
Stars
5.6k
Forks
1.3k
Avg merge
4d 12h
Merged PRs (30d)
77

Description

## Is your feature request related to a problem? Please describe.

Currently, when integrating AgentScope-Java with enterprise messaging platforms such as **QQ Bot, Feishu, DingTalk, and Slack**, developers must implement platform-specific adapters individually.

Each platform has different APIs, authentication methods, and message event formats. This leads to several issues:

* Repeated boilerplate code for each messaging platform
* Lack of a standardized interface for sending or receiving messages
* Increased development and maintenance complexity when supporting multiple platforms
* Difficulty building enterprise AI agents that interact across multiple IM ecosystems

For example, developers often need to manually implement:

* QQ Bot WebSocket/Webhook event handling
* Feishu event subscription handling
* DingTalk webhook or Stream mode
* Slack event API integration

This results in duplicated integration logic across projects.

---

## Describe the solution you'd like

We propose adding a **Unified IM Bot Gateway module** to AgentScope-Java that abstracts messaging platforms into a common interface.

Example architecture:

```
AgentScope-Java


Bot Gateway Layer

┌─────┼─────┬─────┐
│ │ │ │
QQ Feishu DingTalk Slack
Adapter Adapter Adapter Adapter
```

Developers could interact with messaging platforms using a unified API:

```java
botGateway.sendText(
Platform.FEISHU,
userId,
"Hello from AgentScope!"
);
```

Core components could include:

**1. Unified Message Interface**

```java
interface BotGateway {
void sendText(Platform platform, String targetId, String message);
void sendMarkdown(Platform platform, String targetId, String content);
}
```

**2. Platform Adapters**

* `QQBotAdapter`
* `FeishuAdapter`
* `DingTalkAdapter`
* `SlackAdapter`

Each adapter handles platform-specific:

* authentication
* event parsing
* message formatting
* rate limiting

**3. Event Gateway**

Standardized event model:

```java
class BotEvent {
String platform;
String userId;
String channelId;
String message;
}
```

Agents can subscribe to events:

```java
botGateway.onMessage(event -> {
agent.handle(event.getMessage());
});
```

**4. Spring Boot Integration (Optional)**

Provide a starter module:

```
agentscope-bot-spring-boot-starter
```

Which automatically configures adapters via `application.yml`.

---

## Describe alternatives you've considered

Alternative approaches include:

1. Using platform-specific SDKs individually

* Feishu Java SDK
* DingTalk Java SDK
* Slack SDK
* QQ Bot libraries

However, this leads to fragmented integration and duplicated logic.

2. Building a custom internal gateway for each project.

While possible, this approach prevents reuse across the AgentScope-Java ecosystem and leads to inconsistent implementations.

---

## Additional context

Many AI agent frameworks already provide unified messaging integrations:

Examples include:

* LangChain integrations for Slack/Discord
* Node frameworks such as **Hubot**
* Python frameworks like **Errbot**

However, the **Java ecosystem lacks a unified messaging bot framework** that integrates well with AI agent frameworks.

Adding this feature would make AgentScope-Java much more practical for enterprise AI assistants and internal automation tools.

Typical use cases:

* Enterprise AI assistants
* DevOps alert bots
* Customer support automation
* Multi-platform AI agents

Example scenario:

```
User sends message in Feishu


Bot Gateway


AgentScope Agent


Reply sent to Feishu / QQ / DingTalk
```

This would significantly reduce integration complexity and improve developer experience.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.