Built for hackathon demo — an AI agent that autonomously detects shipping delays, decides compensation, and resolves customer issues in real-time.
Resolve is a fully autonomous customer service agent that:
- Monitors shipping carriers for delays every 60 seconds (with deduplication to prevent double-messaging).
- Retrieves full, multi-hop customer history and lifetime value from a Neo4j knowledge graph.
- Consults company policy to determine appropriate compensation based on VIP status and past issues.
- Researches live carrier delays and weather outages via the Tavily Web Search API.
- Decides the best action (apologize, credit, refund, escalate, or file carrier claim).
- Executes financial actions via Direct Shopify REST APIs, or automated web browsing for FedEx claims.
- Messages the customer with a personalized, context-aware (Proactive vs Reactive) brand response.
All of this happens without human intervention — the Business Dashboard shows the agent working in real-time, while Customers interact in a separate chat UI.
- Python 3.10+
- Node.js 18+
- Neo4j AuraDB account (free tier works)
- Fastino API key (Pioneer AI)
# Clone
git clone https://github.com/ambrogian/CustomerSupportAi.git
cd CustomerSupportAi
# Backend
python -m venv resolve
resolve\Scripts\activate # Windows
# source resolve/bin/activate # macOS/Linux
pip install -r requirements.txt
# Copy env template and fill in your keys
cp .env.example .env
# Edit .env with your NEO4J_URI, NEO4J_PASSWORD, FASTINO_API_KEY
# Frontend
cd client
npm install
cd ..# Terminal 1: Backend (port 3001)
resolve\Scripts\python.exe server\app.py
# Terminal 2: Frontend (port 5173)
cd client && npm run devOpen http://localhost:5173 for the Business Dashboard. Open http://localhost:5173/chat in a separate tab for the Customer Chat widget.
- Setup the split view: Open the Business Dashboard (
http://localhost:5173) in one browser window, and the Customer Chat (http://localhost:5173/chat) in another. - Watch the Agent Loop: The background agent runs every 60 seconds, checking all orders. You will see these background checks populate the "Activity Feed" panel.
- Observe Neo4j Data: The Neo4j graph panel shows the visual representation of Customers, Orders, Issues, and Resolutions.
- Trigger a Proactive Delay:
- On the Business Dashboard, click the "Trigger Delay" button for Sarah's order.
- Watch the Activity Feed light up: Demux tracking → Load Neo4j context (noting her past issues and LTV) → Retrieve Senso Policy → Perform Tavily search for weather/carrier news → Send prompt to LLM.
- The LLM will autonomously decide to apply a credit and send her an SMS-style proactive apology.
- Watch the new
IssueandResolutionnodes instantly wire onto the graph.
- Trigger a Reactive Chat:
- Go to the Customer Chat tab. Type a message like: "Hey my order 1045 is taking forever!"
- Switch back to the Business Dashboard. You will see the agent orchestrate a completely different "Reactive" pipeline, matching the customer's frustration, applying credits directly via Shopify REST API, and returning a real-time response to the chat widget.
- Test Escalation & Rules:
- Manually trigger enough delays/messages for one customer so their total credits exceed $100.
- The Neo4j graph prompt will alert the LLM of "credit abuse," and the LLM will automatically switch from
apply_credittoescalate-> requiring human review!
| Component | Technology | Purpose |
|---|---|---|
| Backend | Flask + flask-socketio | API + WebSocket server |
| Frontend | React + Vite + Tailwind | Real-time dashboard |
| Database | Neo4j AuraDB | Graph of customers, orders, issues, resolutions |
| AI Model | Qwen3-32B via Fastino | Autonomous decision-making |
| Policy Engine | Senso (local fallback) | Compensation rules + brand voice |
| Carrier Monitoring | Yutori Scouting API | Track shipment delays |
| Web Actions (Shopify) | Shopify REST API | Direct execution of credits and refunds |
| Web Actions (FedEx) | Yutori Browsing API | Navigates FedEx autonomously to file lost package claims |
| Web Search | Tavily API | Real-time external context extraction (weather, shipping news) |
| Realtime | Socket.IO | Live dashboard updates |
├── server/
│ ├── app.py # Flask entry point
│ ├── neo4j_db/ # Connection, seed data, Cypher queries
│ ├── orchestrator/ # AI brain: prompt + decision pipeline
│ ├── integrations/ # Fastino, Senso, Yutori, Tavily clients
│ ├── agent_loop/ # 60-second autonomous background loop
│ ├── routes/ # REST API endpoints
│ └── websocket/ # Socket.IO event emitters
├── client/
│ ├── src/
│ │ ├── App.tsx # Main dashboard layout
│ │ ├── components/ # 5 dashboard panels
│ │ └── hooks/useSocket.ts # WebSocket connection hook
│ └── vite.config.ts
├── requirements.txt
├── .env.example
└── ARCHITECTURE.md # Detailed system architecture
| Method | Endpoint | Purpose |
|---|---|---|
POST |
/api/chat |
Customer message → orchestrator → AI response |
POST |
/api/trigger-delay |
Simulate a delivery delay for demo |
GET |
/api/graph |
Neo4j graph data for visualization |
GET |
/api/orders |
All orders with customer info |
GET |
/api/health |
Health check |
NEO4J_URI=neo4j+s://xxxxx.databases.neo4j.io
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=your-password
FASTINO_API_KEY=your-key
YUTORI_API_KEY=your-key # optional, uses mock
SENSO_API_KEY=your-key # optional, uses local JSON
TAVILY_API_KEY=your-key # optional, uses mockBuilt in 24 hours for the hackathon.