Prepare for your patent attorney
with AI-powered research

PatentForge is an open-source, self-hosted patent platform that takes inventors from "I have an idea" through feasibility analysis, prior art research, claim drafting, compliance pre-screening, and a complete USPTO-formatted patent application draft — all before your first attorney meeting.

Get Started User Manual

Quick Start

git clone https://github.com/scottconverse/patentforge.git
cd patentforge
cd backend && npm install && cd ..
cd services/feasibility && npm install && cd ../..
cd services/claim-drafter && pip install -e . && cd ../..
cd services/compliance-checker && pip install -e . && cd ../..
cd services/application-generator && pip install -e . && cd ../..
cd frontend && npm install && cd ..
cd backend && npx prisma db push && npx prisma generate && cd ..
# Start: PatentForge.bat (Windows) or start each service manually
# Open http://localhost:8080

What PatentForge Does

Structured Technical Analysis

6-stage AI pipeline restates your invention in patent terminology, searches for related art, identifies potential issues, and organizes findings into a structured report.

Prior Art & Claims Discovery

Automated patent search via USPTO Open Data Portal with stop-word filtering and title-weighted scoring. Lazy-load actual patent claims text from the USPTO Documents API on demand.

Real-Time Streaming

Watch the AI write its findings in real time. Stage progress indicators show exactly where you are in the pipeline. Re-run individual stages without restarting.

Cost Transparency

Pre-run cost estimate based on historical run data (within 25% of actual). Configurable cost cap with per-stage token tracking. ODP API usage tracking with weekly summary in Settings.

Self-Hosted & Secure

Runs on your machine. Hardened security: API keys encrypted at rest (AES-256-GCM). Optional Bearer token auth for network deployments. Invention data stays local.

Attorney-Ready Exports

Download findings as styled HTML, Word (.docx with full formatting), or Markdown. Word export for claims and compliance results. CSV export for prior art. Bring structured research to your first attorney meeting.

Compliance Checking

Four automated checks validate claim drafts against 35 USC 112(a) written description, 112(b) definiteness, MPEP 608 formalities, and 101 eligibility. Traffic-light PASS/FAIL/WARN results with MPEP citations and fix suggestions.

Claim Drafting

Multi-agent AI pipeline (Planner, Writer, Examiner) generates independent and dependent patent claims informed by feasibility analysis and prior art. Edit individual claims, view as dependency tree, export to Word.

Application Generation

5-agent sequential pipeline generates a complete USPTO-formatted patent application: background, summary, detailed description, abstract, and figure descriptions. Word export follows 37 CFR 1.52 with paragraph numbering, page numbers, and draft watermark.

452 Automated Tests

Jest backend tests, Vitest component tests, pytest for claim-drafter, compliance-checker, and application-generator, Playwright browser E2E with screenshots and console checks, responsive viewport testing, and automated doc/version auditing. GitHub Actions CI on every push.

Prompt Integrity

SHA-256 hashes of all AI prompt files verified at startup. Drift detection warns if prompts are modified. Prompts licensed CC BY-SA 4.0 so disclaimers survive forks.

The 6-Stage Research Pipeline

1

Technical Intake & Restatement

2

Prior Art Research

3

Patentability Assessment

4

Deep Dive Analysis

5

IP Landscape Assessment

6

Consolidated Report

AI Claim Drafting Pipeline

After the research pipeline completes, generate patent claim drafts using a 3-agent AI pipeline. Each agent specializes in one phase of claim development.

P

Planner

Analyzes prior art & feasibility to create a claim strategy

W

Writer

Drafts 3 independent claims + dependents, capped at 20 total

E

Examiner

Reviews claims for §101/102/103/112 issues, requests revisions

PatentForge is a research tool, not a legal service. The author of this tool is not a lawyer. The AI systems that execute these prompts are not lawyers. No attorney-client relationship is created by using this tool. The output is intended for informational and educational purposes only — to help you prepare for a consultation with a registered patent attorney, not to replace one.

AI-generated analysis may contain errors, omissions, or hallucinated references. Always consult qualified legal counsel before making patent filing decisions.

Legal guardrails built in: first-run clickwrap agreement, API key usage disclosure, embedded disclaimers on every stage output, and persistent disclaimer watermarks on every generated report. See LEGAL_NOTICE.md for full details.

Current Release: v0.6.1

Full changelog →

Architecture

Five-service federated architecture. Each service is independently deployable. Internal services authenticated via shared secret. SSE streaming proxied through the backend. SQLite for development, PostgreSQL for Docker.

PatentForge System Architecture — 6 services

Figure 1: System Architecture (v0.6.0) — 6 services + 3 external APIs

PatentForge Docker Deployment

Figure 2: Docker Compose Deployment Topology (7 containers)

React Frontend

:8080

Invention intake form, real-time streaming output, stage progress indicators, report viewer, claims tab with editable drafts.

React 18 • TypeScript • Vite • Tailwind CSS

NestJS Backend

:3000

Project CRUD, settings management, feasibility run tracking, claim draft orchestration, SSE event forwarding, prior art search via USPTO ODP, Word export. API keys encrypted at rest. Optional Bearer token auth.

NestJS • Prisma ORM • SQLite (dev) / PostgreSQL (Docker)

Feasibility Service

:3001

6-stage sequential AI analysis pipeline. Each stage uses a markdown prompt template with the Anthropic Claude API. Streams tokens in real time via SSE.

Express • Anthropic SSE • 6 prompt templates (CC BY-SA 4.0)

Claim Drafter

:3002

3-agent claim drafting pipeline: Planner (strategy), Writer (claims), Examiner (review). LangGraph state machine with conditional revision loop. Generates up to 20 claims per draft.

Python • FastAPI • LangGraph • Anthropic SDK

Application Generator

:3003

5-agent sequential LangGraph pipeline generates a complete USPTO-formatted patent application: background, summary, detailed description, abstract, and figure descriptions. Word export follows 37 CFR 1.52.

Python • FastAPI • LangGraph • Anthropic SDK • python-docx

Compliance Checker

:3004

4 specialized checker agents validate claims against 35 USC 112(a), 112(b), MPEP 608, and 101. LLM-native approach using Claude with structured prompts. Per-check cost tracking.

Python • FastAPI • LangGraph • Anthropic SDK
Anthropic Claude API

LLM processing + web search

USPTO Open Data Portal

Patent search + claims retrieval

LiteLLM Pricing

Dynamic model cost estimation