A customer support agent with memory that automatically classifies inquiries, creates tickets, and maintains conversation history using LangGraph and OpenAI.
git clone <repository-url>
cd langmem-customer-support-agent
pip install -r requirements.txt
cp env.example .env
# Add your OpenAI API key to .env
python main.py
Choose from the menu:
- Custom ticket - Enter your own support request
- Example ticket - Test with predefined scenarios
- Search memory - Find previous customer interactions
- Exit
Step 1. Choose option: 2 (Example ticket)
Step 2. Choose example: 1 (Login issues)
✅ Agent automatically:
- Searches for customer history
- Creates support ticket
- Sends personalized reply
- Stores interaction in memory
Choose option: 3 (Search memory)
Enter query: login issues
✅ Found previous interaction:
- Customer: test@test.com
- Issue: Login problems
- Status: Awaiting response
- Triage Agent classifies incoming messages (ignore/notify/respond)
- Response Agent processes requests using tools (create tickets, send replies)
- Memory System automatically stores all interactions for future reference
- Search finds relevant customer history using semantic similarity
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Triage Agent │───▶│ Response Agent │───▶│ Memory Store │
│ │ │ │ │ │
│ • Classifies │ │ • Uses Tools │ │ • InMemoryStore │
│ • Routes │ │ • Sends Replies │ │ • Vector Search │
│ • Updates State │ │ • Creates Memory│ │ • Persistence │
└─────────────────┘ └─────────────────┘ └─────────────────┘
├── agents/ # Agent workflow and classification
├── tools/ # Memory, ticket, and reply tools
├── prompts/ # System prompts and instructions
├── tests/ # Test scenarios
└── main.py # Interactive interface
- Python 3.11+
- OpenAI API key
- LangGraph 0.4.0+
Built with LangGraph, LangChain, and OpenAI