An AI-powered customer support agent for ParcelPilot, built to answer support questions using customer agreements, current policies, SOPs, product documentation, and structured operational data.
The system also supports controlled state-changing actions with explicit human confirmation.
ParcelPilot support teams need to investigate customer questions across multiple information sources:
- Support policies
- Customer-specific agreements
- Cancellation and service-credit SOPs
- Product documentation
- Account data
- Order data
- Historical support tickets
These sources are not equally reliable. Customer agreements can override general policies, policies can become deprecated, and historical ticket resolutions may contain incorrect guidance.
The system therefore combines retrieval, structured-data tools, authorization, source precedence, and human-in-the-loop actions.
The chatbot accepts natural-language questions and determines which information sources and tools are required.
The system retrieves information from:
- Current support policy
- Current SOPs
- Product documentation
- Customer agreements
- Deprecated policies
- Historical ticket information
The agent can query:
- Accounts
- Orders
- Support tickets
Customer-specific information is scoped to the authenticated account.
Unauthorized users cannot retrieve another customer's:
- Orders
- Tickets
- Account information
- Customer-specific agreements
Authorization is enforced in the tool/data layer rather than relying only on the LLM prompt.
The agent can prepare an escalation.
The actual escalation requires explicit user confirmation.
Flow:
User request → Investigation → Prepare escalation → User confirmation → Execute action
The system follows this authority order:
- Active customer-specific agreements
- Current ParcelPilot support policy
- Current SOPs
- Current product documentation
- Deprecated policies
- Historical tickets and internal notes
Higher-authority sources override lower-authority sources.
User | v Streamlit Chat Interface | v LangGraph Agent | v Qwen 3.6 27B via Groq | +-----------------------------+ | | | v v v RAG Search Operational Action Tools Data Tools | | | v v v Policies Accounts Prepare SOPs Orders Escalation Agreements Tickets | Product Docs | v User Confirmation | v Create Escalation
The agent has the following tools:
Retrieves relevant information from ParcelPilot's supplied documents.
Retrieves account information subject to authorization.
Retrieves order/shipment information subject to authorization.
Retrieves support ticket information subject to authorization.
Creates a proposed escalation for user confirmation.
Executes the actual state-changing escalation only after explicit confirmation from the user.
The system deliberately avoids treating every source as equally reliable.
Customer-specific agreements have higher authority than general policies.
Deprecated policies are not treated as current policy.
Historical ticket resolutions are treated as context only because they may contain incorrect guidance.
When information is missing or conflicting, the agent states the uncertainty rather than inventing an answer.
Authorization is enforced inside the data and tool layer.
For example, if a LumenWorks customer attempts to access a Northstar order:
User: Show me ORD-1001
System:
Access denied. You are not authorized to access this order.
The system does not reveal the other customer's account information.
State-changing tools also perform authorization checks before preparing or executing actions.
User:
Can Northstar cancel ORD-1001 without a fee?
The agent:
- Looks up ORD-1001.
- Identifies the account as Northstar.
- Retrieves the Northstar customer agreement.
- Retrieves the applicable cancellation rules.
- Applies source precedence.
- Determines that the customer agreement overrides the default cancellation fee.
Result:
Northstar can cancel ORD-1001 without a cancellation fee.
Example:
User:
Escalate TKT-450 as P1 because this issue needs urgent attention.
The agent first investigates the ticket and prepares an escalation.
It does not execute the action immediately.
The interface presents:
Ticket: TKT-450
Priority: P1
Reason: this issue needs urgent attention
[ Confirm Escalation ] [ Cancel ]
Only after explicit confirmation is the state-changing action executed.
- Python
- LangChain
- LangGraph
- Qwen 3.6 27B
- Groq
- Streamlit
- Sentence Transformers
- FAISS
- Pandas
- PyMuPDF
- Pydantic
Install dependencies:
pip install -r requirements.txt
Create a .env file:
GROQ_API_KEY=your_groq_api_key
Run:
streamlit run app.py
The supplied assessment data contains:
- Support policies
- Cancellation and service-credit SOP
- Product operations documentation
- Customer agreements
- Account data
- Order data
- Ticket data
The structured dataset snapshot time is:
2026-08-16 11:00 Asia/Kolkata
Time-based reasoning uses this snapshot as the reference time.
The knowledge base contains multiple documents with different authority levels and customer-specific rules. Retrieval allows the agent to ground its answers in the supplied source material.
Orders, accounts, and tickets are structured operational data. Querying them directly is more reliable than asking an LLM to infer their contents from documents.
The workflow requires repeated cycles of:
Agent → Tool → Agent
and also supports controlled action workflows.
Escalations change system state. Requiring explicit confirmation prevents the agent from performing unintended actions.
LLM instructions alone are not a sufficient security boundary. Authorization must be enforced before sensitive data or actions are returned/executed.
If continuing development, I would prioritize:
- Proactive issue detection across tickets and orders.
- SLA monitoring and breach prediction.
- Detection of recurring issues affecting multiple customers.
- Better citation/source display in the UI.
- Audit logs for agent decisions and actions.
- Production authentication and role-based access control.
- Automated evaluation of answer correctness and source precedence.
- Observability and agent/tool latency monitoring.