Slack Bot
Scaffolds a TypeScript Slack bot using @slack/bolt with Socket Mode for local development and HTTP for production. Includes AI-powered message and app-mention handlers, an optional /ask slash command, a pluggable LLM provider registry that defaults to the Platform's ModelGateway and holds no model credential (a direct Bedrock Converse provider with prompt caching, under the AWS credential chain, for use off the substrate; no provider holds a provider key), and thread-aware conversation context for multi-turn AI responses.
| Name | slack-bot |
| Version | 0.1.0 |
| Category | applications |
| License | Apache-2.0 |
| Persona | engineering |
| Tags | typescript, slack, bot, ai, chatbot, model-gateway, bedrock |
| Source | templates/slack-bot |
Render it
Three front doors, one catalog. Pick whichever suits the caller.
# CLI
npx @nanohype/sdk render slack-bot --out ./my-app
# SDK
import { LocalSource, renderTemplate } from "@nanohype/sdk";
const result = await renderTemplate(source, "slack-bot", variables);
# MCP — from an agent
get_template({ name: "slack-bot" })Prerequisites
| Tool | Version | Why |
|---|---|---|
node | >=26 | Node.js runtime for the Slack bot |
Variables
Required
ProjectNamestring- Kebab-case project name, used as package name and directory Must be lowercase kebab-case starting with a letter.
Optional
Descriptionstring — defaults toA Slack bot with AI- Short project description for package.json and README
LlmProviderstring — defaults togateway- Default LLM provider: gateway (the Platform ModelGateway, which holds the Bedrock role on the nanohype substrate), bedrock (Bedrock called directly under the AWS credential chain, off the substrate), mock, or a custom name
PlatformNamestring — defaults to${ProjectName}- Name of the Platform CR this project deploys under. The gateway provider defaults MODEL_GATEWAY_ENDPOINT to the Service the eks-agent-platform operator creates for it, <PlatformName>-gateway in namespace tenants-<PlatformName>
IncludeSlashCommandsbool — defaults totrue- Include the /ask slash command
IncludeTestsbool — defaults totrue- Include test files with vitest
What it produces
30 files. Placeholder names such as __APP_NAME__ are what the renderer substitutes into.
.dockerignore
.env.example
.github/workflows/ci.yml
.gitignore
biome.json
Dockerfile
package.json
README.md
src/__tests__/config.test.ts
src/__tests__/message.test.ts
src/bootstrap.ts
src/commands/ask.ts
src/config.ts
src/events/app-mention.ts
src/events/message.ts
src/index.ts
src/logger.ts
src/metrics.ts
src/providers/__tests__/bedrock.test.ts
src/providers/__tests__/gateway.test.ts
src/providers/bedrock.ts
src/providers/gateway.ts
src/providers/index.ts
src/providers/mock.ts
src/providers/registry.ts
src/providers/types.ts
src/resilience/__tests__/circuit-breaker.test.ts
src/resilience/circuit-breaker.ts
tsconfig.json
vitest.config.tsComposes with
- Pairs with
module-queue-ts - Pairs with
module-database-ts - Pairs with
agentic-loop - Nests inside
monorepo