plugins/plugin-feishu/README.md
This plugin integrates a Feishu (飞书) / Lark client with ElizaOS, allowing agents to interact via ByteDance's enterprise collaboration platform. It supports both the Chinese Feishu platform and the global Lark platform.
| Key | Type | Default | Description |
|---|---|---|---|
FEISHU_APP_ID | String | Required | Application ID from Feishu/Lark Open Platform (cli_xxx format). |
FEISHU_APP_SECRET | String | Required | Application secret for authentication. |
FEISHU_DOMAIN | String | "feishu" | Domain to use: "feishu" for China or "lark" for global. |
FEISHU_ALLOWED_CHATS | JSON Array | [] | List of chat IDs the bot is allowed to interact with. |
FEISHU_TEST_CHAT_ID | String | - | Chat ID for running tests. |
Add the following to your .env file:
FEISHU_APP_ID=cli_xxx
FEISHU_APP_SECRET=your-app-secret
FEISHU_DOMAIN=feishu # or "lark" for global
Create or modify your character configuration file:
{
"clients": ["feishu"],
"settings": {
"feishu": {
"appId": "cli_xxx",
"appSecret": "your-app-secret",
"domain": "feishu"
}
}
}
From the project root:
npm run dev
Or using bun:
bun start --character="characters/your-character.json"
The plugin connects to the following Feishu/Lark API endpoints:
| Domain | Base URL |
|---|---|
| Feishu (China) | https://open.feishu.cn |
| Lark (Global) | https://open.larksuite.com |
The plugin emits the following event types:
| Event | Description |
|---|---|
FEISHU_WORLD_JOINED | Bot joined a new chat/group |
FEISHU_WORLD_CONNECTED | Bot connected successfully |
FEISHU_WORLD_LEFT | Bot left a chat/group |
FEISHU_MESSAGE_RECEIVED | A message was received |
FEISHU_MESSAGE_SENT | A message was sent |
FEISHU_ENTITY_JOINED | A user joined a chat |
FEISHU_ENTITY_LEFT | A user left a chat |
FEISHU_ALLOWED_CHATS to specify authorized chat IDs.| Feature | Feishu | Lark |
|---|---|---|
| Region | China | Global |
| Domain | open.feishu.cn | open.larksuite.com |
| Language | Chinese | English |
| Data Residency | China | Global |
Use FEISHU_DOMAIN=lark when deploying for international users.
If you encounter connection issues:
If messages are not being received:
FEISHU_ALLOWED_CHATS includes the chat ID (or is empty for all chats)MIT