Datalumina

Getting started

Project setup

Create the ai-customer-support repo with uv, add the dependencies, the settings file, and a FastAPI app with a health check.

By the end of this page you have a Python project with every dependency installed, a .env file, and a FastAPI app that answers on /health.

Create the project

uv init ai-customer-support --python 3.13
cd ai-customer-support
rm main.py
mkdir app scripts
touch app/__init__.py

--python 3.13 pins the version, so the Docker image later uses the same one.

Add the dependencies

uv add "fastapi[standard]" pydantic-settings python-dotenv "psycopg[binary]" google-api-python-client google-auth "pydantic-ai-slim[anthropic]"
uv add --dev google-auth-oauthlib pydantic-evals

The dev group holds the tools that only run on your laptop, the one-time Gmail login script and the evals. The server image skips it.

Ignore secrets

Add these lines to the .gitignore that uv created:

.gitignore
.env
credentials.json
node_modules/
dashboard/dist/

Create the environment file

.env.example
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
GOOGLE_REFRESH_TOKEN=
DATABASE_URL=
ANTHROPIC_API_KEY=
CLASSIFIER_MODEL=anthropic:claude-haiku-5-5
AGENT_MODEL=anthropic:claude-sonnet-5-5
POLL_INTERVAL_SECONDS=30
DASHBOARD_USERNAME=admin
DASHBOARD_PASSWORD=
PYDANTIC_AI_NO_BANNER=1
cp .env.example .env

You fill in the values on the next pages. PYDANTIC_AI_NO_BANNER hides the welcome banner that Pydantic AI prints on the first agent run. Keep POLL_INTERVAL_SECONDS at 30 while you build and test. In real use, 600 seconds is plenty, because customers expect an email answer within hours.

Add the settings

app/config.py
from dotenv import load_dotenv
from pydantic_settings import BaseSettings

# Load .env into the environment, so Pydantic AI also finds ANTHROPIC_API_KEY.
load_dotenv()


class Settings(BaseSettings):
    google_client_id: str
    google_client_secret: str
    google_refresh_token: str
    database_url: str
    classifier_model: str = "anthropic:claude-haiku-5-5"
    agent_model: str = "anthropic:claude-sonnet-5-5"
    poll_interval_seconds: int = 60
    dashboard_username: str = "admin"
    dashboard_password: str = ""


settings = Settings()

The models are plain settings. Swapping a model is a change in .env, not in code.

Add the FastAPI app

app/main.py
from fastapi import FastAPI

app = FastAPI(title="AI customer support")


@app.get("/health")
def health() -> dict:
    return {"status": "ok"}

Dictate your prompts

Prompting a coding agent goes faster when you speak instead of type. The video uses Glaido for that. It handles technical terms well, and its custom dictionary keeps names like Pydantic, Supabase, and FastAPI spelled right.

Accelerate your workflowGet one free month of Glaido Pro

Glaido is the dictation tool used in the video. Dictate prompts with technical terms, and add your own words to the custom dictionary.

Get one free month

Check

uv run fastapi dev app/main.py

Open http://localhost:8000/health in your browser.

{"status": "ok"}
__init__.py
config.py
main.py
.env
.env.example
.gitignore
pyproject.toml

On this page