mirror of
https://github.com/langchain-ai/sql-support-bot-starter.git
synced 2026-07-01 19:55:08 -04:00
31ff30496f2a0a23b65c3e164c2f5dd4b2b641f9
Simple starter code for building a customer support agent using LangGraph Studio. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Music Store Customer Support Bot - Starter Code
Simple starter code for building a customer support agent for the Chinook music store database using create_agent().
Setup
# 1. Install dependencies
pip install -r requirements.txt
pip install langgraph-cli
# 2. Add your API key to .env
# Edit OPENAI_API_KEY in the .env file
# 3. Run Studio
langgraph dev
This opens LangGraph Studio in your browser where you can chat with the agent. The Chinook database is loaded automatically from GitHub on startup.
Project Structure
take_home/
├── README.md
├── langgraph.json # LangGraph Studio configuration
├── requirements.txt # Python dependencies
├── .env # Environment variables (add your API keys here)
├── .env.example # Template
└── src/
├── agent.py # Agent definition using create_agent()
├── db.py # Database connection (loads from GitHub)
└── tools/
├── customer_tools.py # get_customer_orders tool
└── music_tools.py # list_tracks_by_artist tool
Capabilities
The agent can:
- Order history - View recent orders for a customer
- Browse music - List tracks by artist name
Database
The Chinook database is a sample music store database loaded automatically from GitHub. Tables include:
- Customer - Customer information
- Invoice - Purchase orders
- InvoiceLine - Items in each order
- Track - Music tracks
- Album - Albums containing tracks
- Artist - Artists who created albums
- Genre - Music genres
Description
Languages
Python
100%