Agentic PDF Form Filler
A visually stunning, minimalist system for automatically filling California court PDF forms using information extracted from donor documents.
Features
- Intelligent Document Extraction: Uses Perplexity Sonar API or OpenAI API to extract data from various document types
- Smart Field Mapping: Automatically maps extracted data to form fields
- Beautiful UI: Clean, minimalist interface for easy form processing
- Docker-Based: Simple deployment with Docker for both development and production
- Modular Design: Microservices architecture for maintainability and scalability
Quick Start
Prerequisites
- Docker and Docker Compose installed
- API keys for Perplexity and/or OpenAI
Setup
- Clone the repository:
git clone https://github.com/yourusername/agentic-pdf.git
cd agentic-pdf
- Create an
.envfile in the root directory:
PERPLEXITY_API_KEY=your_perplexity_api_key
OPENAI_API_KEY=your_openai_api_key
- Start the application in development mode:
docker-compose up --build
The services will be available at:
- UI: http://localhost:8080
- Orchestration Service API: http://localhost:3002
- Other microservices: ports 3000-3005
Usage
- Open http://localhost:8080 in your browser
- Enter the URL of the California court form to fill (or use the default)
- Upload supporting documents (ID cards, previous forms, etc.)
- Wait for the system to process and fill the form
- Download the completed form
Architecture
This project follows a modern microservices architecture:
- UI Layer (Next.js): Provides a clean, responsive interface
- MCP Servers (Node.js/TypeScript): Implements Model Context Protocol servers for various services:
- Puppeteer Server: Downloads PDFs from URLs
- AI Analysis Server: Extracts form fields using AI vision
- Document Extraction Server: Analyzes donor documents
- Field Mapping Service: Maps donor data to form fields
- Form Filling Server: Fills the PDF with mapped data
- Orchestration Layer: Coordinates the workflow between services
Development
Project Structure
agentic-pdf/
├── docker-compose.yml # Main docker-compose configuration
├── docker-compose.override.yml # Development overrides
├── docker-compose.prod.yml # Production configuration
├── nginx.conf # Nginx config for production
├── src/
│ └── mcp-servers/ # Backend services (TypeScript)
│ ├── src/
│ │ ├── config/ # Configuration
│ │ ├── orchestration/ # Workflow orchestrators
│ │ ├── servers/ # MCP server implementations
│ │ └── services/ # Service implementations
│ └── Dockerfile # Multi-stage Dockerfile
└── ui/ # Frontend (Next.js)
├── src/
│ ├── components/ # React components
│ ├── pages/ # Next.js pages
│ └── styles/ # CSS styles
└── Dockerfile # Multi-stage Dockerfile
Local Development
For local development with automatic reloading:
docker-compose up
Production Deployment
For a production deployment:
docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
Design Principles
This project adheres to several key design principles:
- Minimalism: Clean interface and streamlined user experience
- Separation of Concerns: Each component has a single, well-defined responsibility
- Visual Harmony: Consistent use of typography, color, and space
- Progressive Disclosure: Complexity is revealed only when needed
- Error Prevention: Validation and clear user guidance
License
MIT
Agentic PDF Form Filler
Project Details
- mawazawa/agentic-pdf-app
- Last Updated: 3/28/2025
Recomended MCP Servers
This is a repository to experiment with MCP for security
一个能与Cursor集成的图片生成mcp server工具,实现调用即梦逆向接口
Model Context Protocol server to run commands
Lightweight Python Notebook MCP - Enable AI assistants to create, edit, and view Jupyter notebooks via Model Context...
obfusgator.zig
MCP tools for Roaming RAG
A Model Context Protocol (MCP) server for Anytype that enables AI assistants to seamlessly interact with Anytype's API...
Patchright (Playwright patch) MCP server for lightweight models
MCP server that can execute terminal commands
Connect your Uptime Agent monitoring system directly to AI assistants like Claude through the Model Context Protocol (MCP).
Google Chat MCP server that lets AI assistants like Claude and Cursor participate directly in team conversations -...





