Swarm AI Blog Writer
Production-grade multi-agent blog generation engine powered by Pydantic AI and Groq (Llama 3.3 70B).

About this project
A production-grade, multi-agent blog generation engine powered by Pydantic AI structured validation and Groq (Llama 3.3 70B). Multiple specialized AI agents orchestrate in a synchronized pipeline to create long-form, research-backed blog posts exported as professional PDF reports. The system is standardized on Llama 3.3 70B via Groq for superior reasoning and strict schema adherence, featuring a premium SaaS UI with a high-contrast minimalist aesthetic and bento-grid layout.
Tech Stack
Key Features
Multi-Agent Orchestration
- ▸Planner Agent: Generates a structured 5-section outline using Llama 3.3 70B with Pydantic-validated schema adherence.
- ▸Researcher Agent: Performs deep-dive research for each planned section, enriching content with contextual information.
- ▸Writer Agent: Crafts the final 1000+ word Markdown article from the research, maintaining consistent tone and structure.
- ▸PDF Generator: Sanitizes Markdown content and exports a professional, print-ready PDF report automatically.
Premium SaaS UI
- ▸Bento-Grid Layout: High-contrast minimalist interface built with Vue.js 3 and Tailwind CSS for a premium visual experience.
- ▸GSAP Animations: Smooth, GPU-accelerated animations enhance the live generation panel for real-time feedback.
- ▸Four-Agent Showcase: Dedicated UI cards for each agent (Planner, Researcher, Writer, Editor) with live status indicators.
- ▸Live Generation Panel: Root App.vue panel that streams orchestration progress in real-time to the user.
Highlights
Installation
Clone the Repository
git clone https://github.com/Arfazrll/Swarm-Agent-Orchestrator.git
cd Swarm-Agent-OrchestratorInstall Frontend Dependencies
npm installInstall Backend Dependencies
pip install -r requirements.txtConfigure Environment
# Create a .env file in the root directory:
GROQ_API_KEY=your_groq_key_hereRun Development Servers
# Terminal 1: Start the Vite frontend dev server
npm run dev
# Terminal 2: Start the Flask API server
python api/index.pyChallenges & Solutions
Agent Pipeline Synchronization
Designed a linear, sequential pipeline in swarm_logic.py where each agent's validated Pydantic output is passed as the structured input to the next, eliminating race conditions and ensuring data integrity throughout the generation flow.
LLM Output Schema Enforcement
Leveraged Pydantic v2's model validation to create strict contracts (BlogPlan, FinalBlog) for every LLM response. Any schema violation immediately halts the pipeline, preventing malformed data from corrupting downstream agents.
Serverless PDF Artifact Management
Implemented a stateless PDF generation workflow where FPDF2 renders the Markdown content to a temporary file, streams it to the client as a download response, then automatically deletes the local artifact to maintain a clean serverless environment.