CRP Scribe¶
Unlimited Long-Form Document & Book Generation
Any Model, Any Length
CRP Scribe uses the continuation engine to generate documents of unlimited length — books, manuals, whitepapers, regulatory reports. The output wall doesn't exist.
Overview¶
Every LLM has a finite output window. Ask for a 30-chapter book and you get 8 chapters before truncation. CRP Scribe eliminates this limitation entirely.
It combines CRP's continuation engine with a template system and outline generator to produce complete, coherent, multi-chapter documents in a single command.
Quick Start¶
Python API¶
from crp import CRPOrchestrator
from crp.products.scribe import CRPScribe
orchestrator = CRPOrchestrator(
provider_name="openai",
model_name="gpt-4o",
)
scribe = CRPScribe(orchestrator=orchestrator)
# Generate a 10-chapter whitepaper
result = scribe.generate(
topic="AI Governance and the EU AI Act",
template="whitepaper",
num_chapters=10,
auto_save_dir="./output/",
)
print(f"Total length: {len(result.full_text):,} characters")
print(f"Chapters: {len(result.chapters)}")
CLI¶
# List available templates
crp scribe templates
# Generate an outline
crp scribe outline --topic "Kubernetes Security" --chapters 8
# Generate a full document
crp scribe generate \
--topic "AI Governance and the EU AI Act" \
--template whitepaper \
--chapters 10 \
--output-dir ./output/
Templates¶
CRP Scribe ships with 5 built-in templates, each with optimized system prompts and chapter structures:
| Template | Best For | Default Chapters |
|---|---|---|
whitepaper |
Industry analysis, thought leadership, regulatory briefs | 8 |
technical_manual |
API docs, deployment guides, runbooks | 12 |
guide |
How-to guides, tutorials, onboarding docs | 8 |
report |
Audit reports, assessments, findings | 6 |
book |
Full-length books, comprehensive references | 15 |
View Templates¶
Outline Generation¶
Generate a structured outline before writing. The outline can be LLM-powered (when a provider is available) or use intelligent defaults:
# LLM-powered outline
outline = scribe.generate_outline(
topic="Blockchain in Healthcare",
num_chapters=8,
template="whitepaper",
)
# Or use intelligent defaults (no LLM required)
outline = CRPScribe.generate_outline(
topic="Blockchain in Healthcare",
num_chapters=8,
)
Full Document Generation¶
With Progress Tracking¶
def on_progress(chapter_num: int, title: str, status: str):
icons = {"generating": "⏳", "complete": "✅", "error": "❌"}
print(f"{icons.get(status, '•')} Chapter {chapter_num}: {title}")
result = scribe.generate(
topic="AI Ethics in Healthcare",
template="book",
num_chapters=12,
progress_callback=on_progress,
auto_save_dir="./my-book/",
)
With Custom Outline¶
outline = [
"Introduction to AI Ethics",
"The Hippocratic Oath in the Age of AI",
"Bias in Medical AI Systems",
"Patient Data Privacy",
"Regulatory Landscape",
"Case Studies",
"Recommendations",
"Conclusion",
]
result = scribe.generate(
topic="AI Ethics in Healthcare",
outline=outline,
template="book",
)
With Additional Context¶
result = scribe.generate(
topic="Kubernetes Networking",
template="technical_manual",
context="Focus on CNI plugins, service mesh, and network policies.",
)
Output Format¶
The DocumentResult object provides:
result.topic # The document topic
result.template # Template used
result.chapters # List of ChapterResult objects
result.full_text # Complete document as a single string
result.metadata # Generation metadata (timestamp, model, etc.)
# Save all chapters to a directory
result.save("./output/")
# Export metadata as JSON
result.to_dict()
Each ChapterResult contains:
chapter.chapter_number # 1-indexed chapter number
chapter.title # Chapter title
chapter.content # Full chapter text
chapter.word_count # Word count
chapter.quality_tier # CRP quality assessment (S/A/B/C/D)
Provider Support¶
CRP Scribe works with any CRP-supported LLM provider:
| Provider | Setup |
|---|---|
| OpenAI | export OPENAI_API_KEY=sk-... |
| Anthropic | export ANTHROPIC_API_KEY=sk-ant-... |
| Ollama | --provider ollama --model llama3 |
| LM Studio | --provider lmstudio --model local-model |
Contact¶
- General enquiries: info@crprotocol.io
- Enterprise licensing: contact@crprotocol.io