Skip to content

About

Telecom support copilot: CopilotKit sidebar on Next.js with a four-step LangGraph JS agent, in a Turborepo monorepo.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Multi-Agent Telecom Support with CopilotKit: A customer support copilot with four cooperating LangGraph agents

Multi-Agent Telecom Support with CopilotKit

A customer support copilot with four cooperating LangGraph agents

A Turborepo monorepo with a Next.js CopilotKit sidebar and a LangGraph agent. The agent classifies intent, looks up a customer, generates a reply and decides on escalation for a telecom company.


Built by Studio1 Built with CopilotKit

CopilotKit docs  ·  CopilotKit  ·  More examples  ·  studio1hq.com


Overview

An AI customer support app for a fictional telecom company, built with CopilotKit and LangGraph. A customer or support rep chats in a CopilotKit sidebar. A LangGraph agent handles the inquiry, looks up the customer's plan, writes a personalised answer and escalates complex issues to a human team.

The repo is a monorepo managed with Turborepo and pnpm workspaces. apps/web is the Next.js frontend and apps/agent is the LangGraph agent.

Telecom support copilot demo

Demo video
Untitled.design.14.mp4

Features

  • Intent Agent: Classifies the customer's message and sets its urgency.
  • Customer Lookup Agent: Retrieves the customer profile and service details from sample data.
  • Reply Agent: Generates a personalised response from the intent and customer context.
  • Escalation Agent: Decides whether to route the issue to a human support team.
  • CopilotKit sidebar: Chat UI and shared state between the web app and the agent, with frontend actions available to the agent.
  • Customer context in the UI: The web app tracks the current customer and shows service pricing details.

Tech stack

Layer Tool
Frontend Next.js 16, React, TypeScript
Copilot CopilotKit 1.50 (react-core, react-ui, runtime)
Agent LangGraph JS, @copilotkit/sdk-js
LLM OpenAI (gpt-4o for the chat node, gpt-5-nano for the escalation tool) via @langchain/openai
Monorepo Turborepo, pnpm workspaces

Getting started

Prerequisites

Installation

git clone https://github.com/Studio1HQ/support-help.git
cd support-help
pnpm install

Environment variables

Variable Description
OPENAI_API_KEY OpenAI key for the agent. Put it in apps/agent/.env.
LANGGRAPH_DEPLOYMENT_URL Optional. URL of the LangGraph server. Defaults to http://localhost:8123.
LANGSMITH_API_KEY Optional. LangSmith key passed to the LangGraph agent connection.
cd apps/agent
echo "OPENAI_API_KEY=your-openai-api-key-here" > .env

Run

Start both apps with Turborepo. The Next.js app runs on port 3000 and the LangGraph agent on port 8123:

pnpm dev

Open http://localhost:3000. Other scripts:

  • pnpm dev:studio: start the web app and the agent with the LangGraph Studio UI.
  • pnpm build: build all apps.
  • pnpm lint: lint all apps.

Run one app at a time with pnpm filters:

pnpm --filter web dev
pnpm --filter agent dev

If you see "I'm having trouble connecting to my tools", check that the LangGraph agent is running, your OpenAI key is set and both servers started.

How it works

.
├── apps/
│   ├── web/     # Next.js frontend with the CopilotKit sidebar
│   └── agent/   # LangGraph agent
├── pnpm-workspace.yaml
├── turbo.json
└── package.json
  • apps/web/src/app/api/copilotkit/route.ts creates a CopilotRuntime with a LangGraphAgent (starterAgent) that points at the LangGraph server.
  • apps/agent/src/agent.ts builds the graph. The chat node binds the CopilotKit frontend actions plus four tools: intentClassifierTool, customerLookupTool, escalationDecisionTool and replyGeneratorTool. The system prompt tells the model to classify intent, look up the customer, check escalation and then generate the reply.
  • apps/agent/src/agents/ holds the four agent nodes and apps/agent/src/types/state.ts the shared state.
  • The main UI is apps/web/src/app/page.tsx. Edit it to change theme colours, add frontend actions or use shared state.
  • A GitHub Actions workflow (smoke.yml) runs a smoke test on Ubuntu, Windows and macOS with Node 20 and 22.

Resources

License

Released under the MIT License.



Studio1

Built by Studio1, the technical content and DevRel partner for devtool teams. Made with CopilotKit.
Browse more open-source examples at github.com/Studio1HQ.

Website Book a call X LinkedIn

studio1hq.com · Technical content, docs, video and DevRel for devtools

About

Telecom support copilot: CopilotKit sidebar on Next.js with a four-step LangGraph JS agent, in a Turborepo monorepo.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages