Mô Tả Project
Xây dựng một Multi-turn Customer Support Agent có khả năng:
- Phân loại ticket (Billing, Technical, General)
- Thu thập thông tin cần thiết
- Escalate to human khi cần
- Persist state để resume conversation
Architecture Overview
classify → [billing | technical | general] → escalate? → [resolve | handoff]
Implementation Steps
Step 1: Define State
- messages: Annotated list với add_messages
- ticket_type: Literal billing/technical/general
- info_collected: dict
- needs_human: bool
- resolution: string
Step 2: Define Nodes
- classify_ticket: Phân loại dựa trên nội dung
- handle_billing: Xử lý câu hỏi billing
- handle_technical: Xử lý vấn đề kỹ thuật
- should_escalate: Quyết định escalate hay resolve
Step 3: Build Graph
- Add nodes
- Set entry point
- Add conditional edges for routing
- Compile with checkpointer
Testing
Test multi-turn conversation với thread persistence. Verify state được lưu đúng giữa các turns.
🎯 Deliverable: Agent có thể handle multi-turn, persist state, và escalate khi cần thiết.
