cd /news/ai-agents/channelstack-your-app-s-whole-world-… · home › topics › ai-agents › article
[ARTICLE · art-179747] src=channelstack.dev ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Channelstack – Your app's whole world, on localhost

Channelstack launched a local test harness that recreates Slack, GitHub, Linear, Notion, Resend, Gmail and Discord on a developer's machine, and also fakes OpenAI's API so the model behind an AI agent can be scripted. The tool delivers signed webhooks, real payload shapes and real IDs, letting developers script users and model responses, run their app through its real code path, and assert on what a person would see, including Slack block_actions, chat.startStream and assistant.threads events, GitHub X-Hub-Signature-256 redelivery, Linear AgentSessionEvent stop signals and Notion X-Notion-Signature payloads.

key takeaway

Channelstack lets developers test Slack, GitHub, Linear, Notion, Resend, Gmail and Discord bots and AI agents locally with signed webhooks and real payload shapes, including a faked OpenAI API for scripted model responses.

read8 min views4 publishedDec 1, 2026
Channelstack – Your app's whole world, on localhost
Image: source

Slack

DMs, mentions, threads, buttons and the agent view, with progress streams rendered the way people see them.

  • Events API
  • block_actions
  • chat.startStream
  • assistant.threads
  • agent_session_stopped

Test harness for Slack, GitHub, Linear, Notion, Resend, Gmail and Discord apps, and the model behind them

channelstack recreates Slack, GitHub, Linear, Notion, Resend, Gmail and Discord on your machine, for the bots, integrations and AI agents you build on them, and fakes OpenAI’s API for your agent’s model too. Script the people and what the model answers, let your app answer through its real code path, and assert on what a person would see. Signed webhooks, real payload shapes and real ids, with no changes to how your app works.

import { expect, test } from "vitest";test("ships a PR from a Slack DM", async ({ slack }) => {  const ana = await slack.createUser({ name: "ana" });  const dm = { to: slack.app };  const msg = await ana.say("@my-agent ship #812 to staging", dm);  await expect(msg.thread).toHaveStatusText(/checking CI/);  const ask = await msg.thread.waitForReply({ from: "my-agent" });  await expect(ask).toHaveButton("Approve");  await ana.click("Approve", { message: ask });  await expect(msg.thread).toContainText(/Deployed/, { count: 1 });  await expect(msg.thread).not.toContainText("Thinking…");});

ana 10:42 AM

@my-agent ship #812 to staging

my-agent APP 10:42 AM

Deploy #812 to staging? CI passed 4 minutes ago, 2 files changed.

ApproveCancel

my-agent APP 10:43 AM

Deployed #812 to staging in 41s. ana approved it.

message.im event to your appblock_actions when Ana clicks Approve

test("answers on the issue and ignores itself", async ({ github }) => {  const mo = await github.createUser({ login: "mo" });  const repo = await github.createRepo({    collaborators: [mo],    apps: [github.app],  });  const issue = await mo.openIssue({ title: "500s on Safari" }, { repo });  const comment = await mo.comment("@my-agent take a look?", { issue });  await expect(issue).toHaveCommentFrom("my-agent", { text: /Safari/ });  // the same delivery again must not start a second run  await comment.delivery!.redeliver();  await expect(issue).toHaveCommentsFrom("my-agent", { count: 1 });});

500s on Safari #1

mo commented now

@my-agent take a look?

my-agent bot commented now

Reproduced on Safari 17: the session cookie is dropped on the redirect. A fix is on the way.

issue_comment redelivered with the same GUID

apps`` X-Hub-Signature-256

test("Stop ends a working session", async ({ linear }) => {  const kai = await linear.createUser({ name: "Kai" });  const team = await linear.createTeam({ key: "ENG", members: [kai] });  const issue = await kai.createIssue({ title: "Migrate cron" }, { team });  const session = await kai.delegate(linear.app, { issue });  await expect(session).toHaveActivity({ type: "thought" });  await kai.stop({ session });  await expect(session).toHaveSessionState("complete");});

Migrate cron

In ProgressKKaiRmy-agent

Activity

Rmy-agent AgentComplete

Reading the cron definitions in billing/cron.ts…

Kai stopped the session

AgentSessionEvent in Linear’s current shapeprompted event carrying the stop signal

test("answers a mention in the same discussion", async ({ notion }) => {  const ana = await notion.createUser({ name: "Ana" });  const page = await notion.createPage({    title: "Roadmap",    content: "# Q1\n- ship search",    connections: [notion.app],  });  const comment = await ana.comment("@my-agent summarize", { page });  const thread = comment.discussion;  await expect(thread).toHaveCommentFrom("my-agent", { text: /search/ });  await expect(thread).toHaveCommentsFrom("my-agent", { count: 1 });});

Roadmap

Q1

Ana Just now

@my-agent summarize

my-agent Just now

Q1 has one goal: ship search.

X-Notion-Signature`` page.content_updated batched the way Notion does

test("answers once, even when Resend retries", async ({ resend }) => {  const ana = await resend.createUser({ name: "Ana" });  const email = await ana.send({    to: [resend.app],    subject: "Refund",    text: "Where is my refund for #4411?",  });  const answer = await email.thread.waitForReply({ from: "my-agent" });  expect(answer.text).toMatch(/refund/i);  // Resend delivers the webhook again, with the same svix-id  await email.delivery!.redeliver();  await expect(email.thread).toHaveRepliesFrom("my-agent", { count: 1 });});

Refund

Ana ana@example.com9:14 AM

to my-agent@acme.resend.app

Where is my refund for #4411?

my-agent my-agent@acme.resend.app9:14 AM

to ana@example.com

Your refund for #4411 went out on Monday. It reaches your card within 5 days.

Resend delivered email.received again, with the same svix-id

email.received, signed the Svix way svix-id

test("answers in Ana's thread", async ({ google }) => {  const ana = await google.createUser({ name: "Ana" });  const email = await ana.send({    to: [google.app],    subject: "Invoice",    text: "Can you resend the March invoice?",  });  const answer = await ana.waitForEmail({ from: google.app });  expect(answer.subject).toBe("Re: Invoice");  expect(answer.thread.id).toBe(email.thread.id);  await expect(email.thread).toHaveRepliesFrom("my-agent", { count: 1 });});

Invoice Inbox ×2 in this thread

my-agent my-agent@example.com

to me

Here is the March invoice again, attached.

history.list and messages.get from the mailboxmessages.send by threadId and In-Reply-To

test("answers a mention once, quoting it", async ({ discord }) => {  const ana = await discord.createUser({ name: "Ana" });  const channel = await discord.createChannel({ name: "support", participants: [ana, discord.app] });  const msg = await ana.say("@my-agent why is the build red?", { channel });  const answer = await msg.waitForReply({ from: "my-agent" });  expect(answer.replyTo).toBe(msg.id);  await expect(msg).toHaveRepliesFrom("my-agent", { count: 1 });});

Ana Today at 10:42 AM

@my-agent why is the build red?

@Ana why is the build red?

my-agent APP Today at 10:42 AM

The lint step fails on main since 9:58: an unused import in api/routes.ts.

MESSAGE_CREATE over the Gateway, with its content under MESSAGE_CONTENT

test("answers from a tool call, once", async ({ slack, openai }) => {  const ana = await slack.createUser({ name: "Ana" });  const channel = await slack.createChannel({ name: "ops", participants: [ana, slack.app] });  const ai = await openai.respond([    { toolCalls: [{ name: "search_incidents", arguments: { since: "yesterday" } }] },    "Two incidents yesterday: the web deploy and a DNS blip.",  ]);  const msg = await ana.say("@my-agent what broke yesterday?", { channel });  await expect(ai).toHaveOfferedTool("search_incidents");  await expect(ai).toHaveSentToolResult("search_incidents", { text: /migration/ });  await expect(msg.thread).toHaveReplyFrom("my-agent", { text: /DNS blip/ });  await expect(msg.thread).toHaveRepliesFrom("my-agent", { count: 1 });  await expect(ai).toHaveAnswered({ times: 2 });  await expect(openai).not.toHaveSentSecrets();});

ana 9:30 AM

@my-agent what broke yesterday?

my-agent APP 9:30 AM

Two incidents yesterday: the web deploy and a DNS blip.

Model callsPOST /v1/chat/completions

PASS2 calls, both scripted · no secrets sent

openai.localhost/v1, from OPENAI_BASE_URL Seven platforms and the model, one API

One package fakes all seven, with the people, events and API calls apps actually use, and the OpenAI API your agent’s model runs on. Use one in a test, or several when your app spans them. Stripe comes next.

Apps with installations, signed deliveries with real GUIDs, and redelivery for dedupe tests.

Issues, comments and their webhooks, and agent sessions end to end: delegation, prompts, activities and Stop.

Pages, databases and comments, with webhooks when someone mentions your integration.

Email agents: people email your agent, it reads the mail back and answers in their thread, with Svix-signed webhooks and Resend's test addresses.

Gmail agents: a watched mailbox, Pub/Sub pushes with tokens verifyIdToken checks, history to read, and answers sent in the thread.

Discord bots: a guild your bot hears over the Gateway, threads and DMs, and slash commands and buttons as Ed25519-signed interactions it answers within 3 seconds.

The model your agent runs on, scripted per test: text, streams, tool calls, errors and a slow first token, images, audio and built-in tools, on OpenAI’s API. A call no script answers fails the test.

Why channelstack

Integrations break in the gaps between systems: a webhook signed the wrong way, a payload shape that changed last month, a stray progress message nobody asserted on. channelstack closes those gaps.

channelstack env points your app’s own SDKs at slack.localhost, github.localhost and friends, and its model at openai.localhost. Apps with hard-coded hosts use proxy mode instead: set HTTPS_PROXY and trust a CA that only that app sees.

Every response and webhook is checked against the providers’ own schemas: OpenAPI descriptions, GraphQL introspection and recorded traffic. When a platform changes, your build goes red instead of quietly wrong.

Write ana.click("Approve", { message }) instead of hand-building a block_actions body. People post, reply, review, delegate and press Stop, with correct signatures, retries and delivery IDs.

Streams, status lines, edits and ephemeral messages render into one transcript. toHaveRepliesFrom(…, { count: 1 }) catches the double post. not.toContainText catches the leftover “Thinking…” reply.

How it works

Your test scripts the people. channelstack delivers what the platform would deliver, and your app answers with its real SDKs, into the same fake workspace your test reads back.

Compared

Real sandbox workspaces are slow, shared and flaky in CI. Mocks are fast but only prove your code matches your own guess. channelstack keeps the speed and drops the guessing.

Hand-written mocks API emulators Real sandbox workspace channelstack
Your code unchanged No Base URL overrides Yes Yes: a base URL, or a proxy
Platform calls your app No Some webhooks Yes Signed, retried, replayable
Scripted people No No Manual or second bot Built in
Payload shapes checked No No They’re real Against provider schemas
Assert on what people see No Raw state Screenshots Rendered transcript
Offline, parallel CI Yes Yes No Yes
Same test against the real platform No No Yes Live mode

Quick start

Step 1

One package: the server, the CLI, the UI and the test integrations.

$ npm i -D channelstack

Step 2

Start channelstack with where your app takes events, then start the app the way you always do, with channelstack’s environment.

$ CHANNELSTACK_SLACK_WEBHOOK_URL=http://localhost:3000/slack/events npx channelstack$ npx channelstack env >> .env.local$ pnpm dev

Step 3

Add the plugin and run your tests as usual. A failure says what a person sees, and what the app left open.

vitest.config.ts

import channelstack from "channelstack/vitest";import { defineConfig } from "vitest/config";export default defineConfig({  plugins: [channelstack()],});
bash
$ npx vitest✓ deploy.test.ts (1) 2.7s

Why “channelstack”? Your app lives in a stack of channels: Slack, GitHub, Linear, Notion, Resend, Gmail, Discord. channelstack runs that whole stack on localhost, with the people in it and the model your agent runs on, so you can test the conversation end to end before your users have it.

── more in #ai-agents 4 stories · sorted by recency
── more on @channelstack 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/channelstack-your-ap…] indexed:0 read:8min 2026-12-01 · —