agentscope-ai / agentscope-ai/agentscope-java
[Feature]: add a Unified IM Bot Gateway (QQ, Feishu, DingTalk, Slack) Adapter Framework for AgentScope-Java
- 主要語言
- Java
- 星號
- 5.6k
- 分支
- 1.3k
- 平均合併
- 4 天 12 小時
- 30 天內合併 PR
- 77
描述
## 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.
貢獻指南
評估
這個 Issue 還沒有評估資料。