Slack
Connect Slack to your Letta Code agent
1. Create a Slack app
Section titled “1. Create a Slack app”- Go to api.slack.com/apps and click Create New App
- Choose From a manifest, select your workspace, paste the JSON manifest below, and create the app
- Generate an app-level token: go to Settings > Basic Information, scroll to App-Level Tokens, click Generate Token and Scopes, give it a name (e.g. “main”), add the
connections:writescope, and click Generate. Copy the token (xapp-...). - Install the app: go to Settings > Install App, click Install to Workspace, authorize, then copy the Bot User OAuth Token (
xoxb-...)
Slack app manifest
{ "display_information": { "name": "Letta Code", "description": "Slack connector for Letta Code" }, "features": { "bot_user": { "display_name": "Letta Code Slack Bot", "always_online": true }, "app_home": { "messages_tab_enabled": true, "messages_tab_read_only_enabled": false } }, "oauth_config": { "scopes": { "bot": [ "app_mentions:read", "channels:history", "chat:write", "files:read", "files:write", "groups:history", "im:history", "reactions:read", "reactions:write", "users:read" ] } }, "settings": { "org_deploy_enabled": false, "socket_mode_enabled": true, "is_hosted": false, "token_rotation_enabled": false, "event_subscriptions": { "bot_events": [ "app_mention", "message.channels", "message.groups", "message.im", "reaction_added", "reaction_removed" ] } }}This manifest pre-configures Socket Mode, all required scopes, event subscriptions, and App Home messaging.
2. Configure
Section titled “2. Configure”letta channels configure slackThe wizard asks for both tokens and your DM policy (open or allowlist).
If you choose allowlist, you’ll need Slack user IDs. To find a user ID: open the user’s profile in Slack, click the three-dot menu (⋯), and select Copy member ID. IDs start with U or W.
3. Start the server
Section titled “3. Start the server”letta server --channels slack4. Bind the Slack app to an agent
Section titled “4. Bind the Slack app to an agent”Unlike Telegram (which uses pairing codes), Slack requires binding the app to an agent before any messages will route:
letta channels bind --channel slack --agent <your-agent-id>The --agent flag defaults to the LETTA_AGENT_ID env var. If you have multiple Slack accounts configured, pass --account-id to specify which one.
You can also bind from the Letta Code app under Connections > Slack.
5. Chat
Section titled “5. Chat”Once bound, DM the app or @mention it in a channel to start chatting.
Slack routing behavior:
- @mentions in channels: Each mention creates a new conversation for the agent. The agent replies in-thread, and all subsequent messages in that thread are forwarded without requiring mentions.
- DMs: Each DM chat gets a 1:1 mapping to a conversation. Routes are auto-created on first message.
- DM policy: Slack defaults to
open(recommended).allowlistis also supported for DMs. Thepairingpolicy does not apply to Slack.