Going further
Wrap up
What you built, what a production version adds, and where to take the project next.
You now have a support system for Harbor & Pine that runs on its own server. It reads the inbox on an interval, saves every email in Supabase, answers what the knowledge base covers, and hands the rest to a person with a proposed next step. An eval set checks every decision, and a dashboard shows what happened.
What you built
agent.py
classifier.py
decide.py
rules.py
schemas.py
config.py
db.py
gmail.py
guards.py
main.py
pipeline.py
poller.py
Dockerfile
docker-compose.yml
pyproject.toml
Where to take it next
- Connect your real support inbox, or swap Gmail for the API of a ticketing system. Only
app/gmail.pychanges. - Add an order lookup tool, so the agent can check delivery dates instead of escalating them.
- Grow the golden set with every email the system gets wrong.
- Raise
POLL_INTERVAL_SECONDSto 600 once you stop testing.
What production adds
This is the simple version. A production system adds webhooks instead of polling, queues and workers for volume, retries with backoff, tracing for every model call, and a workflow engine. That is what the GenAI Launchpad and the GenAI Accelerator cover.