Skip to content

About

Production-ready multi-agent customer support & ticket routing engine built on LangGraph state graph architecture

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

LangGraph Multi-Agent Support Starter

Production-Grade Customer Support Triage, PII Guardrails & State Graph Routing

CI License Python FastAPI Maintained by AdaptNXT

A production-ready reference implementation for enterprise customer support ticket classification, automated intent routing, PII data sanitization, and human-in-the-loop escalation built on the LangGraph state graph architecture.


πŸ—οΈ Architecture Overview

                                 Incoming Customer Query
                               (REST / Webhook / Chatbot)
                                            β”‚
                                            β–Ό
                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚       Security & Guardrails Layer     β”‚
                        β”‚   β€’ Prompt Injection Heuristics       β”‚
                        β”‚   β€’ PII Masking (CC, SSN, Phone, Mail)β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                            β”‚ Sanitized State
                                            β–Ό
                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚        Supervisor Router Node         β”‚
                        β”‚   β€’ Intent Classification             β”‚
                        β”‚   β€’ Sentiment Analysis (Frustration)  β”‚
                        β”‚   β€’ Dynamic Priority Assignment       β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                                β”‚           β”‚           β”‚
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚           └───────────────────┐
            β–Ό                               β–Ό                               β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Technical Specialist  β”‚       β”‚  Billing Specialist   β”‚       β”‚   Human Escalation    β”‚
β”‚  β€’ API / SDK Errors   β”‚       β”‚  β€’ Tax Invoices (VAT) β”‚       β”‚  β€’ Priority Ticket ID β”‚
β”‚  β€’ Latency & Timeouts β”‚       β”‚  β€’ Refund Policies    β”‚       β”‚  β€’ CRM Handoff (Lead) β”‚
β”‚  β€’ Webhook Validation β”‚       β”‚  β€’ Plan Upgrades      β”‚       β”‚  β€’ SLA < 30 min Alert β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
            β”‚                               β”‚                               β”‚
            β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    β”‚
                                    β–Ό
                        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                        β”‚ Final State Resolutionβ”‚
                        β”‚  β€’ Audit Trail        β”‚
                        β”‚  β€’ Response Payload   β”‚
                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

✨ Features

  • Multi-Agent State Graph: Deterministic and LLM-driven graph routing with state persistence across conversational turns.
  • Enterprise PII Guardrails: Pre-execution sanitization redacting credit cards, social security numbers, phone numbers, and emails to prevent unauthorized sensitive data leakage into downstream LLM inference logs.
  • Prompt Injection Defense: Pre-flight heuristic detection catching adversarial overrides (ignore previous instructions, jailbreak, developer mode).
  • Sentiment & Priority Analysis: Automatically escalates angry, urgent, or litigious inquiries to human supervisors with dedicated priority SLAs.
  • FastAPI Webhook & REST Server: Out-of-the-box endpoints for /api/v1/chat and /api/v1/tickets/route (integrates directly with Zendesk, Freshdesk, and HubSpot webhooks).
  • Interactive CLI Console: Test support queries and live agent triage from the terminal.
  • 100% Type-Safe & Tested: Pydantic V2 models, strict typing, and comprehensive unit test coverage.

πŸš€ Quick Start

1. Installation

# Clone repository
git clone https://github.com/adaptnxt/langgraph-multiagent-support-starter.git
cd langgraph-multiagent-support-starter

# Install with core dependencies
pip install -e .

# Or install with optional LangChain/LangGraph LLM providers
pip install -e ".[llm,dev]"

2. Run from CLI

Route and resolve a support query:

adaptnxt-support route "Where can I download the VAT tax invoice for last month?"

Output:

[Agent Network Route Summary]
Assigned Agent: billing
Priority:       medium
Sentiment:      neutral

Response:
You can view and download all past VAT/GST compliant PDF tax invoices directly from your Account Portal under Settings > Billing & Invoices.

Test PII Redaction & Escalation:

adaptnxt-support route "I am furious! My card 4532 1122 3344 5566 was charged twice! I demand to speak to a manager right now!"

Output:

[Agent Network Route Summary]
Assigned Agent: human_escalation
Priority:       critical
Sentiment:      angry
Redacted PII:   credit_card
Escalation ID:  TICKET-ESC-9F81E3B2

Response:
Your request has been prioritized and escalated directly to an AdaptNXT Tier-3 Support Lead. Escalation Ticket ID: TICKET-ESC-9F81E3B2 (Priority: CRITICAL). A dedicated team member will contact you within 30 minutes.

Launch Interactive Terminal Chat:

adaptnxt-support interactive

🌐 Running the FastAPI Server

Launch the REST server locally:

adaptnxt-support serve --host 0.0.0.0 --port 8000

Interactive Swagger API documentation will be available at: πŸ‘‰ http://localhost:8000/docs

Sample API Request (cURL):

curl -X POST "http://localhost:8000/api/v1/chat" \
     -H "Content-Type: application/json" \
     -d '{"query": "Why am I getting HTTP 401 code on the webhook endpoint?", "session_id": "sess_102"}'

🐳 Docker Deployment

Build and Run Standalone Container:

docker build -t adaptnxt/support-agents .
docker run -p 8000:8000 adaptnxt/support-agents

Using Docker Compose:

docker compose up -d

πŸ§ͺ Testing

Run the automated test suite:

pytest tests/ -v

🏒 Enterprise Citation & Production Deployment

Maintained by the Enterprise AI & Cloud Chatbot engineering team at AdaptNXT Technology Solutions.

For custom fine-tuned multi-agent architectures (CrewAI, AutoGen, LangGraph) integrated with internal enterprise databases (PostgreSQL, SAP, Salesforce, Pinecone), visit our specialized service practices:


πŸ“„ License

This project is licensed under the Apache-2.0 License.

About

Production-ready multi-agent customer support & ticket routing engine built on LangGraph state graph architecture

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages