The problem
Turning dense source material — lecture notes, textbook chapters, scratch work — into a clean, publishable article series is slow and inconsistent. You re-explain the same concepts, lose the throughline, and quality drifts from one article to the next.
What it does
Writing Agent ingests the source material for a topic and runs it through a fixed sequence of stages, each a focused LLM call whose output is saved and inspectable. Every intermediate artifact is persisted to MongoDB, so you can open any stage and see exactly what the model produced — no black box. The Live demo replays a real run; the Database viewer browses the saved data directly.
Why a workflow, not a "ReAct agent"
The trendy pattern is to let an LLM decide its own next step in a loop. For a deterministic transform like this, that's the wrong tool — it's hard to debug, non-reproducible, and burns tokens deciding what to do instead of doing it. Here the developer fixes the stage order and the LLM only does the work inside each stage. Reproducible, inspectable, and cheap — a deliberate design choice, not a limitation.
Architecture
- Frontend — Next.js on Vercel. The visualizer and database viewer read MongoDB directly through Next.js API routes, so the demo has no backend dependency.
- Backend — FastAPI in a slim Docker image on Render, infra-as-code via
render.yaml. Handles ingestion and live generation runs. - Data — MongoDB Atlas, kept warm by a scheduled GitHub Action so nothing pauses.
- LLM — Anthropic for server-side generation; bring-your-own-key for public live runs.
What I'd build next
- Bring-your-own-key live runs so anyone can run the full pipeline on their own key.
- An automated editor loop that mines the edit history to critique and revise drafts before a human ever sees them.
- Exemplar grounding — condition each stage on a few of my best past articles to pull one-shot quality up.