Skip to content

Step 1 · Set up

Step 1 of 8Set up

Get the project running on your machine, with your own keys, and prove it works before spending any quota.

Most “it doesn’t work” problems in a workshop are environment problems, not code problems. We front-load them and give you a single command that proves the whole setup is sound.

Terminal window
git clone https://github.com/dileepadev/deploying-agentic-ai-apps-workshop.git
cd deploying-agentic-ai-apps-workshop/app

The deployed application is its own uv project, so app/ is where the rest of this step happens.

uv manages the Python version, the virtual environment, and the packages — one tool instead of four.

Terminal window
curl -LsSf https://astral.sh/uv/install.sh | sh

Then:

Terminal window
uv sync

That reads pyproject.toml and uv.lock, installs the exact versions this project was tested with, and creates .venv for you. You never need to activate it — uv run handles that.

Terminal window
cp .env.example .env

Open .env (in app/, next to pyproject.toml) and fill in three values:

Variable Where to get it
LLM_API_KEY https://aistudio.google.com/apikey → Create API key
SUPABASE_URL Supabase → Connect (top of the dashboard) → Project URL
SUPABASE_SECRET_KEY Supabase → Settings → API Keys → Secret keys → starts with sb_secret_

One more is optional, and you can add it later without changing anything else:

Variable Where to get it What it buys
TAVILY_API_KEY https://app.tavily.com → free, no card Web search, so the agent can answer questions about this week rather than only what Wikipedia has written up

Leave it blank and everything in this workshop still works — the agent researches with Wikipedia alone, and says so when asked about something recent.

Run the tests. They need no API key and no network:

Terminal window
uv run --extra dev pytest
................. [100%]
17 passed

Then start the server:

Terminal window
uv run fastapi dev main.py

Open http://localhost:8000/health. You want:

{"ok": true, "database": true, "provider": "google",
"model": "gemini-flash-latest", "web_search": false}

Also open http://localhost:8000/docs — FastAPI generates that from your code, and you’ll use it to test the deployed version later. It follows your system’s light/dark setting: Swagger UI has had a dark theme since 5.31, and app/main.py adds the few lines that switch it on.

The frontend is a separate Vite + React app in client/, with its own dependencies. It needs Node.js 20+ (node --version). From the repo root, in a second terminal:

Terminal window
cd client
npm install
npm run dev

Open http://localhost:5173. You’ll get the demo UI with Backend URL already pointing at http://localhost:8000 — leave it there for now. You won’t have anything to ask it until step 7; this is just to confirm both halves install.

database: false

Your SUPABASE_URL or key is wrong, or the project is paused. Free projects pause after about a week idle — open the Supabase dashboard and resume it.

You haven’t created the tables yet either — that’s step 2. database: false at this point is expected if you’ve skipped ahead.

RuntimeError: Missing environment variable: LLM_API_KEY

Working as intended — config fails loudly at startup rather than mysteriously at request time. Check .env exists in app/ and that there are no quotes around the values.

If you’re following an older copy of this workshop, the variable used to be called GEMINI_API_KEY. That name still works.

uv: command not found after installing

The installer added it to a shell profile that your current terminal hasn’t read. Open a new terminal, or source ~/.bashrc / source ~/.zshrc.

Python version errors

You don’t need to fix your system Python. uv python install 3.12 then uv sync again — uv will use its own.

You have an environment. Now it needs somewhere to put things.