Files
dependabot[bot] 28480e7788 Bump markdown in /tools/python/examples/openai/customer_support (#298)
Bumps [markdown](https://github.com/Python-Markdown/markdown) from 3.7 to 3.8.1.
- [Release notes](https://github.com/Python-Markdown/markdown/releases)
- [Changelog](https://github.com/Python-Markdown/markdown/blob/master/docs/changelog.md)
- [Commits](https://github.com/Python-Markdown/markdown/compare/3.7...3.8.1)

---
updated-dependencies:
- dependency-name: markdown
  dependency-version: 3.8.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-23 11:13:20 -04:00
..
2025-11-04 08:36:20 -08:00

Email Support Agent

Sample app to help you automate your email support. Powered by OpenAI's Agent SDK and Stripe Agent Toolkit.

Customize this agent to fit your own needs by cloning and modifying support_agent.py.

Features

The support agent currently can:

  • Answer FAQ questions
  • Update billing information through Customer Portal
  • Send any missing invoices

We also support a REPL to help you test your agent without sending a gazillion emails.

How it Works

The support agent will:

  • Connects to your email using an IMAP client
  • Checks for unread emails every 30 seconds
  • Generates and sends a reply
  • Marks the emails as read

If it doesn't know how to answer the question, it will not respond and ignore the email.

Setup

  1. Install uv (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Clone this repository
  2. Create and activate a virtual environment:
uv venv
source .venv/bin/activate  # On Unix/macOS
# or
.venv\Scripts\activate  # On Windows
  1. Install dependencies:
uv sync
  1. Copy .env.example to .env:
cp .env.example .env
  1. Configure your .env file with:
    • Email credentials (create an app-specific password for Gmail)
    • IMAP/SMTP server details (defaults for Gmail provided in .env.example)
    • OpenAI API key
    • Stripe Secret Key

Usage

Run the agent:

python main.py

Run the REPL with:

python repl.py

Customize for your App

This repository is just a sample app tailored to our example website.

We recommend cloning this repository and customizing the system prompt and tools in support_agent.py. It's very easy to add new capabilities.