Stephen Chu 91ab35981e Add create_deep_agent option and LangSmith setup instructions
- Show both create_agent and create_deep_agent options in agent.py
- Add LangSmith signup link to README setup instructions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 09:30:14 -08:00

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() or create_deep_agent().

Setup

# 1. Install dependencies
pip install -r requirements.txt
pip install langgraph-cli

# 2. Add your API keys to .env
#    - OPENAI_API_KEY: https://platform.openai.com/api-keys
#    - LANGSMITH_API_KEY: https://smith.langchain.com/ (sign up, then Settings > API Keys)

# 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
    ├── 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:

  1. Order history - View recent orders for a customer
  2. 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
S
Description
Simple starter code for building a customer support agent with LangSmith Studio
Readme 120 KiB
Languages
Python 100%