A production-ready, multi-agent AI system that automates the book publishing pipeline using:
- 🧠 Google Gemini (Vertex AI) for rewriting & review
- 🔁 LangGraph for agent orchestration
- 💾 ChromaDB for version tracking and memory
- 📊 Streamlit UI for real-time human feedback
- ☁️ Cloud Run for scalable, serverless deployment
Automatically rewrite, review, revise, and approve content with AI — just provide a URL.
📖 Read the full implementation guide on Medium:
🔗 AI-Powered Book Publication Workflow with LangGraph and Google Gemini
| Component | Functionality |
|---|---|
| 🧠 Gemini AI | Rewrite & review content using Google’s LLMs |
| 🔁 LangGraph | Multi-agent stateful flow with pause/resume capability |
| 💾 ChromaDB | Store and search past versions by metadata |
| 🧍 Human Review | Streamlit UI lets users approve, revise, or reject |
| ☁️ Cloud Run | Fully serverless, autoscaling deployment |
flowchart TD
_start_ --> writer_agent
writer_agent --> reviewer_agent
reviewer_agent --> manager_agent
manager_agent -->|revision_needed| writer_agent
manager_agent -->|approved| _end_
manager_agent -->|quality_check| quality_check
manager_agent -->|human_review| human_review
human_review -->|approved| quality_check
human_review -->|revision_needed| writer_agent
human_review -->|rejected| _end_
quality_check --> _end_
-
User inputs a URL
-
System scrapes content using Playwright
-
Writer agent rewrites the content (via Gemini)
-
Reviewer agent scores and comments
-
Manager agent routes it for:
- ✅ approval
- 🔁 revision
- 🧍 human review
- ✅ final quality check
-
Versioned outputs are saved in ChromaDB
-
System deployed via Docker + Cloud Run
git clone https://github.com/your-username/ai-book-publisher.git
cd ai-book-publisherpip install -r requirements.txt
playwright install chromiumstreamlit run main.pydocker build -t gcr.io/YOUR_PROJECT_ID/ai-book-publisher .
docker push gcr.io/YOUR_PROJECT_ID/ai-book-publishergcloud run deploy ai-book-publisher \
--image gcr.io/YOUR_PROJECT_ID/ai-book-publisher \
--platform managed \
--region us-central1 \
--allow-unauthenticated \
--port 8080 \
--cpu 2 \
--memory 4Gi \
--timeout 3600 \
--max-instances 5.
├── main.py # Streamlit UI
├── book_workflow.py # LangGraph stateful agent flow
├── agents/
│ ├── writer_agent.py
│ ├── reviewer_agent.py
│ └── manager_agent.py
├── chroma_manager.py # Version storage
├── scraper.py # Web content scraper (Playwright)
├── config.py # Vertex AI + system settings
├── Dockerfile # Cloud Run deployment
└── requirements.txt
{
"original_content": "...",
"writer_output": "...",
"reviewer_feedback": "...",
"manager_decision": "revision_needed",
"status": "awaiting_human_feedback",
"iteration_count": 2
}- Vertex AI + LangGraph integration
- Human-in-the-loop feedback
- ChromaDB versioning
- Streamlit interface
- Cloud Run deployment
- Notion / Google Docs export
- Summarization + Chapter Planning agents
Experience the full multi-agent AI publishing pipeline in action through a clean, interactive Streamlit UI:
- 📝 Enter any public URL to scrape article content
- ✍️ Watch it get rewritten by the Writer Agent
- 🧠 Review AI feedback and decisions from other agents
- 🧍 Interact with human-in-the-loop approval buttons
- 🧾 View reviewer feedback and final quality checks
The demo also logs agent decisions and stores versioned content in ChromaDB in real time.
MIT License © 2025 Sayan Hazra
