Skip to content

zhuzhaoyun/OpenSpec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenSpec

Enterprise-Grade AI Platform for Professional Long-Document Generation

Turn your knowledge base into standards-compliant, publication-ready documents in minutes — not days.

English | 中文

Latest Release License GitHub Stars GitHub Forks PRs Welcome

Live DemoVideo IntroductionQuick StartContact Us


Why OpenSpec?

Generic AI (ChatGPT, Claude, Qwen, etc.) falls short on professional long documents:

Problem Generic AI OpenSpec
Documents over 50 pages Context lost, inconsistencies Chapter-by-chapter generation, fully coherent
Industry standards & regulations Hallucination, makes things up RAG retrieval from your own knowledge base
Document formatting & templates Cannot control layout PDF / Markdown / AutoCAD export
Quality assurance Single-pass, no review Three-agent workflow (Researcher + Generator + Auditor)

OpenSpec is not another AI writing tool. It is a document engineering platform built for professionals who need accuracy, compliance, and scale.

How It Works

                          ┌───────────────────────────────────────┐
                          │          Knowledge Base (RAG)         │
                          │   (Standards, Cases, Project Docs)    │
                          └──┬──────────────┬──────────────┬─────┘
                             │              │              │
                          query on       query on       query on
                          demand         demand         demand
                             │              │              │
┌──────────┐     ┌──────────▼──┐     ┌─────▼──────┐     ┌▼───────────┐     ┌──────────┐
│  User    │────▶│  Researcher │────▶│  Generator │────▶│  Auditor   │────▶│  Human-AI│
│  Input   │     │  (Research  │     │  (Write    │     │  (Review & │     │  Editing │
│          │     │   & Gather) │     │   Content) │     │   Verify)  │     │          │
└──────────┘     └─────────────┘     └────────────┘     └──────┬─────┘     └────┬─────┘
                                           ▲                   │                │
                                           └───── revise ──────┘                ▼
                                                                        ┌──────────────┐
                                                                        │  One-Click    │
                                                                        │  Export       │
                                                                        │  (PDF/MD/CAD) │
                                                                        └──────────────┘

The system is powered by a three-agent workflow, where each agent can autonomously query the knowledge base when it needs more context:

  1. Researcher Agent — Gathers relevant standards, historical cases, and reference materials from the knowledge base to build a solid research foundation
  2. Generator Agent — Produces standards-compliant professional content chapter by chapter, based on the research context
  3. Auditor Agent — Reviews the generated content for compliance, consistency, and accuracy; queries the knowledge base for cross-validation and sends revisions back to the Generator if needed
  4. Human-AI Collaboration — Review, rewrite, and refine at the chapter level
  5. One-Click Export — PDF, Markdown, AutoCAD title blocks, and more

Use Cases

Domain Typical Documents
Architecture Design Construction drawing design notes, feasibility study reports
Automotive Repair Repair technical manuals, fault diagnosis reports
Healthcare Clinical trial reports, diagnosis & treatment standard documents
Bidding & Tendering Technical proposals, tender document preparation
Any Industry Any structured long document generated from a knowledge base

UI Showcase

Project List Document Editor
AI Chat Assistant Knowledge Base Retrieval

Video Demo (Architecture Design Scenario): Watch on Bilibili

Live Demo

Try OpenSpec online: https://archspec.aizzyun.com/

  • Email: test@qq.com
  • Password: test123456

Tech Stack

Layer Technology
Frontend Vue 3, TypeScript, Vite
Backend Spring Boot 3, Java 17
AI Agent Python, LangGraph, LangChain
Knowledge Retrieval RAGFlow
Observability Langfuse (LLM tracing & cost analytics)
Database PostgreSQL
Deployment Docker, Docker Compose

Quick Start

Requirements

Component Version
Docker >= 20.10
Docker Compose >= 2.0

One-Click Deployment

# 1. Clone the repository
git clone https://github.com/zhuzhaoyun/OpenSpec.git
cd OpenSpec

# 2. Copy and edit environment variables
cp deploy/docker/.env.example deploy/docker/.env
# Edit .env and fill in required configurations (RAGFlow, LLM API Key, etc.)

# 3. Start all services
cd deploy/docker
docker compose up -d

Once started, visit http://localhost to use the platform.

Environment Variables

Variable Description Required
RAGFLOW_API_KEY RAGFlow API key Yes
RAGFLOW_BASE_URL RAGFlow service URL Yes
DASHSCOPE_API_KEY LLM API key (default: Qwen) Yes
LANGFUSE_SECRET_KEY Langfuse secret key (Prompt management) No
LANGFUSE_PUBLIC_KEY Langfuse public key No
LANGFUSE_BASE_URL Langfuse service URL No

For the full list of environment variables, see deploy/docker/.env.example.

Local Development

Expand to view local development guide

Frontend

cd apps/web
npm install
npm run dev
# Visit http://localhost:5173

AI Agent

cd apps/agent
pip install -r requirements.txt
cp ../../deploy/docker/.env.example .env
# Edit .env and fill in required configurations
uvicorn app:app --reload --port 5000 --host 0.0.0.0

Backend

cd apps/backend
mvn spring-boot:run

Open Source vs Enterprise

Feature Open Source Enterprise
Intelligent Retrieval & Chapter Generation
Human-AI Collaborative Editing
PDF / Markdown Export
AutoCAD Plugin (File Import)
Training & Q&A Support
Data Processing Consulting

Contributing

We welcome contributions! Feel free to:

  • Star this project to show your support
  • Submit Issues for bug reports and feature requests
  • Open Pull Requests for improvements

Star History

Star History Chart

Contact Us

For enterprise edition details or business cooperation, feel free to reach out:

  • Email: dlutyaol@qq.com

  • WeChat: Scan the QR code below

    WeChat

License

Copyright (c) 2024-2026 OpenSpec Contributors.

Licensed under The GNU General Public License v3.0 (GPLv3).

About

AI-powered professional document generation(企业级智能长文档生成平台)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors