M-Cube is a multi-thinking, multimodal, and multi-verification multi-agent collaborative patent drafting assistant. It relies on LangGraph for multi-agent orchestration, introducing multiple AI Agents to conduct multi-step reasoning. At different stages, it accomplishes various functions—including patent drafting, Office Action (OA) responses, prior art comparison, and claim polishing—based on the multimodal information of patent text and drawings. Throughout the process, it incorporates multiple verifications, such as specification support checks and prior art text-to-image logical verifications, ultimately outputting patent documents with self-consistent technical solutions, robust claims, and mutually corroborating drawings and text.
M-Cube's technical moat is built upon three core features:
-
🧠 Multi-thinking
Based on LangGraph for multi-agent orchestration. Each function possesses a complete working chain of thought, utilizing multiple agents for in-depth analysis and reasoning of documents. It automatically executes multiple rounds of internal adversarial checks, chain-of-thought expansions, and logical reviews during specification drafting, OA responses, patent comparisons, and patent polishing.
-
👁️ Multimodal
Leveraging underlying libraries like PyMuPDF and Pillow, alongside Vision LLMs, M-cube can directly read and dissect complex mechanical topological diagrams and prior art drawings. This achieves precise cross-mapping and verification between patent text and images.
-
🛡️ Multi-verification
Built-in multiple legal compliance audits and anti-hallucination verifications. All output features must have concrete anchors in the technical disclosure or drawings. Human-in-the-Loop (HITL) mechanisms are introduced at critical nodes to ensure complete avoidance of Article 33 (modifying beyond the original scope) red-line risks.
The workflows of M-Cube are illustrated below:
M-Cube deeply abstracts the core working scenarios of patent attorneys, providing four industrial-grade workflows:
- 📝 Patent Drafting: Performs atomic-level feature breakdown and drawing analysis based on technical disclosures. It drafts claims and specifications through multi-agent collaboration, providing traceability checks and logical reviews against the disclosure.
- ⚔️ Office Action (OA) Response: Deeply parses official examination opinions and analyzes the current case against prior art. It determines modification strategies based on the OA, mines fallback features from the specification, conducts feature verification, and ultimately generates the arguments and A33-compliant replacement sheets.
- 🔍 Prior Art Comparison: Analyzes the text and drawings of the current case and prior art documents. It compares features and connection relationships, outputting novelty/inventive step risk grading and subsequent modification suggestions.
- ✨ Claim Polishing: Reconstructs the application document, troubleshooting formal defects in the claims such as unclear preambles, lack of antecedent basis, and non-technical features. It also conducts a logical review of the modified documents.
M-Cube adopts a high-performance hybrid architecture of FastAPI + React + Tauri, supporting both cloud SaaS deployment and local geek-style offline execution.
- Backend Engine: Python 3.10+, FastAPI, Uvicorn, LangGraph, Pydantic v2, sse-starlette.
- Frontend Web: React 18, TypeScript, Vite 5, Tailwind CSS, Zustand.
- Native Desktop: Tauri 2, Rust 2021 (Supports compiling Windows
.exeand macOS.dmg).
-
Rust Toolchain (Only required for Tauri desktop dev/build)
-
Docker Desktop (Only required for Docker deployment)
Under the project directory:
Windows (PowerShell):
copy .env.example .envmacOS/Linux:
cp .env.example .envPlease fill in at least one available model API Key (e.g., OPENAI_API_KEY, DASHSCOPE_API_KEY) in the .env file. Now you can choose the option that works best for you:
Prerequisites:
- Docker installed and running.
- Prepare the
.envfile in the project root directory and fill in the model API Keys as needed.
Start:
docker compose up --buildAccess:
- Frontend:
http://127.0.0.1:1420 - Backend:
http://127.0.0.1:8000
View Logs:
docker compose logs -f backend
docker compose logs -f frontendStop:
docker compose downTerminal 1 (Start Backend Engine):
pip install -r requirements.txt
python -m uvicorn main:app --host 127.0.0.1 --port 8000 --reloadTerminal 2 (Start Frontend Service):
npm install --prefix frontend
npm --prefix frontend run devNetwork Service Access:
- Frontend UI:
http://localhost:1420 - Backend API:
http://127.0.0.1:8000
Note: The tauri:dev command only launches the native desktop shell and will not automatically start the Python backend. Please ensure the backend service is running first according to Step 1 (Terminal 1).
npm install --prefix frontend
npm --prefix frontend run tauri:devnpm --prefix frontend run tauri:buildNote: If you encounter a missing PyInstaller error during local building, you can run:
pip install pyinstallerM-Cube is licensed under the MIT License.
