configuration


createChannel(options) takes more than an agent and adapters. This page covers the configuration you reach for most. For the full option list, see the Channel API.

Every channel runs through the Intelligence runtime, so running one requires a CopilotKit Intelligence key (free tier available) — for both managed and direct channels. See the Quickstart for the run pattern.

Identity and connection#

OptionWhat it does
nameProject-unique name. Required — the runtime keys the channel's lifecycle by it (and, for a managed channel, ties it to the dashboard setup).
agentThe agent, or a (threadId) => agent factory. See the Quickstart.
adaptersDirect platform adapters. Attach several to run one bot on many platforms.
providerFor a no-adapter managed channel: the platform to declare to Intelligence. Defaults to "slack"; "teams" is gated.
// A managed channel: Intelligence hosts the transport, so no adapter.
const channel = createChannel({
  name: "support-bot",
  agent,
});

Per-thread state#

Give store.state a schema and thread.state() / thread.setState() become typed to it and validated on write. Good for tracking where a conversation is in a flow.

import { z } from "zod";

const channel = createChannel({
  name: "support-bot",
  agent,
  store: {
    state: z.object({ step: z.enum(["idle", "awaiting_approval"]) }),
  },
});

channel.onMessage(async ({ thread }) => {
  await thread.setState({ step: "awaiting_approval" }); // validated
  const state = await thread.state(); // { step: "idle" | "awaiting_approval" } | undefined
});

The rest#

OptionSee
tools, contextTools and context
componentsUI library
commandsCommands and reactions
store.adapter (durable backend)Persistence
store.identity + store.transcriptsTranscripts