How kartavyaverma/blogpilotai works
BlogPilot AI turns a user topic into a research-backed technical article, optionally adding generated diagrams, and streams progress to its web UI. The principal workflow runs through FastAPI, graph execution, routing, research, planning, parallel writing, and editorial reduction; users can download the Markdown result. The graph preserves the documented SSE, checkpointing, model-provider, and diagram capabilities. Relationships for unsampled routes and UI behavior rely on README statements and the source index; no unsampled implementation details are assumed.
Main entry points: llm.py LLM provider factory · reducer.py Diagram generator · builder.py Graph builder · streaming.py SSE workflow runner
Components 24
Web Interface
- FastAPI app
src/app.py - Web pages
src/api/routes/pages.py - Run and download API
src/api/routes/runs.py - Health endpoint
src/api/routes/health.py - Interactive browser UI
src/static/js/app.js
Workflow Orchestration
- SSE workflow runner
src/graph/streaming.py - Graph builder
src/graph/builder.py
Editorial Agents
- Topic router
src/agents/router.py - Evidence research
src/agents/research.py - Article planner
src/agents/orchestrator.py - Section writer
src/agents/worker.py - Content merger
src/agents/reducer.py - Diagram planner
src/agents/reducer.py - Diagram generator
src/agents/reducer.py
Models and Services
- Runtime configuration
src/core/config.py - LLM provider factory
src/core/llm.py - Groq or Moonshot
- Tavily search
- Kroki renderer
State and Output
- Workflow data models
src/schemas/models.py - PostgreSQL checkpoint
- Generated Markdown
- Generated diagrams
Other components
- Blog author
Connections 34
- Blog author → Interactive browser UI: submits topic
README.md - Interactive browser UI → Run and download API: starts run
README.md - FastAPI app → Web pages: mounts route
src/app.py - FastAPI app → Health endpoint: mounts route
src/app.py - FastAPI app → Run and download API: mounts route
src/app.py - Web pages → Interactive browser UI: serves interface
README.md - Run and download API → SSE workflow runner: starts stream
src/api/routes/runs.py - SSE workflow runner → Graph builder: runs workflow
src/graph/streaming.py - Graph builder → Topic router: dispatches first
src/graph/builder.py - Topic router → Evidence research: routes when needed
src/agents/router.py - Topic router → Article planner: routes otherwise
src/agents/router.py - Evidence research → Article planner: passes evidence
src/graph/builder.py - Article planner → Section writer: fans out sections
src/agents/orchestrator.py - Section writer → Content merger: sends sections
src/graph/builder.py - Content merger → Diagram planner: prepares outline
README.md - Diagram planner → Diagram generator: plans visuals
src/agents/reducer.py - Diagram generator → Generated Markdown: assembles article
src/agents/reducer.py - Diagram generator → Generated diagrams: writes image files
src/agents/reducer.py - Diagram generator → Kroki renderer: renders Mermaid
src/agents/reducer.py - Evidence research → Tavily search: searches queries
src/agents/research.py - Topic router → LLM provider factory: classifies topic
src/agents/router.py - Evidence research → LLM provider factory: extracts evidence
src/agents/research.py - Article planner → LLM provider factory: creates plan
src/agents/orchestrator.py - Section writer → LLM provider factory: writes sections
src/agents/worker.py - Diagram planner → LLM provider factory: plans diagrams
README.md - Diagram generator → LLM provider factory: creates Mermaid
src/agents/reducer.py - LLM provider factory → Groq or Moonshot: selects provider
src/core/llm.py - Runtime configuration → LLM provider factory: configures models
src/core/llm.py - Graph builder → PostgreSQL checkpoint: persists graph state
README.md - SSE workflow runner → Generated Markdown: saves final file
src/graph/streaming.py - Run and download API → Generated Markdown: serves download
src/api/routes/runs.py - SSE workflow runner → Interactive browser UI: streams progress
README.md - Workflow data models → Graph builder: defines graph state
src/graph/builder.py - Runtime configuration → Graph builder: configures checkpoint
src/graph/builder.py