IM Channel Integration Guide
IM Channel Integration allows you to connect Wegent agents to instant messaging platforms, enabling users to interact with AI agents directly within their familiar chat tools.
π Table of Contentsβ
- Overview
- Architecture
- Using IM Channels
- Management Features
- User Mapping Mechanism
- Platform Integration Guides
- Troubleshooting
- Related Resources
π― Overviewβ
What is IM Channel Integration?β
IM Channel Integration connects Wegent agents to instant messaging platforms, allowing users to chat with AI agents directly in their preferred messaging apps without accessing the Wegent web interface.
Core Benefitsβ
| Benefit | Description |
|---|---|
| Familiar Environment | Use AI agents in the chat tools you already use daily |
| Real-time Responses | Get streaming AI responses with AI Card technology |
| Multi-turn Conversations | Maintain context across multiple messages |
| Team Collaboration | Share AI capabilities with your entire organization |
Supported Platformsβ
| Platform | Status | Features |
|---|---|---|
| DingTalk | β Available | Stream mode, AI Card streaming, multi-turn conversations |
| Feishu/Lark | π Planned | Coming soon |
| WeChat Work | π Planned | Coming soon |
π Architectureβ
Message Flowβ
The following diagram illustrates how messages flow through the IM integration system:
Key Componentsβ
| Component | Purpose |
|---|---|
| Channel Manager | Manages lifecycle of all IM channel connections |
| Channel Provider | Platform-specific connection handler (DingTalk, Feishu, etc.) |
| Message Handler | Processes incoming messages and routes to agents |
| Response Emitter | Sends AI responses back to IM platform (sync or streaming) |
π¬ Using IM Channelsβ
Basic Conversationβ
Simply send messages to the bot in your IM platform as you would in any chat:
User: What can you help me with?
Bot: I'm an AI assistant powered by Wegent. I can help you with...
Multi-turn Conversationsβ
The bot maintains conversation context within the same chat session:
User: I'm working on a React project
Bot: Great! I'd be happy to help with your React project...
User: How do I optimize performance?
Bot: For your React project, here are some performance optimization tips...
Starting a New Conversationβ
To clear context and start fresh, use the /new command:
User: /new
Bot: Started a new conversation. How can I help you?
AI Card Streamingβ
When AI Card streaming is enabled, you'll see responses appear in real-time:
- Bot shows "Thinking..." indicator
- Response text streams in progressively
- Final response is displayed with formatting
βοΈ Management Featuresβ
Channel Status Monitoringβ
View channel health in the admin panel:
| Status | Indicator | Description |
|---|---|---|
| Connected | π’ Green | Channel is active and receiving messages |
| Disconnected | π΄ Red | Channel is offline or experiencing errors |
| Disabled | βͺ Gray | Channel is manually disabled |
Channel Operationsβ
| Operation | Description |
|---|---|
| Enable/Disable | Toggle channel without deleting configuration |
| Restart | Reconnect to IM platform (useful after network issues) |
| Edit | Modify channel settings (leave secret empty to keep existing) |
| Delete | Remove channel configuration |
Updating Configurationβ
When editing a channel:
- Sensitive fields (Client Secret) are masked with
*** - Leave sensitive fields empty to keep existing values
- Enter new values to update credentials
Monitoring Metricsβ
Available metrics for each channel:
- Uptime: How long the channel has been connected
- Last Error: Most recent error message (if any)
- Connection Time: When the channel was last connected
π₯ User Mapping Mechanismβ
Automatic User Creationβ
When an IM platform user interacts with the bot for the first time:
- System attempts to find existing Wegent user
- If not found, automatically creates a new user account
- User is linked to their IM platform identity
Default user creation:
- Username: IM platform user ID
- Email:
{user_id}@im-platform.com - Auth Source: Corresponding IM platform name
Enterprise User Mappingβ
For organizations with existing user directories (ERP, LDAP), custom user mappers can be configured:
Contact your system administrator to configure enterprise user mapping.
π Platform Integration Guidesβ
The following platforms have detailed integration configuration guides:
| Platform | Link |
|---|---|
| DingTalk | DingTalk Integration Guide |
β Troubleshootingβ
Connection Issuesβ
Channel shows "Disconnected"β
Possible causes:
- Invalid Client ID or Client Secret
- Network connectivity issues
- IM platform API service disruption
Solutions:
- Verify credentials in the open platform
- Check network connectivity from Wegent server
- Try restarting the channel
- Check IM platform service status
Messages not being receivedβ
Possible causes:
- Stream mode not enabled in IM platform
- Robot permissions not configured
- Channel not enabled in Wegent
Solutions:
- Verify Stream Mode is enabled in IM app settings
- Check all required permissions are granted
- Ensure channel is enabled (toggle is on)
Response Issuesβ
Bot not respondingβ
Possible causes:
- Default Agent not configured
- Agent has no model assigned
- Rate limiting
Solutions:
- Verify a default Agent is selected for the channel
- Ensure the Agent has a working model configuration
- Check for rate limit errors in channel status
Slow or incomplete responsesβ
Possible causes:
- AI Card streaming issues
- Network latency
- Large response content
Solutions:
- Try disabling AI Card streaming temporarily
- Check network connectivity
- The system will fall back to sync mode if streaming fails
User Issuesβ
User not recognizedβ
Possible causes:
- User mapping configuration issues
- IM platform user info not accessible
Solutions:
- Check user permissions in IM app
- Verify user mapping configuration
- Contact administrator for enterprise user mapping
π Related Resourcesβ
Documentationβ
- Core Concepts - Understand Wegent's architecture
- Agent Settings - Configure agents for IM channels
- Configuring Models - Set up AI models
- DingTalk Integration Guide - Detailed DingTalk setup steps
External Resourcesβ
π¬ Get Helpβ
Need assistance?
- π Check FAQ
- π Submit GitHub Issue
- π¬ Join community discussions
Connect your AI agents to IM platforms and empower your team! π