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
Vue.js 3
TypeScript
Vite 5
Tailwind CSS 3
GSAP 3
Flask
Python
Pydantic v2
Groq API
FPDF2
Tools Used
VS Code
Vercel
GitHub
Postman
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.
AI & Validation Layer
▸Pydantic v2 Validation: Structured schema enforcement (BlogPlan, FinalBlog) ensures every LLM output is validated before pipeline progression.
▸Groq Inference: All agents are standardized on Llama 3.3 70B for superior reasoning, speed, and strict JSON adherence.
▸Swarm Logic: Centralized `swarm_logic.py` orchestration module manages the agent pipeline sequencing and error propagation.
▸Robust Models: `models.py` defines the Pydantic data contracts shared across all agents for type-safe inter-agent communication.
Serverless Architecture
▸Vercel Deployment: Serverless-ready architecture with a flat API structure and Vite-built frontend for global edge distribution.
▸Flask Serverless Entry: `api/index.py` acts as the serverless handler, routing all `/api/*` requests from the frontend.
▸Automated Cleanup: PDF artifacts are generated locally and cleaned up automatically after delivery, keeping the server stateless.
▸Vite 5 Frontend: Ultra-fast build tooling for the Vue.js 3 frontend with hot module replacement for rapid development.
Highlights
Multi-Agent Orchestration
Llama 3.3 70B via Groq
Professional PDF Export
Installation
Clone the Repository
git clone https://github.com/Arfazrll/Swarm-Agent-Orchestrator.git
cd Swarm-Agent-Orchestrator
Install Frontend Dependencies
npm install
Install Backend Dependencies
pip install -r requirements.txt
Configure Environment
# Create a .env file in the root directory:
GROQ_API_KEY=your_groq_key_here
Run Development Servers
# Terminal 1: Start the Vite frontend dev server
npm run dev
# Terminal 2: Start the Flask API server
python api/index.py
Challenges & Solutions
Challenge
Agent Pipeline Synchronization
Solution
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.
Challenge
LLM Output Schema Enforcement
Solution
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.
Challenge
Serverless PDF Artifact Management
Solution
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.