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 & Teams

What it is – OpenTag is a ready‑to‑run, open‑source “knowledge‑work agent”. It connects a large‑language‑model‑driven Python agent (built with LangGraph) to Slack and Microsoft Teams via the CopilotKit Channels SDK. The repo ships a complete Node + Python stack, a few UI components that render inside Slack/Teams, and deployment scripts for Railway or AWS.

Core pieces

Piece Role
agent/ (Python) LangGraph deep‑agent that talks to OpenAI, does web research, and calls optional tools (GitHub, Linear, Notion, etc.)
app/ (Node/TS) CopilotKit runtime that hosts a managed Channel, translates the AG‑UI protocol to Slack/Teams, and renders charts, tables, and approval cards
Channels SDK Library that abstracts the Slack/Teams adapters and handles delivery, state, and reconnection
Deployment configs Railway (.railway/railway.ts) and AWS ECS‑Fargate setup, plus Docker images opentag-agent and opentag-runtime

How it works

  1. Channel creation – either run the CopilotKit CLI (channels setup or channels add) to register a managed Channel with CopilotKit Intelligence. This creates a Slack app manifest that points to CopilotKit’s hosted request URL.
  2. Runtime start – pnpm dev launches the Node runtime and the Python LangGraph agent. The runtime opens an outbound WebSocket to CopilotKit Intelligence; Slack messages are forwarded over this connection.
  3. User interaction – In Slack/Teams a user mentions @OpenTag or uses a slash command. The runtime forwards the message to the Python agent via the AG‑UI protocol.
  4. Agent response – The agent may:
    • generate a plain text answer,
    • produce a native Slack chart from an uploaded CSV,
    • create a Linear issue or Notion page (with a confirmation card),
    • run parallel web research and return a table with cited sources.
  5. Rendering – The Node side formats the result into Slack blocks or Teams cards, showing charts, tables, or interactive approval buttons.

Key features

  • Native Slack UI – charts, tables, and interactive cards appear directly in the thread.
  • Write‑confirmation – actions that modify external tools (Linear, Notion) pause for a user‑approved button before the agent proceeds.
  • Tool integrations – optional connectors for GitHub, PostHog, Linear, Notion, and Composio toolkits.
  • Self‑hosted – you run the Python agent and Node runtime; no code lives on CopilotKit’s servers except the managed Channel plumbing.
  • Deployable – one‑click Railway deployment or an AWS Fargate recipe; Docker images are published to GitHub Container Registry.

Getting started

  1. Install Node 22+, pnpm, Python 3.12, and uv.
  2. Run pnpm install.
  3. Create a managed Channel with the CopilotKit CLI (or use your own Channels SDK runner).
  4. Copy .env.example to .env and fill in your OpenAI key, CopilotKit API key, and Slack credentials.
  5. pnpm dev starts both services; invite the bot in Slack with /invite @OpenTag.

Customization – Most aspects are a single file or directory:

  • Persona & system prompt → agent/prompts/system.py
  • Agent logic → agent/agent.py
  • Tools → agent/tools.py
  • UI components → app/components/
  • Channel triggers → app/channel.tsx
  • Deployment topology → .railway/railway.ts

Who it’s for – Teams that want an on‑premise AI assistant to automate routine knowledge‑work (summarising spreadsheets, fetching research, creating tickets) while keeping data and credentials under their own control.

Related

  • Project
  • Project
  • Dispatch
  • Project
  • Project