> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fased.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Feishu

# Feishu

**Delivery:** Official add-on.

Use Feishu when your team already works in Feishu or Lark and you want Fased to
join those conversations through the platform's bot APIs.

Status: official optional add-on for Feishu and Lark workspaces. Install it
from **Agent > Channels**, onboarding, or the CLI before entering credentials:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fased plugins install @fased/feishu
fased gateway restart
```

It supports the common bot flow, account-aware config, pairing, and group
controls.

## Setup from Agent > Channels

Open **Agents**, select the Agent, then use **Agent > Channels > Feishu**.

You need:

* App ID
* App Secret
* domain: `feishu` or `lark`
* event subscription enabled in the platform console
* bot capability enabled and published/available to the workspace

Restart the gateway if the UI reports that the runtime still needs to load.

## Quick setup

1. Create an enterprise app in Feishu Open Platform or Lark Developer Console.
2. Copy App ID and App Secret.
3. Enable bot capability.
4. Configure event subscription for message events.
5. Publish or make the app available to the workspace.
6. Save credentials in **Agent > Channels > Feishu**.
7. Start or restart the gateway and send a test message.

Config shape:

```json5 theme={"theme":{"light":"min-light","dark":"min-dark"}}
{
  channels: {
    feishu: {
      enabled: true,
      appId: "cli_xxx",
      appSecret: "secret",
      domain: "feishu",
      dmPolicy: "pairing",
      groupPolicy: "allowlist",
    },
  },
}
```

Lark tenants should use `domain: "lark"`.

## Permissions

Enable only the permissions your bot flow needs. Typical needs:

* receive messages
* send messages
* bot menu or bot capability where required
* user/chat id lookup if you want allowlist resolution

Keep app secrets private and rotate them if exposed.

## Access model

| Area          | Recommended start                                |
| ------------- | ------------------------------------------------ |
| DMs           | pairing or allowlist                             |
| Groups        | allowlist plus mention gating                    |
| IDs           | use stable user/chat ids where possible          |
| Multi-account | configure distinct account names and credentials |

## Runtime behavior

* The channel keeps a long-lived event connection.
* Incoming messages route to the selected Agent/session.
* Task commands create Agent-owned Tasks.
* Delivery returns through the Feishu/Lark bot API.

## Troubleshooting

| Symptom                | Check                                                  |
| ---------------------- | ------------------------------------------------------ |
| Bot receives nothing   | Event subscription, app publish state, bot capability. |
| Send fails             | App secret, app id, permissions, target id.            |
| Group messages ignored | Group policy, mention requirement, chat allowlist.     |
| Lark tenant fails      | `domain: "lark"` and correct developer console.        |

## Related

* [Pairing](/channels/pairing)
* [Groups](/channels/groups)
* [Channel routing](/channels/channel-routing)
