A sophisticated tool that generates research-backed Product Requirements Documents (PRDs) using multiple AI agents coordinating through a shared state object. Built with the ReAct (Reasoning + Acting) framework.
Five agents are live with full competitive intelligence pipeline! Here's what's working:
- β ClarificationAgent - Extracts structured metadata from product ideas
- β PlannerAgent - Generates 15-20 domain-specific research queries
- β ResearcherAgent - Executes queries and collects 50-80 evidence sources
- β PainPointsAgent - LLM-based pain point extraction and clustering
- β CompetitorsAgent - Competitive landscape analysis with gap identification
- β Web Search - Tavily API integration with caching
- β Content Extraction - Jina Reader for clean markdown content
- β Credibility Scoring - Domain, recency, and content quality signals
- β Evidence Deduplication - MD5 + SimHash hybrid approach
- β DAG Orchestrator - Manages task dependencies and agent sequencing
- β Test Suite - 266+ passing tests
- β³ PRDWriterAgent - Coming in Day 5
This tool transforms a simple product idea into a comprehensive PRD by:
- β Clarifying ambiguous requirements through intelligent metadata extraction
- β Planning targeted research with domain-specific queries and competitor analysis
- β Conducting web research to gather 50-80 evidence sources per run
- β Scoring source credibility based on domain, recency, and content quality
- β Analyzing pain points with LLM-based semantic clustering (6-12 clusters per run)
- β Mapping competitive landscape with 5-10 competitors and opportunity gaps
- β³ Synthesizing findings into a well-structured PRD with citations (Day 5)
- Multi-Agent Architecture: Specialized agents work together to handle different aspects of PRD generation
- ReAct Framework: Each agent uses a Think-Act-Observe-Update-Reflect loop for intelligent decision-making
- Research-Backed: All claims in the PRD are backed by web research with proper citations
- Stateful & Resumable: Complete execution state is persisted, allowing runs to be paused and resumed
- Production-Ready: Comprehensive error handling, logging, retry logic, and type safety
- Rich CLI: Beautiful command-line interface with progress tracking and formatted output
- Web Search: Tavily API integration (1,000 free searches/month)
- Content Extraction: Jina Reader for clean markdown from any URL
- 50-80 sources collected per product idea
- Source Credibility Scoring:
- Domain reputation (high: .gov, .edu, official docs)
- Recency (newer content weighted higher)
- Content quality signals (statistics, research, depth)
- Evidence Typing: article, forum, review, pricing, docs
- Automatic Deduplication: MD5 + SimHash for exact and near-duplicate detection
- Smart Caching: 24hr TTL to minimize API calls
- LLM-based extraction from forums and reviews
- Semantic clustering of similar pain points (not keyword matching)
- Structured format: who, what, why, severity, frequency
- 6-12 pain point clusters per product idea
- Evidence linking with direct quotes from sources
- Severity ranking: high/medium/low based on frequency and impact
- Automated competitor identification from evidence
- Feature extraction (5-7 key features per competitor)
- Positioning and ICP identification
- Pricing model analysis (freemium, subscription, per-user, etc.)
- Strengths and weaknesses assessment
- 5-10 competitors analyzed per run
- Opportunity gap identification (what competitors collectively miss)
- Market insights generation
User Input: "Build a HIPAA-compliant patient portal"
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DAG Orchestrator β
β - Task dependency resolution β
β - Agent scheduling & retry logic β
β - State checkpointing after each agent β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββΌββββββββββββββββ
βΌ βΌ βΌ
ββββββββββββββββββββ ββββββββββββββββββββ ββββββββββββββββββββ
β Clarification β β Planner β β Researcher β
β Agent β
β β Agent β
β β Agent β
β
β β β β β β
β Extracts: β β Generates: β β Executes: β
β - domain βββ - 15-20 queries βββ - Web search β
β - industry_tags β β - 4 categories β β - Content fetch β
β - target_user β β - priorities β β - Credibility β
β - compliance β β - sources β β - Deduplication β
ββββββββββββββββββββ ββββββββββββββββββββ ββββββββββ¬ββββββββββ
β
ββββββββββ΄βββββββββ
βΌ βΌ
ββββββββββββββββ ββββββββββββββββ
β PainPoints β β Competitors β
β Agent β
β β Agent β
β
β β β β
β Extracts: β β Analyzes: β
β - clusters β β - features β
β - severity β β - pricing β
β - quotes β β - gaps β
ββββββββ¬ββββββββ ββββββββ¬ββββββββ
ββββββββββ¬βββββββββ
βΌ
ββββββββββββββββββββ
β Shared State β
β β
β β
metadata β
β β
research_planβ
β β
evidence β β 50-80 sources
β β
insights β β pain points + competitors
β β³ prd β
ββββββββββββββββββββ
β
βΌ
Saved to: data/runs/{run_id}.json
Our research collects high-quality, diverse sources:
Source Distribution (typical run):
- π Articles: 35-45%
- π¬ Forums (Reddit, HN, Stack Overflow): 20-30%
- β Reviews (G2, Capterra, TrustRadius): 15-20%
- π° Pricing pages: 10-15%
- π Documentation: 5-10%
Credibility Distribution:
- π’ High credibility: 20-30% (.gov, .edu, industry reports, official docs)
- π‘ Medium credibility: 50-60% (tech news, business sites, review platforms)
- π΄ Low credibility: 15-25% (forums, social media - still valuable for pain points!)
Deduplication:
- URL canonicalization (removes tracking params, www variants)
- MD5 hash for exact content matches
- SimHash for near-duplicate detection (paraphrased content)
- Fuzzy title matching (85% similarity threshold)
Our analysis produces actionable, evidence-backed insights:
Pain Point Clustering:
- Semantic grouping (not keyword matching)
- 6-12 clusters per run (balanced granularity)
- Each cluster backed by 2-5 evidence sources
- Direct quotes from users included
- Severity ranking based on frequency + source credibility
Typical Pain Point:
Cluster: "Invoice follow-up overhead"
Who: "Freelance designers billing 5+ clients monthly"
What: "Spend 2-3 hours/week manually tracking unpaid invoices..."
Why: "Most tools lack automated payment tracking..."
Severity: high (mentioned in 8 sources)
Quotes: ["I waste every Monday chasing payments", ...]
Evidence: E5, E12, E23, E45, E51
Competitive Analysis:
- 5-10 main competitors identified
- Feature analysis (5-7 key features per competitor)
- Positioning and ICP extraction
- Pricing model analysis
- Evidence-based strengths/weaknesses
- 3-6 opportunity gaps across entire landscape
Quality Metrics (typical run):
- Pain point specificity: 85%+ (not generic)
- Evidence coverage: 90%+ (all claims backed)
- Quote accuracy: 95%+ (direct from sources)
- Competitor completeness: 80%+ (all major players found)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β CLI (main.py) β
β - Parse arguments β
β - Initialize orchestrator β
β - Display results β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Orchestrator β
β - Coordinate agent execution β
β - Manage workflow β
β - Determine agent selection β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββΌββββββββββββββββ
βΌ βΌ βΌ
ββββββββββββ ββββββββββββ ββββββββββββ
β Clarify β β Research β β PRD β
β Agent β β Agent β β Writer β
β β
β β β³ β β β³ β
ββββββ¬ββββββ ββββββ¬ββββββ ββββββ¬ββββββ
β β β
ββββββββββββββββΌβββββββββββββββ
βΌ
ββββββββββββββββββββ
β Shared State β
β β
β - Metadata β
β - Research Plan β
β - Evidence β
β - Insights β
β - PRD β
β - Task Board β
β - Agent Trace β
ββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββ
β Persistent β
β Storage β
β (JSON files) β
ββββββββββββββββββββ
# 1. Install dependencies
pip install -r requirements.txt
# 2. Set up environment
cp .env.example .env
# Edit .env and add your OPENAI_API_KEY
# 3. Run your first PRD generation
python -m app.main "Build a project management tool for remote teams"
# 4. See the extracted metadata
# Output will show a formatted table with domain, industry tags, target user, etc.# Basic usage
python -m app.main "Build a HIPAA-compliant patient portal"
# With verbose output (shows agent trace)
python -m app.main "AI-powered scheduling assistant" --verbose
# Short form
python -m app.main "Invoice tracking for freelancers" -vOutput:
β Clarification Complete
Extracted Metadata
ββββββββββββββββββββββββ³βββββββββββββββββββββββββββββββββββββββββ
β Field β Value β
β‘ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ©
β Domain β healthcare β
β Industry Tags β patient_engagement, EMR, telehealth β
β Target User β small medical clinics (2-10 providers) β
β Geography β US β
β Compliance β HIPAA, state_medical_boards β
β Status β pending β
ββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββ
python -m app.main --listpython -m app.main --resume <run-id># View all evidence from a run
python -m app.main --inspect <run-id>
# Filter by evidence type
python -m app.main --inspect <run-id> --type forum
python -m app.main --inspect <run-id> --type review
# Filter by credibility
python -m app.main --inspect <run-id> --credibility high
# View specific evidence details
python -m app.main --inspect <run-id> --evidence-id E5
# Combine filters
python -m app.main --inspect <run-id> --type docs --credibility high# Run all tests
pytest tests/ -v
# Run ClarificationAgent tests only
pytest tests/test_clarification.py -v
# Run with coverage
pytest tests/ --cov=app --cov=agentsmultiagent-prd/
βββ app/
β βββ __init__.py
β βββ main.py # CLI interface β
β βββ config.py # Configuration management β
β βββ logger.py # Logging setup β
β βββ state.py # State schema and persistence β
β βββ orchestrator.py # DAG-based agent coordination β
βββ agents/
β βββ __init__.py
β βββ base_agent.py # Base agent with ReAct framework β
β βββ clarification.py # ClarificationAgent β
β βββ planner.py # PlannerAgent β
β βββ researcher.py # ResearcherAgent β
β βββ painpoints.py # PainPointsAgent β
(NEW)
β βββ competitors.py # CompetitorsAgent β
(NEW)
β βββ prompts/
β β βββ clarification.txt # Clarification prompt β
β β βββ planning.txt # Planning prompt β
β β βββ painpoints.txt # Pain points prompt β
(NEW)
β β βββ competitors.txt # Competitors prompt β
(NEW)
β βββ README.md # Agent documentation β
βββ tools/ # Research tools (NEW)
β βββ __init__.py # Package exports β
β βββ web_search.py # Tavily API integration β
β βββ fetch_url.py # Jina Reader content extraction β
β βββ credibility.py # Source credibility scoring β
β βββ dedupe.py # Evidence deduplication β
βββ tests/
β βββ __init__.py
β βββ test_clarification.py # ClarificationAgent tests (11) β
β βββ test_planner.py # PlannerAgent tests (26) β
β βββ test_researcher.py # ResearcherAgent tests (35) β
β βββ test_painpoints.py # PainPointsAgent tests (20) β
(NEW)
β βββ test_competitors.py # CompetitorsAgent tests (24) β
(NEW)
β βββ test_web_search.py # Web search tests (28) β
β βββ test_fetch_url.py # Content fetch tests (38) β
β βββ test_credibility.py # Credibility tests (38) β
β βββ test_dedupe.py # Deduplication tests (46) β
βββ data/
β βββ runs/ # Saved run states (auto-created)
β βββ cache/ # API response cache (auto-created)
β β βββ search/ # Search results cache
β β βββ content/ # Fetched content cache
β βββ logs/ # Application logs (auto-created)
βββ requirements.txt
βββ .env.example
βββ README.md
- Python 3.9+
- OpenAI API key
- Clone the repository:
git clone <repository-url>
cd multiagent-prd- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Configure environment variables:
cp .env.example .envEdit .env and add your OpenAI API key:
OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-4o-2024-08-06
LOG_LEVEL=INFO
python -m app.main "Build a project management tool for remote teams"python -m app.main --resume <run-id>python -m app.main --listThe system uses a comprehensive state schema that tracks all aspects of PRD generation:
State {
run_id: str # Unique run identifier
created_at: str # ISO timestamp
status: "running|blocked|done" # Current status
metadata: {
raw_idea: str # Original product idea
domain: str # Product domain
industry_tags: [str] # Industry classifications
target_user: str # Target audience
geography: str # Geographic focus
compliance_contexts: [str] # Regulatory requirements
prd_style: str # Output format preference
clarification_status: str # Clarification state
}
research_plan: {
queries: [Query] # Research queries to execute
}
evidence: [Evidence] # Collected research evidence
insights: {
pain_points: [PainPoint] # Identified pain points
competitors: [Competitor] # Competitor analysis
workflows: [Workflow] # User workflows
}
prd: {
sections: {} # PRD content sections
notion_markdown: str # Formatted output
citation_map: {} # Evidence citations
}
task_board: [Task] # Agent task management
agent_trace: [AgentTraceEntry] # Execution history
}- Create a new file in
agents/:
from agents.base_agent import BaseAgent
from app.state import State
class MyAgent(BaseAgent):
def run(self, state: State) -> State:
# 1. Think: Analyze state
analysis = self._think(state)
if not analysis["should_act"]:
return state
# 2. Act: Call LLM
prompt = self._load_prompt()
messages = [{"role": "user", "content": prompt}]
response = self._call_llm(messages)
# 3. Observe: Parse response
observations = self._observe(response)
# 4. Update: Modify state
state = self._update_state(state, observations)
# 5. Reflect: Log action
self._log_action(state, "Completed my task")
return state-
Create a prompt template in
agents/prompts/my_agent.txt -
Register the agent in
app/main.py:
from agents.my_agent import MyAgent
orchestrator.register_agent(MyAgent("my_agent", client))What Was Built:
- β Complete project foundation and scaffolding
- β State management with Pydantic models and JSON persistence
- β Configuration and logging infrastructure
- β BaseAgent class with ReAct framework
- β
ClarificationAgent - Full implementation with:
- Structured metadata extraction (domain, tags, users, compliance)
- OpenAI structured output mode
- 159-line prompt with 15-domain taxonomy and 5 few-shot examples
- 11 comprehensive tests (all passing)
- β CLI interface with Rich formatting
- β Verbose mode for detailed agent traces
- β Orchestrator with agent execution loop
Key Achievements:
- 349 lines of production-ready agent code
- Full test coverage for ClarificationAgent
- Beautiful table output for extracted metadata
- Fixed infinite loop bug in agent execution
- Complete documentation (agents/README.md, USAGE.md)
Metrics:
- Total LOC: ~3,500 lines
- Test Coverage: 11 tests, 100% passing
- API Cost per run: ~$0.01-0.02
- Execution Time: 2-5 seconds (clarification only)
What Was Built:
- β
PlannerAgent - Full implementation with:
- Domain-specific research query generation (15-20 queries per run)
- 4 query categories: competitor, pain_points, workflow, compliance
- Priority assignment (high/medium/low)
- Expected sources tagging (forums, reviews, pricing_pages, etc.)
- Post-processing for year markers and duplicate detection
- 437-line prompt with domain-specific competitor lists
- 26 comprehensive tests (all passing)
- β
DAG Orchestrator - Complete rewrite with:
- Task dependency resolution
- Agent registry with auto-discovery
- State checkpointing after each agent
- Retry logic with exponential backoff
- β
Multi-domain testing across 5 verticals:
- Fintech (invoicing, expense tracking)
- Healthcare (telemedicine, patient portals)
- DevTools (security scanning, CI/CD)
- Real Estate (CRM, property management)
- Ecommerce (inventory, order management)
Key Achievements:
- 349 lines of PlannerAgent code
- 437-line prompt with 3 few-shot examples
- Query quality: 60-80% include year markers
- Fuzzy duplicate detection (80% threshold)
- All 37 tests passing
Sample Output:
state.research_plan.queries = [
Query(
id="Q1",
text="athenahealth vs Kareo pricing small practice 2024",
category="competitor",
priority="high",
expected_sources=["pricing_pages", "comparison_sites"]
),
Query(
id="Q2",
text="small clinic EHR implementation problems reddit",
category="pain_points",
priority="high",
expected_sources=["forums"]
),
# ... 13-18 more queries
]What Was Built:
- β
ResearcherAgent - Full implementation with:
- Executes all queries from research plan
- Collects 50-80 evidence sources per run
- Parallel URL fetching (3 concurrent)
- Rich progress bar with real-time status
- Evidence type inference from URLs
- 35 comprehensive tests (all passing)
- β
Web Search Tool (Tavily API):
- Advanced search with domain filtering
- Rate limiting (0.5s between requests)
- Exponential backoff retry (3 attempts)
- File-based caching (24hr TTL)
- 28 tests (all passing)
- β
Content Fetcher (Jina Reader):
- Clean markdown extraction from any URL
- Smart truncation at sentence boundaries
- Metadata extraction (title, author, date)
- Caching (48hr TTL)
- 38 tests (all passing)
- β
Credibility Scorer:
- Domain reputation tiers (50+ high, 30+ medium, 15+ low)
- Recency scoring (favors recent content)
- Content quality signals (research, statistics, depth)
- Spam/clickbait detection
- 38 tests (all passing)
- β
Evidence Deduplicator:
- URL canonicalization (tracking params, www, fragments)
- MD5 hash for exact content matches
- SimHash for near-duplicate detection
- Fuzzy title matching (85% threshold)
- 46 tests (all passing)
- β
CLI Enhancements:
--inspect <run_id>to view evidence- Filter by
--type(article, forum, docs, etc.) - Filter by
--credibility(high, medium, low) - View details with
--evidence-id E5
Key Achievements:
- Full research pipeline: Idea β Metadata β Queries β Evidence
- 185+ tests all passing
- 4 production-ready research tools
- Smart caching saves API calls
- Evidence ready for Day 4 analysis
Metrics:
- Total LOC: ~6,000+ lines
- Test Coverage: 185+ tests, 100% passing
- API Cost per run: ~$0.10-0.20 (search + content)
- Execution Time: 2-5 minutes (full research)
Sample Evidence Output:
Evidence Collected: 67 sources
By Type: {'article': 28, 'forum': 18, 'review': 12, 'pricing': 6, 'docs': 3}
By Credibility: {'high': 15, 'medium': 41, 'low': 11}
βββββββ¬ββββββββββ¬βββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββ
β ID β Type β Cred β Title β
βββββββΌββββββββββΌβββββββββββΌββββββββββββββββββββββββββββββββββββββββββ€
β E1 β article β high β Best Patient Scheduling Software 2024 β
β E2 β review β medium β athenahealth vs Kareo - G2 Comparison β
β E3 β forum β low β HIPAA compliant messaging? : r/healthIT β
β ... β ... β ... β ... β
βββββββ΄ββββββββββ΄βββββββββββ΄ββββββββββββββββββββββββββββββββββββββββββ
What Was Built:
- β
PainPointsAgent - Full implementation with:
- LLM-based pain point extraction from forums and reviews
- Semantic clustering (6-12 clusters per run)
- Structured output: who, what, why, severity, frequency
- Direct quote extraction from evidence
- Evidence linking for full traceability
- 20 comprehensive tests (all passing)
- β
CompetitorsAgent - Full implementation with:
- Automated competitor identification (5-10 per run)
- Feature extraction (5-7 key features per competitor)
- Positioning and ICP analysis
- Pricing model classification
- Strengths/weaknesses assessment
- Opportunity gap identification (3-6 gaps)
- Market insights generation
- 24 comprehensive tests (all passing)
- β
State Schema Updates:
- Extended PainPoint model with cluster details
- Extended Competitor model with positioning, ICP, features
- Added opportunity_gaps and market_insights to Insights
- β
CLI Enhancements:
--inspect <run_id> --painpointsto view pain point clusters--inspect <run_id> --competitorsto view competitive landscape--inspect <run_id> --gapsto view opportunity analysis- Drill-down with
--painpoint-idand--competitor-id
- β
Bug Fixes:
- Fixed naming mismatch in orchestrator (plannerβplanning, researcherβresearch)
Key Achievements:
- Full analysis pipeline: Idea β Evidence β Pain Points + Competitors
- Research-backed competitive intelligence ready for PRD generation
- 266+ tests all passing
- Evidence linking ensures full traceability
Metrics:
- Total LOC: ~8,000+ lines
- Test Coverage: 266+ tests, 100% passing
- Pain Points: 6-12 clusters per run
- Competitors: 5-10 analyzed per run
- Opportunity Gaps: 3-6 identified per run
Sample Pain Point Output:
βββββββ¬βββββββββββββββββββββββββββββ¬βββββββββββ¬ββββββββββββββββββββββββββββββββββ
β ID β Cluster β Severity β Who β
βββββββΌβββββββββββββββββββββββββββββΌβββββββββββΌββββββββββββββββββββββββββββββββββ€
β PP1 β Invoice follow-up overhead β critical β Freelance designers billing 5+ β
β PP2 β Multi-currency complexity β major β Freelancers with intl clients β
β PP3 β Late payment cash flow β critical β Solo freelancers without buffer β
βββββββ΄βββββββββββββββββββββββββββββ΄βββββββββββ΄ββββββββββββββββββββββββββββββββββ
Sample Competitor Output:
βββββββ¬βββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββ¬ββββββββββββββββββ
β ID β Name β Positioning β Pricing Model β
βββββββΌβββββββββββββββΌββββββββββββββββββββββββββββββββββββββΌββββββββββββββββββ€
β C1 β FreshBooks β Simple invoicing for freelancers β Tiered by clientβ
β C2 β QuickBooks SEβ Tax-focused accounting for US β Flat monthly β
β C3 β Wave β Free accounting for small biz β Freemium β
βββββββ΄βββββββββββββββ΄ββββββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββ
Planned:
- PRDWriterAgent implementation
- Generate PRD sections with citations
- Notion markdown formatting
- Citation management
- Populate
state.prd
- State schema and persistence
- Configuration management
- Logging infrastructure
- Base agent with ReAct framework
- CLI interface with Rich output
- Orchestrator with agent execution
- ClarificationAgent - Full implementation with tests
- Research Planner Agent β
- DAG-based Orchestrator β
- Web Search Tool (Tavily API) β
- Content Extraction (Jina Reader) β
- Credibility Scoring β
- Evidence Deduplication β
- ResearcherAgent - Full implementation with tests β
- PainPointsAgent - LLM-based clustering β
- CompetitorsAgent - Competitive landscape analysis β
- Opportunity gap identification β
- Evidence linking and traceability β
- CLI inspection commands β
- PRD Writer Agent
- Citation Manager
- Quality Review Agent
- Notion Markdown Formatter
- Parallel agent execution
- Advanced orchestration logic
- User interaction during execution
- Web UI
- Export formats (PDF, HTML)
| Variable | Description | Default |
|---|---|---|
OPENAI_API_KEY |
OpenAI API key (required) | - |
OPENAI_MODEL |
Model to use | gpt-4o-2024-08-06 |
TAVILY_API_KEY |
Tavily search API key (required for research) | - |
JINA_API_KEY |
Jina Reader API key (optional, higher rate limits) | - |
LOG_LEVEL |
Logging level | INFO |
MAX_RETRIES |
API retry attempts | 3 |
RETRY_DELAY |
Delay between retries (seconds) | 1 |
OUTPUT_DIR |
Directory for run data | data/runs |
LOG_DIR |
Directory for logs | data/logs |
The system includes comprehensive error handling:
- API Errors: Automatic retry with exponential backoff
- Configuration Errors: Clear error messages with resolution hints
- State Persistence: Atomic writes with validation
- Agent Errors: Logged and traced for debugging
Logs are written to both console (with rich formatting) and file:
- Console: Colored output with timestamps
- File:
data/logs/app.logwith detailed information
# Run all tests
pytest tests/ -v
# Run ClarificationAgent tests (11 tests, all passing β
)
pytest tests/test_clarification.py -v
# Run with coverage
pytest tests/ --cov=app --cov=agents --cov-report=html
# Run specific test
pytest tests/test_clarification.py::test_freelance_invoice_tool -v
# Type checking
mypy app/ agents/
# Code formatting
black app/ agents/Total: 266+ tests, all passing β
ClarificationAgent - 11 tests β
- β Metadata extraction across 5 domains
- β Compliance detection (HIPAA, GDPR, SOC2)
- β Error handling and retry logic
PlannerAgent - 26 tests β
- β Query generation (15-20 per run)
- β Category distribution validation
- β Duplicate detection and year markers
ResearcherAgent - 35 tests β
- β Query execution and evidence collection
- β Type inference (article, forum, docs, pricing, review)
- β State updates and task management
- β Error handling for failed searches/fetches
PainPointsAgent - 20 tests β (NEW)
- β Pain point extraction and clustering
- β Evidence filtering (forums, reviews)
- β Quote matching and evidence linking
- β Severity mapping and validation
- β Error handling and task management
CompetitorsAgent - 24 tests β (NEW)
- β Competitor identification and analysis
- β Feature, pricing, and positioning extraction
- β Opportunity gap identification
- β Evidence linking by name/URL
- β Error handling and task management
Web Search Tool - 28 tests β
- β Tavily API integration
- β Caching and rate limiting
- β Retry with exponential backoff
Content Fetcher - 38 tests β
- β Jina Reader content extraction
- β Smart truncation and metadata parsing
- β Error handling and caching
Credibility Scorer - 38 tests β
- β Domain tier classification
- β Recency and content quality scoring
- β Spam/clickbait detection
Evidence Deduplicator - 46 tests β
- β URL canonicalization
- β MD5 hash matching
- β SimHash near-duplicate detection
- β Fuzzy title matching
- Fork the repository
- Create a feature branch
- Make your changes with proper type hints and docstrings
- Add tests
- Submit a pull request
MIT License - see LICENSE file for details
For issues and questions:
- Open an issue on GitHub
- Check the documentation
- Review the agent trace logs for debugging
Built with:
- OpenAI GPT-4
- Pydantic for data validation
- Rich for beautiful CLI output
- ReAct framework for agent reasoning