customer_service.json


Overview

customer_service.json defines a multi-agent intelligent customer support system using a JSON-based Domain-Specific Language (DSL) format. This system is designed to classify user intents from incoming queries and delegate responses to specialized sub-agents based on the identified intent category. The lead (or main) agent acts as a dispatcher that routes tasks to sub-agents responsible for handling specific types of customer interactions such as casual conversation, complaints, product-related inquiries, or contact information collection.

This architecture enables scalable and context-aware automated customer service by combining multiple AI agents, each fine-tuned for distinct communication goals and expertise. The JSON file fully specifies the agents, their parameters, prompts, workflows, and interactions, providing a declarative blueprint of the multi-agent system.


Detailed Explanation

Top-Level Structure


Components

The components object describes the various nodes in the conversation flow:

1. Begin Node (begin)

2. Lead Agent (Agent:RottenRiversDo)

Usage Example:
When a user sends a message, the lead agent first classifies the intent into one of four categories: contact, casual, complain, or product.

3. Sub-Agents (Tools under Lead Agent)

Each sub-agent specializes in a specific category of user intent:

a. Casual Agent (Agent:SlowKiwisBehave)
b. Soothe Agent (Agent:PoorTaxesRescue)
c. Product Agent (Agent:SillyTurkeysRest)

4. Message Node (Message:PurpleCitiesSee)


Globals

System-wide variables used in prompts and logic:


Graph Structure and Workflow


Important Implementation Details and Algorithms


Interaction with Other System Components


Usage Example

Suppose a user inputs:
"I want to change my email address on file."

  1. The lead agent receives the query, classifies it as contact or product (depending on intent recognition).

  2. If classified as contact, the lead agent replies with a canned response like:
    "Okay, I've already written this down. What else can I do for you?"

  3. If classified as product, it routes the query to the Product Agent.

  4. The Product Agent runs a retrieval on the KB, drafts a factual reply, and returns it.

  5. The lead agent forwards this reply to the Message node.

  6. The user receives the response.


Visual Diagram

flowchart TD
  A[Begin Node] -->|Start| B[Lead Agent: Customer Server Agent]
  B -->|Intent: contact| M1[Direct Response (Contact)]
  B -->|Intent: casual| C1[Casual Agent]
  B -->|Intent: complain| C2[Soothe Agent]
  B -->|Intent: product| C3[Product Agent]
  C3 --> R[Retrieval Tool (Product KB)]
  C1 --> B
  C2 --> B
  C3 --> B
  B --> D[Message Node (Send Response)]
  D --> User[User Interface]

  classDef leadAgent fill:#f9f,stroke:#333,stroke-width:2px;
  class B leadAgent;
  classDef subAgent fill:#bbf,stroke:#333,stroke-width:1px;
  class C1,C2,C3 subAgent;
  class R fill:#afa,stroke:#333,stroke-width:1px;
  class A,M1,D,User fill:#eee,stroke:#333,stroke-width:1px;

Summary


This documentation enables developers and system integrators to understand, extend, or integrate this multi-agent customer service system within broader chatbot platforms or AI ecosystems.