# channelstack > channelstack is a test harness for apps and AI agents that live in Slack, GitHub, Linear, Notion, email (Resend and Gmail) and Discord. One server fakes those platforms in memory, and OpenAI's API for the agent's model: tests act as people (`ana.say("@my-agent hi", { channel })`) and check what a person would see (`expect(thread).toHaveReplyFrom("my-agent")`). The same tests run against the real platforms in live mode. SDKs for TypeScript (Vitest), Python (pytest) and Rust. Every page below is Markdown; any docs page's URL plus `.md` gives its Markdown. All pages in one file: https://channelstack.dev/llms-full.txt. To search the docs from an agent, add the MCP server at https://channelstack.dev/mcp (Streamable HTTP, no sign-in). ## Introduction - [Overview](https://channelstack.dev/docs.md): channelstack is a test harness for the apps and agents you build for Slack, GitHub, Linear, Notion, Resend, Gmail and Discord, and the OpenAI model behind them: fake platforms on localhost, scripted people, honest assertions. - [Why channelstack](https://channelstack.dev/docs/why.md): Why apps and agents built on Slack, GitHub, Linear, Notion, Resend, Gmail and Discord are hard to test, what mocking the SDK misses, and why channelstack fakes the platform, and the agent's model, instead. - [Getting started](https://channelstack.dev/docs/getting-started.md): From an empty folder to a passing test: start channelstack, run a small Slack bot against it, and write a first Vitest test. ## Quickstarts - [Chat SDK](https://channelstack.dev/docs/quickstarts/chat-sdk.md): Run a Chat SDK bot against channelstack's fake Slack, pass a first Vitest test, then point the same bot at GitHub and Linear. - [AI SDK](https://channelstack.dev/docs/quickstarts/ai-sdk.md): Stream an AI SDK answer into Slack from a Bolt app, on the AI SDK's OpenAI provider pointed at the fake OpenAI, and test the status line, the stream and Stop. - [Pi](https://channelstack.dev/docs/quickstarts/pi.md): Embed the Pi coding agent in a Slack bot with its SDK, give it a scripted model with pi-ai's faux provider, and test it against the fake Slack. - [LangChain](https://channelstack.dev/docs/quickstarts/langchain.md): Stream a LangChain answer into Slack from a Bolt app, on ChatOpenAI pointed at the fake OpenAI, and test the stream, the status line and a tool call. ## Guide - [How it works](https://channelstack.dev/docs/guide/how-it-works.md): One server fakes Slack, GitHub, Linear, Notion, Resend, Google (Gmail), Discord and your agent's model; tests, the CLI, MCP and the UI drive it through one control API. - [Connecting your app](https://channelstack.dev/docs/guide/connecting-your-agent.md): Start the server, give your app the env from channelstack env, point each SDK at the fakes and tell the server where the app listens. - [Writing tests](https://channelstack.dev/docs/guide/writing-tests.md): Add the Vitest plugin, create people and places per test, act as those people, give the app access, and read what the app did. - [Waiting and quiet](https://channelstack.dev/docs/guide/waiting-and-quiet.md): Why every matcher waits, how negative and exact-count checks decide the app is done, and what a failure tells you. - [Delivery and failures](https://channelstack.dev/docs/guide/delivery-and-failures.md): Test how your app handles retries, redelivery, bad signatures, stale timestamps, rate limits, dropped sockets and an uninstall. - [Standard checks](https://channelstack.dev/docs/guide/standard-checks.md): Add channelstack's standard behaviour checks to a Vitest suite: what each one catches, the options they need, and how to skip one. - [Several apps](https://channelstack.dev/docs/guide/several-apps.md): Test agents that work together, or beside another bot: add apps by name, run a second agent as one, script an app that talks back, and catch two agents answering each other without end. - [pytest](https://channelstack.dev/docs/guide/pytest.md): Test your app from Python with pytest-channelstack: install, configure, use the fixtures and check with expect(...). - [The dev loop: CLI and UI](https://channelstack.dev/docs/guide/dev-loop.md): Talk to your app by hand while you build it, read what it answered, watch what it called, and redeliver events, from the terminal or the UI. - [MCP for coding agents](https://channelstack.dev/docs/guide/mcp.md): Give a coding agent the attach CLI as MCP tools, so it can post as a person, read the bot's answer, redeliver and check again while it edits the bot. - [Proxy mode](https://channelstack.dev/docs/guide/proxy-mode.md): Test an app that hard-codes slack.com or api.github.com, with no code change, through channelstack's HTTP proxy and its own name-constrained CA. - [Live mode](https://channelstack.dev/docs/guide/live-mode.md): Run the same tests against real sandbox workspaces: set credentials, allowlist the sandboxes, sign people in for the browser actor, and clean up. - [Running in CI](https://channelstack.dev/docs/guide/ci.md): A GitHub Actions job that starts channelstack, points your app at it and runs the tests, plus a nightly job against real sandboxes. - [Troubleshooting](https://channelstack.dev/docs/guide/troubleshooting.md): Symptoms, their causes and fixes: nothing delivered, TLS errors, timeouts, slow negative checks, not_in_channel, skipped live tests, ports and stale secrets. ## Platforms - [Slack](https://channelstack.dev/docs/platforms/slack.md): Test a Slack bot, app or agent against channelstack's fake Slack, from connecting Bolt or the Chat SDK to buttons, modals, streams, Stop and retries. - [GitHub](https://channelstack.dev/docs/platforms/github.md): Test a GitHub App against channelstack's fake GitHub, from connecting Octokit or Probot to issues, pull requests, reviews, check runs and redelivery. - [Linear](https://channelstack.dev/docs/platforms/linear.md): Test a Linear integration or agent against channelstack's fake Linear, from connecting @linear/sdk to issue and comment webhooks, delegation, agent sessions and Stop. - [Notion](https://channelstack.dev/docs/platforms/notion.md): Test a Notion integration against channelstack's fake Notion, from connecting @notionhq/client to comments, discussions, page edits, database rows and connections. - [Resend](https://channelstack.dev/docs/platforms/resend.md): Test an agent people email, built on Resend: point the resend SDK at the fake, send it email as people, and check its answers arrive in the thread. - [Google](https://channelstack.dev/docs/platforms/google.md): Test an agent people email at its Gmail address: point googleapis and google-auth-library at the fake, send it email as people, and check its answers arrive in the thread. - [Discord](https://channelstack.dev/docs/platforms/discord.md): Test a Discord bot or agent: point discord.js at the fake, script people in a guild, run slash commands and press buttons, and check the bot's answers. - [OpenAI](https://channelstack.dev/docs/platforms/openai.md): Script what your agent's model answers with the fake OpenAI: text, streams, tool calls and errors, a slow first token, a stream that breaks, images, audio, files, OpenAI's built-in tools, and what your agent sent. ## Reference - [Overview](https://channelstack.dev/docs/reference.md): The channelstack reference: the CLI, environment variables and SDKs, every platform's API, and the test API: the Vitest plugin, the client, the matchers and errors. ## Reference: Tools - [CLI](https://channelstack.dev/docs/reference/cli.md): Every channelstack command, grouped as `channelstack --help` groups them: what it does, its flags, what it prints, how it fails, and how to get help from the CLI itself. - [Environment variables](https://channelstack.dev/docs/reference/environment-variables.md): Every environment variable channelstack reads or prints: the server's settings, the clients', the live credentials and allowlists, and what the app gets. - [SDKs](https://channelstack.dev/docs/reference/sdks.md): The TypeScript, Python and Rust SDKs: installing, connecting, modes, naming in each language, errors, waits, disposal and the control API underneath. ## Reference: Platform APIs - [Slack API](https://channelstack.dev/docs/reference/api/slack.md): Every handle, method and wait of the Slack fake, in every SDK's language. - [GitHub API](https://channelstack.dev/docs/reference/api/github.md): Every handle, method and wait of the GitHub fake, in every SDK's language. - [Linear API](https://channelstack.dev/docs/reference/api/linear.md): Every handle, method and wait of the Linear fake, in every SDK's language. - [Notion API](https://channelstack.dev/docs/reference/api/notion.md): Every handle, method and wait of the Notion fake, in every SDK's language. - [Resend API](https://channelstack.dev/docs/reference/api/resend.md): Every handle, method and wait of the Resend fake, in every SDK's language. - [Google API](https://channelstack.dev/docs/reference/api/google.md): Every handle, method and wait of the Google fake, in every SDK's language. - [Discord API](https://channelstack.dev/docs/reference/api/discord.md): Every handle, method and wait of the Discord fake, in every SDK's language. - [OpenAI API](https://channelstack.dev/docs/reference/api/openai.md): Every handle, method and wait of the OpenAI fake, in every SDK's language. ## Reference: Test API - [Vitest plugin](https://channelstack.dev/docs/reference/vitest-plugin.md): The channelstack() Vitest plugin from channelstack/vitest: its options, its modes, what it adds to a run, and the fixtures every test gets. - [Client and sessions](https://channelstack.dev/docs/reference/api/client.md): The channelstack client and sessions: every method, in every SDK's language. - [Matchers](https://channelstack.dev/docs/reference/matchers.md): Every channelstack matcher: its subject, arguments and options, how it waits, what its failure message shows, and its name in Python and Rust. - [Errors](https://channelstack.dev/docs/reference/api/errors.md): Every error code the control API returns: channelstack's own, and the platforms' codes the fakes refuse with.