MIP-003 compliant AI agent that generates professional Product Requirements Documents (PRDs).
Input: "Build a mobile banking app"
Output: Complete 8-section PRD with Product Overview, Problem Statement, Goals, User Stories, Requirements, Success Metrics, and more.
# Install dependencies
pip install -r requirements.txt
# Create .env file
cp .env.example .envEdit .env:
GROQ_API_KEY=gsk_your_key_here
GROQ_MODEL=llama-3.3-70b-versatile
LLM_PROVIDER=groqGet free key: https://console.groq.com
python main.py "Build a task management app for remote teams"Output:
======================================================================
π PRD Generator AI Agent
======================================================================
Input: Build a task management app for remote teams
β³ Generating PRD...
======================================================================
β
Generated PRD:
======================================================================
# Task Management App for Remote Teams
## Product Overview
A collaborative task management platform designed for remote teams...
## Problem Statement
...
[Complete 8-section PRD]
...
----------------------------------------------------------------------
π Word Count: 652
----------------------------------------------------------------------
python main.py apiServer runs at: http://localhost:8000 Docs: http://localhost:8000/docs
| Endpoint | Method | Description |
|---|---|---|
/availability |
GET | Check if agent is operational |
/input_schema |
GET | Get input requirements |
/start_job |
POST | Generate PRD (optionally with payment) |
/status?job_id=X |
GET | Check job status |
/provide_input |
POST | Provide additional input |
/health |
GET | Health check |
v2.0 Streamlined:
User Input β Single PRD Generator β Professional 8-Section PRD
Performance:
- β‘ 1 agent (was 4 in v1.0)
- β‘ 2,500 tokens/request (was 8,000 - 69% reduction)
- β‘ ~15 seconds (was ~45 seconds - 67% faster)
- β Clean output (no verbose logs)
The agent supports Masumi payment integration for monetization. This is optional - the agent works without payment.
- Register your agent at Masumi Registry
- Get your
AGENT_IDENTIFIER - Set up a Masumi Payment Service
- Add to
.env:
# Optional - Masumi Payment Integration
AGENT_IDENTIFIER=your_agent_identifier_here
PAYMENT_SERVICE_URL=http://localhost:3001/api/v1
PAYMENT_API_KEY=your_payment_api_key
PAYMENT_AMOUNT=10000000
PAYMENT_UNIT=lovelace
NETWORK=PreprodIf you see:
masumi.payment - ERROR - Payment request failed with status 404:
{"status":"error","code":404,"message":"Application not found"}
Cause: Your AGENT_IDENTIFIER is not registered in the Masumi Registry.
Solutions:
- Free Mode: Remove payment variables from
.env- agent will work without payment - Register Agent: Go to Masumi Registry and register your agent
- Use Valid ID: If you have an agent ID, ensure it's correctly configured
Without payment configured, the agent runs in FREE mode and works perfectly for local/testing use.
# Check availability
curl http://localhost:8000/availability
# Start PRD generation (no payment needed if not configured)
curl -X POST http://localhost:8000/start_job \
-H "Content-Type: application/json" \
-d '{
"identifier_from_purchaser": "user_123",
"input_data": {"text": "Build an e-commerce platform"}
}'
# Check status
curl "http://localhost:8000/status?job_id=YOUR_JOB_ID"Visit: http://localhost:8000/docs
Every PRD has 8 sections:
- Product Overview - 2-3 sentence summary
- Problem Statement - What problem does this solve?
- Goals & Objectives - 3-5 measurable goals
- User Stories - "As a [user], I want [goal], so that [benefit]"
- Functional Requirements - Numbered list of features
- Non-Functional Requirements - Performance, security, scalability
- Success Metrics - Measurable KPIs
- Out of Scope - What's NOT included
GROQ_API_KEY=gsk_xxxxxxxxxxxxx
GROQ_MODEL=llama-3.3-70b-versatile
LLM_PROVIDER=groqAGENT_IDENTIFIER=your_registered_agent_id
PAYMENT_SERVICE_URL=http://localhost:3001/api/v1
PAYMENT_API_KEY=your_payment_key
NETWORK=Preprod
PAYMENT_AMOUNT=10000000
PAYMENT_UNIT=lovelaceAPI_PORT=8000
API_HOST=0.0.0.0Error: Rate limit reached. Please try again later or upgrade your Groq tier.
Solution: Groq free tier has 100k tokens/day. Wait 33 minutes or upgrade at https://console.groq.com/settings/billing
Problem: Agent not registered Solution: Remove payment variables or register at Masumi Registry
Problem: Logging not suppressed Solution: Already fixed in v2.0 - update your code
- USAGE.md - Detailed usage guide
- PRODUCTION_IMPROVEMENTS.md - Technical architecture details
- /docs - Interactive API documentation (when server running)
- v2.0 (Current) - Single agent, clean output, 69% token reduction
- v1.0 - Multi-agent pipeline with verbose logging (deprecated)
MIT
- GitHub Issues: Report bugs
- Documentation: See USAGE.md
- API Docs: http://localhost:8000/docs (when running)