Slack
Developer Reference
This page covers internal implementation details. It is not included in the User Guide.
Slack is the only integration handled in-house by the integrations agent. It does not route to the code-gen agent. A formatter prompt produces Block Kit JSON, which is emitted as a client-action SSE event.
Repos
escher-dbai/v4-integrations-agent-go—internal/integrations/slack/handler.go,prompts/slack-formatter.txtescher-dbai/v2-skills— has aslack/subfolder with stand-alone slack scripts used by older flows
The active path is the integrations-agent handler.
Flow
User query
│
▼
Integrations Agent classifier (Haiku) → {"integration": "slack", ...}
│
▼
Slack handler:
- calls Haiku with prompts/slack-formatter.txt
- receives Slack Block Kit JSON
- emits SSE event: type=client-action, payload={strategy:"slack", blocks:[...]}
- emits SSE event: type=doneNo code-gen call. The formatter prompt is described in the repo as "battle-tested — copied verbatim from the gateway" (lifted from the prior in-gateway Slack path).
Why Slack is special
Slack is a formatting operation, not a scripting one. There is no Python script to generate; the desired action is "render this content as Slack Block Kit JSON and let the client send it." The handler does that directly via Haiku.
Output contract
event: client-action
data: {"strategy":"slack","script":"...optional script...","blocks":[...]}
event: done
data: {"message":"Script generated","success":true,"status":"DONE"}The desktop app receives the client-action event and is responsible for posting the Block Kit message to the configured Slack workspace using the stored bot token.
What this code does NOT do
- Saved notification rules ("post to #ops every time X happens")
- Scheduled Slack posts
- Inbound
/escherslash command handlers (the integrations agent does not expose a Slack-event endpoint) - Two-way Slack channel listening
- Cross-conversation Slack thread tracking
Auth
The desktop app holds a Slack bot token (SLACK_BOT_TOKEN) in OS Keychain via v2-tauri-plugin-vault. The integrations agent itself does not authenticate to Slack — it only formats; the client posts.