CopilotKit/OpenTag

OpenTag: The Channels SDK starter application, a self-hosted AI on-call triage bot for Slack and Microsoft Teams, built with AG-UI and LangGraph. Fork it and ship your own.

OpenTag – a self‑hosted AI knowledge‑work assistant for Slack & Microsoft Teams

What it is

  • An open‑source application that wires a LangGraph‑based Python agent (the “brain”) to a Node.js runtime that talks to CopilotKit’s Intelligence Channels. The channel handles all the Slack / Teams plumbing, authentication, state‑tracking and delivery, while the agent does the reasoning, tool use and content generation.
  • The result is a bot you can install in a Slack workspace (or Teams) that can ingest files, run searches, create Linear issues, write Notion pages, and render native Slack UI elements such as line charts, tables and interactive approval cards.

Core components

Component Language / Tech Role
Channel runtime Node.js (TypeScript) Hosts the CopilotKit runtime, registers a managed channel with CopilotKit Intelligence, and renders UI components in Slack/Teams threads.
Agent Python (LangGraph) Implements the actual LLM‑driven workflow, defines prompts, tools, and the interrupt‑resume logic for write‑confirmation.
Tools Various APIs (OpenAI, Tavily, GitHub, Linear, Notion, PostHog) Provide data sources and write‑back capabilities that the agent can call.
Deployment helpers Railway config, optional AWS ECS Fargate setup One‑click deployment scripts that start two services (runtime + agent) and expose the required environment variables.

Key features (as shown in the README demo)

  • File‑aware prompts – upload a CSV and the bot replies with a native Slack line chart and a concise insight.
  • Human‑in‑the‑loop approvals – when the agent wants to create a Linear issue or a Notion page it sends an interactive card; the user can approve or reject before the write happens.
  • Live web research – with a Tavily API key the bot can browse the web, return a table of results and cite the sources.
  • Rich rendering – tables, charts, issue cards, diagrams are displayed directly in the Slack thread, not as plain text.
  • Multi‑platform – works out‑of‑the‑box with Slack; Teams support is already integrated, and other messengers are planned.
  • Managed channel option – you can let CopilotKit host the channel (free tier) or run the open‑source Channels SDK yourself.

Getting started (quick‑start summary)

  1. Install prerequisites: Node 22+, pnpm, Python 3.12, uv, a CopilotKit account, OpenAI key, and a Slack workspace where you can install an app.
  2. pnpm install to fetch Node dependencies.
  3. Create a managed channel via the CopilotKit CLI (npx copilotkit@latest channels setup or the manual project select + channels add flow). This registers a Slack app manifest automatically.
  4. Copy .env.example to .env and fill in the OpenAI key, the CopilotKit Intelligence API key, the channel name (open-tag by default), and optionally any tool credentials (Tavily, GitHub, Linear, Notion, etc.).
  5. Run pnpm dev. The script syncs the Python environment, launches the LangGraph agent with hot‑reload, and starts the Node runtime in watch mode.
  6. Invite the bot in Slack: /invite @OpenTag.
  7. Test it: mention the bot (@OpenTag what changed in the last deploy?) and watch the threaded replies.

Typical use‑cases

  • Data summarisation – drop a spreadsheet and get an instant visual summary with takeaways.
  • Project tracking – ask the bot to create or update Linear tickets, with a confirmation step.
  • Research assistance – ask for market trends; the bot fetches live web results, builds a table, and cites sources.
  • Documentation updates – generate Notion pages or update existing ones from conversational prompts.

Architecture at a glance

Slack / Teams  →  HTTPS request URL (managed by CopilotKit Intelligence)
                     ↓
          CopilotKit Intelligence (auth, delivery, state)
                     ↓  outbound WebSocket
          Node runtime (CopilotRuntime + Channels SDK)
                     ↓  AG‑UI HTTP calls
          Python LangGraph agent (OpenAI + optional tools)
  • The Slack/Teams side never needs a public tunnel; Intelligence forwards messages to the runtime.
  • The runtime opens a persistent outbound WebSocket to Intelligence, authenticating with INTELLIGENCE_API_KEY.
  • The agent communicates with the runtime via the AG‑UI HTTP protocol; any AG‑UI‑compatible backend could be swapped in by changing AGENT_URL.

Deployment options

  • Railway – two services (runtime + agent) defined in .railway/railway.ts; images are published to GitHub Container Registry (ghcr.io/copilotkit/opentag‑agent and …‑runtime).
  • AWS – a single ECS Fargate task with Secrets Manager for env vars and optional Datadog log forwarding (see deployment/aws/README.md).

Customization points (each is a single file or directory, making for easy forking)

  • Bot persona & system prompt → agent/prompts/system.py
  • Tool set & credentials → agent/tools.py & agent/internal_sources.py
  • UI components (cards, charts, tables) → app/components/ and app/tools/
  • Channel triggers & commands → app/channel.tsx
  • Write‑confirmation interceptor → agent/write_confirmation.py
  • Deployment topology → .railway/railway.ts

Where to find more

  • Full channel SDK docs: https://github.com/CopilotKit/channels-sdk
  • Runtime source: server.ts and app/index.ts
  • Agent source: agent/agent.py (LangGraph graph definition) and agent/prompts/
  • License: MIT (see LICENSE).

Bottom line: OpenTag is a production‑ready, self‑hosted AI assistant that brings LLM‑driven knowledge‑work directly into the Slack/Teams conversations where people already collaborate. It bundles a LangGraph agent, a Node runtime, and CopilotKit’s managed channel infrastructure, and it can be deployed with a single command or customized by editing a handful of well‑organized files.

관련

  • 프로젝트
  • 프로젝트
  • 프로젝트
  • 프로젝트
  • Dispatch