A production-grade agentic automation system that generates structured, machine-readable content pages from product data.
- 6 Specialized Agents: Parser, Question Generator, FAQ, Product Page, Comparison, Output
- LangGraph Orchestration: StateGraph with parallel fan-out/fan-in execution
- 7 Logic Blocks: Including cross-block analyzer with impact scoring & risk assessment
- Quality Gates: validate_content_node with conditional routing (pass OR fail-fast)
- Hard Validation: Template validation strictly enforced - no fallback outputs
- Groq LLM Provider: Fast generation with llama-3.3-70b-versatile
- API Key Rotation: Multi-key support with automatic retry on rate limits
- Custom Template Engine: Class-based templates with validation
- Streamlit Demo UI: Interactive interface for content generation
- Machine-Readable Output: 3 JSON files (FAQ, Product, Comparison)
- 15+ FAQ Questions: With deduplication, scoring, and LLM regeneration loop
- Test Suite: 68 unit and integration tests included
┌─────────────────────────────────────────────────────────────┐
│ LangGraph StateGraph │
├─────────────────────────────────────────────────────────────┤
│ parse → generate_questions ─┬→ faq ──────────┐ │
│ ├→ product_page ─┼→ validate │
│ └→ comparison ───┘ ↓ │
│ ┌─────┴─────┐ │
│ │ output │ │
│ │ OR │ │
│ │ END │ │
│ └───────────┘ │
└─────────────────────────────────────────────────────────────┘
Workflow Features:
- Fan-out: 3 agents run in parallel after question generation
- Fan-in: All converge to
validate_content_node - Conditional Routing: Routes to
output(success) OREND(fail-fast)
├── agents/ # 6 agent implementations
├── logic_blocks/ # 7 blocks (benefits, safety, cross_block_analyzer, etc.)
├── templates/ # Template engine with hard validation
├── orchestrator/ # LangGraph workflow with quality gates
├── tests/ # 68 unit and integration tests
├── output/ # Generated JSON files
├── docs/ # Documentation
├── models.py # Pydantic data models
├── config.py # Groq config with API key rotation
├── utils.py # Utility functions
├── app.py # Streamlit UI
└── requirements.txt # Dependencies
git clone https://github.com/yk0007/kasparro-agentic-yaswanth-kuramdasu.git
cd kasparro-agentic-yaswanth-kuramdasupython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtcp .env.example .env
# Edit .env and add your API keysRequired API Key:
GROQ_API_KEY- Groq API key for LLM generation
streamlit run app.py| Provider | Model | Use Case |
|---|---|---|
| Groq | llama-3.3-70b-versatile | All content generation |
Note: This system uses Groq exclusively. Competitor products are fictional (no external search).
- Input Product Data: Enter product JSON or use text fields
- Validate: Click "Validate JSON" to check the input
- Generate: Click "Generate Content" to run the multi-agent workflow
- View Results: See generated content in FAQ, Product, and Comparison tabs
- Download: Click download buttons to save JSON files
python3 -m pytest tests/ -vAll 68 tests verify:
- Assignment Requirements: Product parsing, question generation, templates, logic blocks
- Workflow Integration: LangGraph uses parallel fan-out/fan-in
- Workflow Resilience: Error handling, fail-fast behavior, recovery state
- No External Search: Only internal data used
- FAQ Generation: 15+ questions with deduplication and scoring
{
"name": "Your Product Name",
"concentration": "Key differentiator",
"skin_type": ["Target User 1", "Target User 2"],
"key_ingredients": ["Feature 1", "Feature 2"],
"benefits": ["Benefit 1", "Benefit 2"],
"how_to_use": "Usage instructions",
"side_effects": "Considerations or limitations",
"price": "₹1999"
}| File | Description |
|---|---|
faq.json |
5+ categorized Q&A pairs |
product_page.json |
Complete product page content |
comparison_page.json |
Product A vs Competitor comparison |
See docs/projectdocumentation.md for detailed system design and architecture.
- Python 3.10+
- LangChain - Agent framework
- LangGraph - Workflow orchestration with
StateGraph - Groq API - Fast LLM (llama-3.3-70b-versatile)
- Pydantic - Data validation
- Streamlit - Web UI