ProjectBuild an Agentic Content Studio: the explanation · Module 13: Background jobs and live progress · part 15 of 22
Part 15 · Module 13: Background jobs and live progress

Module 13: Background jobs and live progress

24 min read·
About 50 minutes · Needs: Module 4 (high-level design: requests and background jobs), Module 5 (low-level design: the event protocol), Module 8 (the LangGraph pipeline) · Code: backend/app/ai/jobs.py, backend/app/api/routes/jobs.py, frontend/src/lib/useJob.ts, frontend/src/components/JobProgress.tsx, frontend/src/pages/JobPage.tsx, frontend/nginx.conf.template

Where this fits

WHERE THIS FITS Slidesmith Studio this module BROWSER React FRONT DOOR AND API nginx, FastAPI BACKGROUND AGENTS LangGraph MODELS Ollama RENDERING Playwright DATA Postgres 17 OPERATIONS evals, Docker, Cloud Run Studio app React pages /render page same renderer nginx proxy, headers Auth sessions, CSRF Brand kit onboarding, uploads Projects deck spec, edits Job runner progress over SSE Research search, facts Strategist outline Designer slide JSON Check fit, else repair LangGraph pipeline state graph, JSON repair Ideas post ideas from pillars qwen3.8:27b Ollama, local GPU Web search Ollama API Chromium render, measure Exports PDF, PNG, ZIP, HTML PostgreSQL users, decks, jobs Uploads disk or GCS Evaluation suites, gate Insights usage, timings Containers Docker Compose Deploy Cloud Run, CI/CD
The job runner (blue: this module) runs agent work in the API process, records it in PostgreSQL and streams it through nginx to the studio app.

A deck takes minutes on a local model: 414 s for 7 slides on the author's Mac with the model already loaded. No web request should stay open that long waiting for an answer, and no user should stare at a spinner without knowing what is happening. This module is the machinery that runs agent work in the background and shows it live: the job runner in the API, the event stream through nginx, and the progress view in the browser.

The rest of this project is yours to keep

This project is bought on its own, once, and stays readable afterwards, including the parts added to it later.

Or open everything with a plan