2026-03-12 17:44:51 +00:00
# Opus Orchestrator AI
2026-03-14 01:17:51 +00:00
> A comprehensive AI-powered book generation system with LangGraph, CrewAI, and AutoGen.
2026-03-12 17:44:51 +00:00
2026-03-14 01:17:51 +00:00
<p align="center">
<img src="https://img.shields.io/badge/python-3.10+-blue.svg" alt="Python">
2026-03-14 23:45:27 +00:00
<img src="https://img.shields.io/badge/LLM-MiniMax_M2.5-green.svg" alt="MiniMax">
<img src="https://img.shields.io/badge/KDP-Ready-orange.svg" alt="KDP">
<img src="https://img.shields.io/badge/Docker-k3s-blue.svg" alt="Docker/k3s">
2026-03-14 01:17:51 +00:00
</p>
2026-03-12 17:44:51 +00:00
2026-03-14 01:17:51 +00:00
## 🎯 What is Opus?
2026-03-13 03:34:49 +00:00
2026-03-14 23:45:27 +00:00
Opus is an AI-powered book generation system that creates professional manuscripts. It supports **fiction** and **nonfiction** with intelligent purpose classification, multiple export formats, and professional publishing workflows.
2026-03-13 03:58:53 +00:00
2026-03-14 01:17:51 +00:00
## ✨ Features
2026-03-13 03:58:53 +00:00
2026-03-14 23:45:27 +00:00
### Core Capabilities
2026-03-14 01:17:51 +00:00
- **Multi-Framework Orchestration**: LangGraph, CrewAI, and AutoGen
- **Intelligent Purpose Classification**: Automatically determines reader purpose
- **100+ Content Frameworks**: From textbooks to RPG modules
- **Checkpoint/Resume**: Long generations can resume from failure
2026-03-14 23:45:27 +00:00
### Input Sources
- **GitHub Repository**: Ingest from any public/private repo
- **S3/Backblaze**: Cloud storage ingestion
- **Local Files**: Direct file input
### Output Formats
- **Scrivener Export**: Chapter-by-chapter with `binder.json`
- **LaTeX**: 31 professional templates
- **HTML**: Styled web output
- **PDF**: Via LaTeX compilation
### Publishing
- **KDP Templates**: 5 trim sizes (5x8, 5.5x8.5, 6x9, 8x8, 8.5x11)
- **31 LaTeX Templates**: Novel, memoir, academic, RPG, cookbook, etc.
- **ISBN/Metadata**: Full publishing metadata support
### Deployment
- **Docker Compose**: Full local stack
- **k3s/Helm**: Production Kubernetes
- **REST API**: Programmatic access
2026-03-13 03:58:53 +00:00
2026-03-14 01:17:51 +00:00
## 🚀 Quick Start
2026-03-12 17:44:51 +00:00
2026-03-13 03:34:49 +00:00
```bash
2026-03-14 01:17:51 +00:00
# Install
pip install opus-orchestrator
2026-03-12 17:44:51 +00:00
2026-03-14 01:17:51 +00:00
# Generate a book (fiction)
opus generate --concept "A robot who dreams of being human" --genre sci-fi
2026-03-13 03:58:53 +00:00
2026-03-14 01:17:51 +00:00
# Generate a book (nonfiction)
2026-03-14 23:45:27 +00:00
opus generate --book-type nonfiction --purpose learn "How to build an AI app"
2026-03-13 03:58:53 +00:00
2026-03-14 23:45:27 +00:00
# Serve API
opus serve --port 8000
2026-03-12 17:44:51 +00:00
```
2026-03-13 03:34:49 +00:00
2026-03-14 01:17:51 +00:00
## 📚 Framework Library
2026-03-13 03:34:49 +00:00
2026-03-14 01:17:51 +00:00
Opus supports **100+ frameworks** organized by content type:
2026-03-13 03:34:49 +00:00
2026-03-14 23:45:27 +00:00
### Nonfiction
2026-03-12 17:44:51 +00:00
2026-03-14 01:17:51 +00:00
| Category | Frameworks | Purpose |
|----------|-----------|---------|
2026-03-14 23:45:27 +00:00
| **Tutorial/How-To** | Tutorial, Howto, Minimalist How-To | Learn to do |
| **Explanation** | Concept Explainer, Socratic Method | Understand |
| **Transformation** | Transformation Journey, Atomic Habits | Personal change |
| **Decision** | Big Idea, Case Study | Make decisions |
| **Reference** | Technical Manual, Quick Reference | Look up info |
2026-03-13 03:34:49 +00:00
2026-03-14 23:45:27 +00:00
### Fiction
2026-03-13 03:34:49 +00:00
2026-03-14 01:17:51 +00:00
| Category | Frameworks |
|----------|-----------|
2026-03-14 23:45:27 +00:00
| **Snowflake** | One-page to novel |
| **Three-Act** | Classic structure |
| **Hero's Journey** | Mythic structure |
| **Save the Cat** | Screenwriting |
| **Story Circle** | Dan Harmon's 8-part |
2026-03-13 03:34:49 +00:00
2026-03-14 23:45:27 +00:00
### RPG/Game Books
2026-03-13 03:34:49 +00:00
2026-03-14 01:17:51 +00:00
| Category | Frameworks |
|----------|-----------|
2026-03-14 23:45:27 +00:00
| **Rulebook** | Core rules, system |
| **Adventure** | Dungeon module, campaign |
| **CYOA** | Choose Your Own Adventure |
## 📄 Output Formats
### Scrivener Export
```python
from opus_orchestrator import export_to_scrivener
result = export_to_scrivener (
manuscript ,
"My Book" ,
split_chapters = True ,
branch = "draft/chapter-1" ,
push_to_remote = True ,
)
```
Output: Individual `.md` files + `binder.json`
2026-03-13 03:34:49 +00:00
2026-03-14 23:45:27 +00:00
### LaTeX Templates (31)
```python
from opus_orchestrator import export_to_latex
2026-03-13 03:47:23 +00:00
2026-03-14 23:45:27 +00:00
export_to_latex ( manuscript , "My Book" , "out.tex" ,
template = "kdp-trade" )
2026-03-13 03:47:23 +00:00
```
2026-03-13 03:34:49 +00:00
2026-03-14 23:45:27 +00:00
**Templates:**
- **KDP**: pocket, trade, 6x9, square, large
- **Genre**: novel, memoir, romance, thriller, sci-fi
- **Academic**: textbook, academic, cleanthesis, classicthesis
- **Specialty**: poetry, cookbook, screenplay, RPG
2026-03-13 03:55:44 +00:00
2026-03-14 23:45:27 +00:00
### HTML Export
```python
from opus_orchestrator import export_to_html
2026-03-13 03:55:44 +00:00
2026-03-14 23:45:27 +00:00
html = export_to_html ( manuscript , "My Book" ,
template = "memoir" )
2026-03-13 03:55:44 +00:00
```
2026-03-14 23:45:27 +00:00
## 🏭 Deployment
2026-03-12 17:44:51 +00:00
2026-03-14 23:45:27 +00:00
### Docker Compose
2026-03-12 17:44:51 +00:00
```bash
2026-03-14 23:45:27 +00:00
# Quick start
cp .env.example .env
# Add your MINIMAX_API_KEY and GITHUB_TOKEN
2026-03-14 01:17:51 +00:00
2026-03-14 23:45:27 +00:00
docker-compose -f deployments/docker-compose.yml up -d
```
2026-03-13 03:34:49 +00:00
2026-03-14 23:45:27 +00:00
### k3s/Helm
```bash
# Install Opus API
helm install opus deployments/k3s/opus-orchestrator/
2026-03-13 03:34:49 +00:00
2026-03-14 23:45:27 +00:00
# Install TeX Live API (for PDF compilation)
helm install texlive deployments/k3s/texlive-api/
2026-03-12 17:44:51 +00:00
```
2026-03-14 01:17:51 +00:00
## 🔌 REST API
2026-03-12 17:44:51 +00:00
2026-03-14 01:17:51 +00:00
```bash
# Start server
opus serve
2026-03-12 17:44:51 +00:00
2026-03-14 01:17:51 +00:00
# Generate (blocking)
curl -X POST http://localhost:8000/generate \
-H "Content-Type: application/json" \
-d '{"concept": "Your book idea", "book_type": "fiction"}'
2026-03-13 03:34:49 +00:00
2026-03-14 01:17:51 +00:00
# Generate (streaming)
curl -X POST http://localhost:8000/generate/stream \
-H "Content-Type: application/json" \
-d '{"concept": "Your book idea"}'
2026-03-13 03:34:49 +00:00
```
2026-03-14 23:45:27 +00:00
## ⚙️ Configuration
### Environment Variables
```bash
export MINIMAX_API_KEY = "your-key" # Primary
export GITHUB_TOKEN = "your-token"
```
### Config File
```yaml
agent :
provider : minimax
model : MiniMax/MiniMax-M2.5
temperature : 0.7
output :
format : markdown
save_to_file : true
split_chapters : true
```
2026-03-14 01:17:51 +00:00
## 🧠 Architecture
2026-03-13 03:34:49 +00:00
```
2026-03-14 01:17:51 +00:00
User Input → Intent Classification → Framework Selection
↓
2026-03-14 23:45:27 +00:00
Purpose Detection (learn/understand/transform/decide)
2026-03-14 01:17:51 +00:00
↓
2026-03-14 23:45:27 +00:00
Framework匹配 (100+ frameworks)
2026-03-14 01:17:51 +00:00
↓
2026-03-14 23:45:27 +00:00
Agent Selection (purpose-specific)
2026-03-14 01:17:51 +00:00
↓
2026-03-14 23:45:27 +00:00
Generation (LangGraph/CrewAI/AutoGen)
2026-03-14 01:17:51 +00:00
↓
2026-03-14 23:45:27 +00:00
Output (Scrivener/LaTeX/HTML/PDF)
2026-03-13 03:34:49 +00:00
```
2026-03-14 23:45:27 +00:00
## 📁 Project Structure
2026-03-12 17:44:51 +00:00
2026-03-14 23:45:27 +00:00
```
opus_orchestrator/
├── orchestrator.py # Main orchestration
├── server.py # REST API
├── cli.py # CLI
├── langgraph_workflow.py # LangGraph pipeline
├── nonfiction/ # Nonfiction system
│ ├── classifier.py # Purpose classifier
│ └── frameworks.py # 35+ frameworks
├── frameworks.py # Fiction frameworks
├── scrivener_export.py # Scrivener output
├── latex_compile.py # LaTeX export
├── html_export.py # HTML output
├── texlive_client.py # TeX Live API
├── templates/
│ └── latex/ # 31 templates
└── deployments/
├── docker-compose.yml
└── k3s/
```
2026-03-13 03:34:49 +00:00
2026-03-14 23:45:27 +00:00
## 📦 Test Suite
2026-03-13 03:34:49 +00:00
2026-03-14 01:17:51 +00:00
```bash
2026-03-14 23:45:27 +00:00
# Run tests
pytest tests/ -v
# Test categories
tests/
├── test_github_ingest.py # GitHub ingestion
├── test_s3_ingest.py # S3/Backblaze
├── test_generation.py # Document generation
├── test_output_push.py # Output push
└── test_e2e.py # End-to-end
2026-03-13 03:34:49 +00:00
```
2026-03-14 23:45:27 +00:00
## 🔗 Links
2026-03-12 17:44:51 +00:00
2026-03-14 23:45:27 +00:00
- [GitHub ](https://github.com/mrhavens/opus-orchestrator-ai )
- [Issues ](https://github.com/mrhavens/opus-orchestrator-ai/issues )
- [BECOMINGONE ](https://github.com/mrhavens/becomingone )
2026-03-12 17:44:51 +00:00
2026-03-14 23:45:27 +00:00
## 📜 License
2026-03-12 17:44:51 +00:00
2026-03-14 01:17:51 +00:00
MIT
2026-03-12 17:44:51 +00:00
2026-03-14 01:17:51 +00:00
## 👤 Author
2026-03-12 17:44:51 +00:00
2026-03-14 01:17:51 +00:00
Mark Havens
2026-03-12 17:44:51 +00:00
2026-03-14 23:45:27 +00:00
---
2026-03-12 17:44:51 +00:00
2026-03-14 23:45:27 +00:00
*Built with ♥ using MiniMax M2.5*