mirror of
https://github.com/stripe/ai.git
synced 2026-09-14 18:39:59 +08:00
28480e7788
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>
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
- Install uv (if not already installed):
curl -LsSf https://astral.sh/uv/install.sh | sh
- Clone this repository
- Create and activate a virtual environment:
uv venv
source .venv/bin/activate # On Unix/macOS
# or
.venv\Scripts\activate # On Windows
- Install dependencies:
uv sync
- Copy
.env.exampleto.env:
cp .env.example .env
- Configure your
.envfile 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.