Workflow

Multi-Agent Support Ticket Triage with CrewAI

A sequential crew of specialized agents — classifier, knowledge-base researcher, response drafter, and escalation checker — that processes each incoming support ticket end to end and either drafts a reply or escalates to a human.

What This Builds

This recipe builds a customer-support triage system as a CrewAI crew: multiple specialized agents that collaborate on each ticket, each with one clear job. Rather than a single monolithic prompt, the work is split into roles that hand off to each other, mirroring how a human support team divides triage from research from drafting.

A typical four-agent pipeline processes tickets sequentially:

  1. Triage agent — classifies the ticket (bug, billing, how-to, account), sets priority, and decides whether it should be escalated.
  2. Knowledge-base agent — searches the KB / vector store for relevant articles for the ticket’s category.
  3. Response agent — drafts a customer-facing reply grounded in the retrieved articles.
  4. Escalation agent — applies rules (low confidence, high severity, VIP customer) and routes to a human when needed.

Architecture

auto-resolveescalate

New ticket

Triage agent: classify + priority

KB agent: search articles

Response agent: draft reply

Escalation agent: rules check

Draft reply ready

Route to human queue

The Stack

  • CrewAI to define agents, their tasks, and the sequential process that passes context from one agent to the next. Agents and tasks are typically defined in YAML config files.
  • An LLM provider such as OpenAI for classification and drafting.
  • A vector store such as Qdrant (wrapped as a CrewAI tool) so the KB agent can retrieve real articles instead of guessing.

Step-by-Step Outline

  1. Scaffold the crew. Start from CrewAI’s starter template and define four agents with distinct roles, goals, and backstories in agents.yaml, and one task per agent in tasks.yaml.
  2. Triage task. Have the first agent output structured fields: category, priority, escalate (bool), and a one-line summary. The summary becomes the search query downstream — it is cleaner than a raw ticket subject.
  3. KB retrieval tool. Give the KB agent a search tool backed by your vector store; pass the triage summary as the query and return the top matches.
  4. Drafting task. The response agent writes a reply citing the retrieved articles, and is instructed to defer rather than invent when the KB lacks an answer.
  5. Escalation task. The final agent enforces routing rules and decides auto-resolve vs. human handoff.
  6. Run sequentially. Use CrewAI’s sequential process so each agent receives the previous agent’s output as context, then trace runs to inspect each handoff.

Why This Shape Works

Splitting triage into focused agents keeps each prompt small and testable, and the sequential handoff means every ticket goes through the same classify → research → draft → route cycle. CrewAI’s example collection shows this pattern across real applications (multi-agent collaboration with YAML-defined roles and tool integration), and community write-ups apply exactly this four-agent triage split.

Source