A production-grade AI agent specializing in government and commercial RFP analysis with advanced business intelligence capabilities. Features multilingual support for global procurement opportunities and goes far beyond generic document summarization to provide strategic insights for winning more contracts.
- English RFP Support with comprehensive requirements extraction
- Finnish RFP Support including HILMA procurement system integration
- Automatic Language Detection with confidence scoring
- International Organization Support (UN agencies, UNAIDS, WHO, etc.)
- Automatic Government RFP Detection with confidence scoring
- Healthcare vs Government Procurement Classification
- Compliance Framework Identification (FedRAMP, NIST, FISMA, Section 508)
- Security Clearance Requirement Extraction
- Set-Aside Opportunity Detection (Small Business, 8(a), SDVOSB, etc.)
- Structured Requirements Extraction with categorized lists
- Risk Assessment & Bid Recommendations based on company capabilities
- Evaluation Criteria Breakdown with scoring weights
- Competition Analysis and market positioning advice
- Compliance Requirement Mapping for proposal responses
- Sample Response Generation tailored to specific RFP requirements
- Smart handling of large documents (up to 80K+ characters)
- Enhanced prompt engineering for consistent structured output
- Production-ready error handling and timeout management
- Real-time processing feedback and progress indicators
- Robust parsing system with fallback mechanisms
- β Domain Expertise: Deep government contracting knowledge
- β Multilingual Support: English and Finnish RFP analysis
- β Compliance Awareness: Automatic framework detection
- β Business Intelligence: Risk assessment and recommendations
- β Structured Analysis: Consistent, actionable outputs
- β International Scope: UN agencies and global procurement support
- β AI-Powered: Instant analysis vs. manual processes
- β Multilingual: Global procurement vs. English-only tools
- β Affordable: SaaS pricing vs. $50K+ enterprise licenses
- β Easy-to-Use: No training required vs. complex workflows
- β Government-Focused: Specialized intelligence vs. generic tools
- β Proven Results: 20+ requirements extracted from complex RFPs
- Frontend: Streamlit (Python)
- Backend: FastAPI (Python)
- Document Parsing: PyMuPDF, python-docx
- LLM Agent: LangChain + OpenAI API
- CI/CD: GitHub Actions
- Deployment: Render, Fly.io, or Docker
See docs/arhcitecture.md for a detailed overview.
doc-agent-pro/
βββ backend/
β βββ app/
β β βββ main.py
β β βββ agents/
β β βββ services/
β β βββ utils/
β β βββ routes/
β βββ requirements.txt
βββ frontend/
β βββ streamlit_app.py
βββ tests/
β βββ integration/ # End-to-end workflow tests
β βββ debug/ # Debug and utility scripts
β βββ samples/ # Test RFP documents (English & Finnish)
β βββ api/ # API endpoint tests
β βββ unit/ # Unit tests
βββ docs/
β βββ arhcitecture.md
β βββ CONTRIBUTING.md
β βββ conventional-commits.md
β βββ docker-deployment.md # Comprehensive Docker guide
β βββ GENERAL-instructions.md
β βββ agents/
β βββ rfp.md
βββ docker-build-run.sh # One-command Docker setup
βββ docker-verify.sh # Docker setup verification
βββ docker-compose.yml # Docker Compose configuration
βββ Dockerfile
βββ LICENSE
βββ README.md
βββ package.json
The fastest way to get doc-agent-pro running is with Docker:
# 1. Clone the repository
git clone https://github.com/your-username/doc-agent-pro.git
cd doc-agent-pro
# 2. Set your OpenAI API key
export OPENAI_API_KEY=your_openai_api_key_here
# 3. Build and run with one command
chmod +x docker-build-run.sh
./docker-build-run.shπ That's it! The application will be available at:
- Frontend: http://localhost:8501
- Backend API: http://localhost:8000
Verify your setup: Run ./docker-verify.sh to test everything is working.
export OPENAI_API_KEY=your_openai_api_key_here
docker-compose up -dFor the fastest local setup, use the automated start script:
git clone https://github.com/your-username/doc-agent-pro.git
cd doc-agent-pro
chmod +x start.sh
./start.sh bothThis will:
- Create and activate virtual environments
- Install all dependencies
- Start both backend (port 8000) and frontend (port 8501)
- Open the application in your browser
- Python 3.11+
- Node.js (for commit tooling)
- OpenAI API key (set as
OPENAI_API_KEYenvironment variable)
git clone https://github.com/your-username/doc-agent-pro.git
cd doc-agent-procd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtuvicorn app.main:app --reloadcd ../frontend
streamlit run streamlit_app.pyThe application handles documents of various sizes with intelligent processing and multilingual support:
- PDF: Text-based PDFs up to 50MB (English and Finnish)
- DOCX: Microsoft Word documents (future feature)
- English RFPs: Full requirements extraction and analysis
- Finnish RFPs: Native language support with HILMA integration
- Language Detection: Automatic identification with confidence scoring
- International Organizations: Support for UN agencies, UNAIDS, WHO, UNICEF
- Smart Processing: Handles documents up to 80K+ characters
- Enhanced Prompts: Consistent structured output for long documents
- Token Management: Automatically handles OpenAI API token limits
- Processing Time: 10 seconds to 2 minutes depending on document size
- Progress Feedback: Real-time indicators for long-running operations
- English RFPs: 15-20+ requirements typically extracted
- Finnish RFPs: 8-12+ requirements typically extracted
- Structured Output: Categorized requirements (Technical, Experience, Personnel, Compliance)
- Sample Responses: AI-generated proposal responses tailored to specific RFP requirements
- Use clear, text-based PDFs (not scanned images)
- Files under 10MB process fastest
- Large documents are automatically optimized for AI analysis
- Processing includes intelligent section preservation for RFPs and business documents
# Run comprehensive integration tests
python tests/integration/test_english_requirements.py
# Test specific language support
python tests/integration/test_finnish_detection.py
# Full workflow verification
python tests/integration/test_complete_app_workflow.py# Test document detection and classification
python tests/debug/debug_detection_new.py
# Analyze parsing and requirements extraction
python tests/debug/debug_english_parsing.pypytest tests/unit/This project uses Conventional Commits and Commitizen. To make a commit, use:
npm run commit# Clone and build with the enhanced script
git clone https://github.com/your-username/doc-agent-pro.git
cd doc-agent-pro
export OPENAI_API_KEY=your_openai_api_key_here
chmod +x docker-build-run.sh
./docker-build-run.shVerification: Run ./docker-verify.sh to test your Docker setup.
# Run with docker-compose
export OPENAI_API_KEY=your_openai_api_key_here
docker-compose up -d
#### Manual Docker Commands
```zsh
# Build the image
docker build -t doc-agent-pro:latest .
# Run the container
docker run -d \
--name doc-agent-pro \
-p 8000:8000 \
-p 8501:8501 \
-e OPENAI_API_KEY=your_openai_api_key_here \
doc-agent-pro:latest
- Frontend UI: http://localhost:8501
- Backend API: http://localhost:8000
- API Documentation: http://localhost:8000/docs
- Health Check: http://localhost:8000/health
π For detailed Docker setup and troubleshooting, see docs/docker-deployment.md
- Render: Use the Dockerfile for automatic deployment
- Fly.io: Compatible with flyctl deploy
- Railway: Direct GitHub integration with Dockerfile
- AWS/GCP/Azure: Container registry deployment ready
Build Errors:
# If you encounter package hash mismatches:
docker system prune -a # Clean Docker cache
docker build --no-cache -t doc-agent-pro:latest .
# If dependencies fail to install:
docker build --build-arg PIP_TIMEOUT=120 -t doc-agent-pro:latest .Port Conflicts:
# Check what's using the ports
lsof -i :8000
lsof -i :8501
# Stop conflicting services or use different ports
docker run -p 8002:8000 -p 8502:8501 -e OPENAI_API_KEY=your_key doc-agent-pro:latestContainer Management:
# View container logs
docker logs doc-agent-pro
# Stop and restart
docker stop doc-agent-pro
docker start doc-agent-pro
# Complete cleanup and fresh start
docker rm -f doc-agent-pro
./docker-build-run.shPerformance Issues:
# Check container resource usage
docker stats doc-agent-pro
# Increase memory limits if needed
docker run --memory=2g --cpus=2 -p 8000:8000 -p 8501:8501 -e OPENAI_API_KEY=your_key doc-agent-pro:latestThis project is licensed under the MIT License. See LICENSE for details.
We welcome contributions! See CONTRIBUTING.md for guidelines.