Technical Deep Dive

How OpenPatent works.

A complete walkthrough of the local-first architecture, AI agent system, patent-specific tools, and exactly why zero data ever leaves your machine.

→ Start Reading View Source
Core Philosophy

Why local matters.

Patents are the single most valuable asset a technology company or independent inventor can hold. They represent years of R&D, strategic insight, and competitive advantage — all encoded in a document. Sending that document, or even the ideas within it, to a cloud server means trusting a third party with your most sensitive trade secrets.

With OpenPatent, you never have to make that trade. The entire AI inference pipeline runs on hardware you own — your laptop, your server, your air-gapped data centre. The LLM that drafts your patent claims never touches the internet.

Prior art search queries are the only network requests made, and those go directly to official patent databases (USPTO, EPO, WIPO) — no OpenPatent server sits in between.

// data.flow.analysis
INVENTION DESCRIPTION →
Your Machine
Local LLM
Patent Draft ✓
All processing — local. Zero egress.
PRIOR ART QUERIES →
Your Machine
USPTO / EPO / WIPO
Direct patent DB queries only. No proxy.
ATTEMPTS TO REACH OPENPATENT SERVERS →
Your Machine
OpenPatent Cloud
Blocked by design. No outbound calls to us.
  • No telemetry. No crash reports. No phone-home.
  • No model training on your data. Ever.
  • Fully air-gap compatible for secure environments.
  • Open source — audit every function call.
  • GDPR, KVKK, and SOC2 compliant architecture.
System Architecture

Three layers. Zero cloud.

The architecture is intentionally minimal: your input goes in, local LLM processes it, structured patent output comes out.

// Input Layer
CLI InterfaceTerminal-native interface via the openpatent command
Web UIOptional browser interface for document review and multi-user collaboration
Session ManagerMaintains context, conversation history, and system prompts per agent mode
Config HandlerReads .openpatent/openpatent.json for model & provider settings
Local only
// AI Processing Layer
Agent RouterSelects the appropriate agent (draft, prosecute, consult…) based on mode flag or auto-detection
Local LLM AdapterOpenAI-compatible interface — connects to Ollama, LM Studio, or any local endpoint on localhost
Subagent DelegationOrchestrates specialist subagents (prior-art, claims-analyst, reviewer…) as needed per task
Tool RegistryExposes 7 patent-specific tools the LLM can invoke during inference
Structured output
// Output Layer
Document WriterGenerates USPTO/EPO-compliant application structure: claims, spec, abstract, drawings desc.
Document TemplatesJurisdiction-aware templates for PCT, EPO, national filings
Compliance CheckerValidates output against PTO formatting requirements before export
ReviewerFinal-pass subagent that critiques claims for scope, clarity, and strategic strength
Walkthrough

From idea to filed application.

01
Privacy: ✓ Local Only

Install & Configure Your Local LLM

Start by running a compatible local LLM on your machine. OpenPatent connects to any OpenAI-compatible local endpoint. The most common options are Ollama (free, runs on CPU or GPU) and LM Studio (GUI-based, Mac/Windows). Once your model is running at localhost:11434 or similar, configure your .openpatent/openpatent.json to point to it.

For best results with patent drafting, we recommend models with at least 30B parameters (e.g., Llama-3 70B, Mistral Large, Qwen2.5 72B). Medium-quality results are achievable with 7B–14B models on standard laptops.

02
Privacy: ✓ Local Only

Select Your Agent & Describe Your Invention

Launch OpenPatent from the terminal: openpatent --agent draft. The draft agent is the default — it guides you through describing your invention in plain, natural language. No patent jargon required. Just explain what the invention does, how it works, and what problem it solves.

Everything you type stays in memory on your local machine. No keystrokes, clipboard activity, or file contents are transmitted anywhere. The session history is stored as a local JSON file only.

03
Network: ✓ Patent DB Only

Automated Prior Art Search

The prior-art subagent invokes the patent-search tool to query official patent office databases — USPTO, EPO Espacenet, WIPO PatentScope, and JPO. These are direct API calls to the patent offices, not routed through OpenPatent servers.

The LLM analyzes the returned results locally, identifying relevant prior art, assessing patentability scope, and flagging potential §102/§103 issues. A patentability opinion is generated entirely locally and presented to you for review.

04
Privacy: ✓ Local Only

AI Claim Drafting & Application Generation

The draft agent uses a structured prompt pipeline to generate a complete patent application: independent claims → dependent claims → detailed description → abstract → drawing descriptions. The claims-analyst subagent critiques claim scope for over-breadth and under-breadth before the reviewer subagent performs a final quality check.

The document-writer tool structures the output to match the chosen jurisdiction's filing format. The compliance-check tool validates formatting requirements — page limits, claim numbering, dependency chains.

05
Optional: Patent Attorney Review

Human Review & Refinement

OpenPatent outputs structured Markdown and/or DOCX files that a registered patent attorney can review, annotate, and file directly. The platform is designed as an attorney amplifier, not a replacement — it handles the tedious groundwork while your attorney focuses on strategy and prosecution.

For prosecution, use openpatent --agent prosecute to load an office action and generate a response. The agent is MPEP-aware and can construct §102, §103, and §112 arguments with citation support.

06
Optional: Managed Filing

Filing & Ongoing Portfolio Management

With openpatent --agent manage, track your entire portfolio: pending applications, issued patents, annuity deadlines, and maintenance obligations. The docket-query tool pulls live status from patent office APIs.

For our managed-hosting Professional plan, e-filing integrations are available through official USPTO and EPO APIs. For self-hosted installations, filing remains a manual step with the generated documents.

Agent System

Six agents. One pipeline.

Each agent is a purpose-built prompt architecture with access to a curated subset of patent tools and subagents.

openpatent --agent draft

Draft Agent

Default agent. Generates complete patent applications from natural language invention disclosures. Handles claims, specifications, abstracts, and drawing descriptions.

prior-art
claims-analyst
document-writer
reviewer
openpatent --agent prosecute

Prosecute Agent

Responds to USPTO and EPO office actions. Drafts amendments, arguments, and claim traversals with MPEP awareness and citation support.

claims-analyst
legal-research
document-writer
openpatent --agent consult

Consult Agent

Read-only consulting mode. Patentability opinions, FTO analysis, prior art landscape studies, claim scope analysis, and validity opinions.

prior-art
analyst
legal-research
openpatent --agent litigate

Litigate Agent

Litigation support: claim construction memos, infringement claim charts, invalidity contentions, and IPR/PGR petition drafts.

claims-analyst
analyst
legal-research
document-writer
openpatent --agent manage

Manage Agent

Portfolio management: docket tracking, deadline monitoring, status reports, annuity management, and portfolio visualisation.

analyst
document-writer
openpatent --agent strategy

Strategy Agent

Research and planning: white-space analysis, claim strategy, competitive IP landscape mapping, and patent portfolio offence/defence planning.

prior-art
analyst
legal-research
Patent-Specific Tools

Purpose-built tooling.

Seven tools exposed to the LLM during inference — each designed for a specific patent workflow operation.

patent-search

Search USPTO, EPO, WIPO, and JPO patent databases via official APIs. Returns structured prior art results with publication numbers and cited claims.

claim-parser

Parse and analyse patent claim structure — identifies independent/dependent relationships, claim elements, and means-plus-function constructions.

mpep-lookup

Look up specific MPEP sections, 37 CFR rules, and USPTO examination guidelines by section number or natural language query.

docket-query

Query live patent application status, bibliographic data, and prosecution history from USPTO PAIR/PatentCenter and EPO Register APIs.

document-template

Generate jurisdiction-specific patent application templates: US utility/provisional, PCT international, EPO, and select national phase filings.

compliance-check

Validate a patent application draft against USPTO, EPO, or PCT formatting requirements. Flags page limits, numbering, and §112 written description issues.

citation-format

Format patent citations in Blue Book, USPTO, or EPO citation style — for use in office action responses, litigation briefs, and opinions.

+ extensible

The tool registry is open and documented. Add custom tools via the plugin API — connect to internal patent management systems, docket software, or proprietary databases.

Setup Guide

Get running in minutes.

Option A: Ollama (Recommended)

Ollama runs popular open-source models locally on macOS, Linux, and Windows with a simple CLI. No GPU required for smaller models.

# 1. Install Ollama curl -fsSL https://ollama.ai/install.sh | sh # 2. Pull a recommended model ollama pull llama3:70b # 3. Confirm it's running ollama serve ↳ Running on http://localhost:11434
{ "provider": { "ollama": { "base_url": "http://localhost:11434", "model": "llama3:70b" } } }

Option B: Any OpenAI-Compatible Endpoint

OpenPatent supports any endpoint that implements the OpenAI Chat Completions API — perfect for LM Studio, vLLM, LiteLLM, or self-hosted fine-tunes.

{ "provider": { "openai_compatible": { "base_url": "http://localhost:1234/v1", "api_key": "not-needed", "model": "your-local-model-name" } } }

Compatible with:

  • LM Studio (macOS / Windows)
  • vLLM (high-throughput GPU server)
  • LiteLLM (model gateway / proxy)
  • Llamafile (single binary distribution)
  • Jan (cross-platform desktop client)
  • Any OpenAI-compatible local server

Start protecting your IP, privately.

Open source and free forever. Or sign up for our managed hosting — still zero data sharing.