As a resident process, Welt connects to Slack over Socket Mode: main.py holds the connection open, and Slack pushes events down it. Nothing has to be reachable from the internet, so there is no request URL to configure. The container image ghcr.io/iwamot/welt packages that process for hosting.
The setup below assumes you already have an agent on AgentCore Runtime, or a managed harness, for Welt to invoke.
-
Create a Slack app from
manifest.yml— the pre-filled creation screen is the quickest way there. Two tokens come out of it:- In Basic Information > App-Level Tokens, generate a token with the
connections:writescope (xapp-1-...). - In Install App, install the app to your workspace and copy the Bot User OAuth Token (
xoxb-...).
- In Basic Information > App-Level Tokens, generate a token with the
-
Run the image with those tokens and the ARN to invoke:
docker run -it \ -e SLACK_APP_TOKEN=xapp-1-... \ -e SLACK_BOT_TOKEN=xoxb-... \ -e AGENT_ARN=arn:aws:bedrock-agentcore:... \ ghcr.io/iwamot/welt:latest
Welt picks up AWS credentials the standard SDK way. The container cannot see your local profile, so pass them in as environment variables too, or let the hosting environment's IAM role provide them on AWS. Either identity needs
bedrock-agentcore:InvokeAgentRuntime, andbedrock-agentcore:InvokeAgentRuntimeForUserbecause Welt sends the verified Slack user as theruntimeUserId.
- Configuration lists the optional environment variables.
- Running from source works the same way:
uv run --env-file .env main.py, as in the Quick Start, withAGENT_ARNadded to the.envfile. - Running more than one replica is fine, during a rolling update or all the time. Slack's Socket Mode guide allows up to 10 open connections per app and says that "each payload may be sent to any of the connections", so no replica can count on receiving a given event. Welt keeps nothing per thread in the process: interrupt state lives in the Slack message, history is read back from the thread, and the session lives on AgentCore. Slack does not promise that a payload never reaches two connections, so if a repeated turn would matter, make the agent's side effects idempotent.