Top 1% Engineers, one production AI lesson per issue.

For engineers building with agents. Each issue takes one decision you face at work, shows the code and names the trade off.

Read any past issue before you subscribe.

Guides

Production and observability

  1. Retry patterns for LLM API errorsLLM API retry logic for production agents.9 min
  2. Langfuse and Grafana monitoringPut Langfuse LLM metrics in Grafana with the Metrics API and dashboard JSON, next to Prometheus panels, alerts and trace links.9 min
  3. FastAPI with LangGraph for a chatbot APIWire LangGraph into FastAPI with token streaming over SSE, a Postgres checkpointer, per-user thread IDs and human in the loop with interrupt.8 min
  4. Prometheus metrics for agentsAdd Prometheus metrics to a FastAPI agent with prometheus-fastapi-instrumentator, LLM token and latency histograms, multiprocess mode, panels and alerts.9 min
  5. Connection pooling for Python AI servicesManage database connections in a Python AI agent service: pool sizing, pre-ping, lifespan, PgBouncer, and why no connection is held while the LLM streams.10 min
  6. LangGraph persistence and threadsHow LangGraph threads and the Postgres checkpointer keep agent state across restarts and replicas, plus a thread table, per-thread locks and pruning.10 min
  7. Separate development and production configHow .env, .env.development and .env.production differ, how Pydantic Settings loads them in order, and how to keep agent secrets out of git and laptops.8 min
  8. FastAPI and Uvicorn for agentic systemsWhat Uvicorn is, why FastAPI needs it, and the production command, workers, lifespan and SSE streaming setup that keeps AI agents up under real traffic.10 min
  9. System design for a production AI chatbotAI chatbot system design for production, end to end.14 min
  10. SSE vs WebSockets for streaming AI responsesWhen to stream LLM tokens with server-sent events or WebSockets, with FastAPI code for both, plus reconnects, cancellation, backpressure and metrics.8 min

What every issue gives you

  1. One decision, made.

    A question like agent or workflow, answered with a rule you can use.

  2. Code you can run.

    Each issue links the repo.

  3. The next live lab.

    The Thursday lab that builds the topic.

Get the next issue

Subscribe