Pick a depth. Each prompt opens in your AI pre-loaded with the lesson. Click a row to preview the prompt.
Before scaling, you ship. The smallest stack for an agent that serves one real user: one VM (or PaaS), one Postgres for state + audit, one Redis for cache + rate limits, one LLM provider, one observability vendor. No Kubernetes, no microservices, no vector DB unless you need RAG. The Day 0 stack is the smallest thing that survives real traffic; everything in this course is what you add to it.
Concretely: $5-50/mo of infra. Fly.io / Render / Railway for the app. Supabase / Neon for Postgres. Upstash for Redis. Anthropic or OpenAI for the LLM. LangFuse Cloud (free tier) for traces. Total Day-0 bill: under $100/mo. You can serve a few thousand queries / day on this. Don't reach for more until traffic forces it.
# --- Pick your provider (set the matching API key env var) ---
# Anthropic: from anthropic import Anthropic; client = Anthropic() # ANTHROPIC_API_KEY
# OpenAI: from openai import OpenAI; client = OpenAI() # OPENAI_API_KEY
# Gemini: from google import genai; client = genai.Client() # GEMINI_API_KEY
# main.py — single-file agentic service
import os
from fastapi import FastAPI, Request
from anthropic import Anthropic
import redis, psycopg
app = FastAPI()
client = Anthropic()
r = redis.from_url(os.environ["REDIS_URL"])
db = psycopg.connect(os.environ["DATABASE_URL"])
TOOLS = [{"name": "search_docs", "description": "...", "input_schema": {...}}]
@app.post("/api/chat")
async def chat(req: Request):
body = await req.json()
user_id, message = body["user_id"], body["message"]
# rate limit
if not allow(user_id, limit=60, window=60):
return {"error": "rate_limited"}, 429
# run agent
messages = [{"role": "user", "content": message}]
for _ in range(4):
resp = client.messages.create(model="claude-sonnet-4-6", max_tokens=800, tools=TOOLS, messages=messages)
messages.append({"role": "assistant", "content": resp.content})
if resp.stop_reason == "end_turn":
answer = resp.content[0].text
break
# ... tool dispatch
...
# audit
with db.cursor() as cur:
cur.execute("INSERT INTO traces (user_id, query, answer) VALUES (%s, %s, %s)", (user_id, message, answer))
db.commit()
return {"answer": answer}
# Deployed on Fly.io with one command: fly launch
# Postgres via Supabase, Redis via Upstash, free tiers on both.
# That's the Day 0 stack. Don't add until you must.python3 main.py