Connect Feishu / Lark
Connect your EarthSapiens agent to Feishu (飞书) or Lark so it can chat in DMs and reply when @mentioned in groups. Takes about 10 minutes. You'll create a Lark app, copy its credentials into EarthSapiens, paste the webhook URL back into Lark, set permissions, and publish a version.
You need a Feishu/Lark account that can create a custom app (自建应用) in your organization's developer console. 飞书 (China): open.feishu.cn · Lark (international): open.larksuite.com. The two are the same product; the steps are identical.
Get the Encrypt Key and Verification Token (recommended)
Go to 事件与回调 (Events & Callbacks) → 加密策略 (Encryption Strategy). Note the Encrypt Key and Verification Token — they authenticate and encrypt the events Lark sends you.

Paste the credentials into EarthSapiens
In EarthSapiens, open your Agent's chat page. On desktop, open the Settings menu at the top of the right-hand panel and choose Overview; on mobile, tap ⋮ → Brain → Settings → Overview. Under Channels, find the Feishu / Lark row and click Connect. Pick your platform (Feishu (China) or Lark (International)), paste the App ID, App Secret and — if you set them — the Encrypt Key and Verification Token, then click Save.

Paste the Webhook URL into Lark
Back in the Lark console's 事件与回调 (Events & Callbacks) → 事件配置 (Event Configuration), choose 将事件发送至开发者服务器 (send events to the developer server) and paste your Webhook URL into 请求地址 (Request URL). Lark sends a verification challenge — EarthSapiens answers it automatically, so it saves successfully. Then add the event im.message.receive_v1 so the bot actually receives messages.

Troubleshooting
What permissions and events does the bot need?
The 智能体应用 template usually configures these for you. If the bot can't send or receive messages, add them by hand in the Lark console — there are two parts:
{"scopes":{"tenant":["im:chat.members:bot_access","im:chat:readonly","im:message","im:message.group_at_msg:readonly","im:message.p2p_msg:readonly","im:message:readonly","im:message:send_as_bot","im:message:send_multi_depts","im:message:send_multi_users"],"user":[]}}im.message.receive_v1 im.message.message_read_v1 im.chat.member.bot.added_v1
The Request URL won't save / verification fails (401)
This almost always means the Encrypt Key or Verification Token in Lark doesn't match what's stored in EarthSapiens. Make them identical, or clear both in both places. If you switched bots, use the Reset button on the Feishu channel row in EarthSapiens and reconfigure from scratch.
The bot doesn't reply in groups
In groups the bot only replies when @mentioned — that's by design, so it doesn't barge into conversations. Make sure the bot was added to the group and that you @mention it. It can still proactively post to a group it's already in (e.g. scheduled reports).
Nothing happens after I configured everything
Check that you published a version (step 10) and it was approved — changes don't take effect until then. Also confirm im.message.receive_v1 is in the subscribed events list.







