Mention it in Slack like a teammate, describe a feature or a bug, and it plans, codes, tests, and opens a pull request on GitHub.
Slack2PR is a Hexabot app that automates the software development lifecycle end to end: a Slack message triggers an agentic workflow that interviews you about requirements, breaks the work into components, implements them one by one inside a sandboxed clone of your repository, writes unit tests, and replies in the thread with a PR link. It exists to answer the question every Hexabot engineer eventually gets asked: "Are you using it yourself?" — yes, even to build Hexabot.
Watch the YouTube video demo.
Slack message
│
▼
Slack channel (hexabot-channel-slack)
│
▼
Slack2PR workflow ── classify intent
│
├─ develop → requirements interview → plan components → implement each
│ in a loop → write unit tests → open PR → reply with the URL
├─ bug → read-only investigation rounds → user picks "dig deeper" /
│ "fix it" / "stop" → approved fixes ship as a PR
└─ question → read-only code inspection → concise answer in the thread
Three building blocks:
- Slack channel — the Slack channel integration (
hexabot-channel-slack) connects a Slack workspace to Hexabot, so mentioning the bot starts a conversation thread. - Slack2PR workflow — workflows/Slack2PR.workflow.yml orchestrates the whole cycle: intent classification, a quick-reply requirements interview, and the plan → implement loop → test → PR pipeline, with thread-scoped memory carrying the plan and todo list between steps.
- AI coding agent action — src/extensions/actions/coding/ is a custom Hexabot action (
ai_coding_agent) that runs a coding harness inside a Docker sandbox.
The heart of this project. It wraps TanStack AI sandboxes (@tanstack/ai-sandbox + @tanstack/ai-sandbox-docker) as a Hexabot workflow action:
- Pluggable harnesses — runs Claude Code, Codex, OpenCode, or Grok Build; pick the harness and model per task in the workflow YAML. Harness CLIs are installed into the sandbox automatically when missing.
- Sandboxed workspaces — each conversation thread gets a Docker container with a clone of the target repository at
/workspace. The sandbox is reused across the thread (per_threadlifecycle) so the plan, the implemented components, and the harness session survive between workflow steps, then torn down when the thread closes or goes idle. - Git and GitHub ready — HTTPS git auth and the GitHub CLI are pre-configured from Hexabot credentials, so the agent can branch, commit, push, and
gh pr createwithout ever seeing the raw token. - Plan contract — with
plan_mode: optional | required, the action injects a structured-output contract into the system prompt and parses the returned plan and todo list into thread memory, so the workflow can loop over todos deterministically (one component per iteration). - Session resume — the harness session id is persisted in thread-scoped memory, letting later steps (implement, test, PR) continue the same agent session.
- Guardrails — command allow/ask/deny policies (with
sudo,rm -rf, etc. denied by default), file read/write policies, and secrets injected as environment variables only.
Layout of src/extensions/actions/coding/:
| File | Purpose |
|---|---|
ai-coding-agent.action.ts |
The action: prompt building, sandbox lease per thread, plan enforcement, memory persistence. |
ai-coding-agent.runtime.ts |
Sandbox definition and TanStack chat run wiring. |
ai-coding-agent.schemas.ts |
Zod input / output / settings contracts. |
ai-coding-agent.constants.ts |
Harness defaults, plan contract prompt, git/GH bootstrap commands. |
ai-coding-agent.modules.ts |
Lazy loading of the TanStack AI modules. |
ai-coding-agent.utils.ts |
State-block parsing, session helpers. |
Requirements:
- Node.js
24.17.x - Docker (required — the coding agent runs its sandboxes in Docker)
- A Slack app for your workspace (setup guide)
- A GitHub token and an LLM provider API key for the workflow defaults, or credentials for the harness/model provider you choose
Run it:
npm install
cp .env.example .env # set SEED_ADMIN_* before first startup
npm run dev # or: hexabot devThe admin UI runs at http://localhost:3000. Then:
- Create credentials in the admin UI:
- GitHub: create a personal access token that can clone, push branches, and open pull requests on the target repository. A fine-grained PAT should grant Contents: read/write and Pull requests: read/write; a classic PAT needs equivalent
repoaccess. - Google AI: the bundled workflow uses Google Generative AI (
gemini-*) for both the interview model and the default OpenCode coding-agent runs, so use a paid-tier Google AI key.
- GitHub: create a personal access token that can clone, push branches, and open pull requests on the target repository. A fine-grained PAT should grant Contents: read/write and Pull requests: read/write; a classic PAT needs equivalent
- Import the workflow: in the admin UI, open the workflow visual editor and import workflows/Slack2PR.workflow.yml.
- Configure the imported workflow: point every
repositoryinput at your target repo, replace the mock GitHub and Google AI credential placeholders with the credentials you created, and review the AI coding agent settings before publishing. - Adapt the coding stack if needed: each
ai_coding_agentstep can use a different harness and model. The action supports Claude Code, Codex, OpenCode, and Grok Build; updateharness,model,agent_api_key, andagent_api_key_envto match the provider you want. If you replace Google AI entirely, update theinterview_modelbinding too. You can use another hosted provider, or a local provider, as long as the selected harness can reach it from inside the Docker sandbox. - Connect Slack via the Slack channel integration and subscribe the workflow to it.
- Mention the bot in Slack: "Add a dark-mode toggle to the settings page" — answer a couple of quick-reply questions, and watch the PR arrive.
| Task | Command |
|---|---|
| Local dev | npm run dev or hexabot dev |
| Build | npm run build |
| Tests | npm test |
| Lint | npm run lint |
| Production start | npm run start:prod |
| Diagnostics | hexabot check |
| Path | Purpose |
|---|---|
src/main.ts |
Boots the Hexabot app. |
src/app.module.ts |
Root module. |
src/extensions/actions/coding/ |
The ai_coding_agent action (TanStack AI sandboxes). |
workflows/Slack2PR.workflow.yml |
The Slack2PR workflow bundle (workflow, memory definition, credential refs). |
hexabot.config.json |
CLI scripts, env paths, and package manager config. |
Hexabot lets you build agentic workflows across channels — conversational, scheduled, tool-calling, memory-aware. Slack2PR is the dogfooding proof: if a workflow engine can automate the software development lifecycle itself — requirements, planning, implementation, testing, code review conversations, and delivery — it can automate anything. Fork it, point it at your repo, and put your AI teammate on payroll.