Skip to main content

NovelScribe

CI PyPI version Python versions License

An AI-powered autonomous novel generation agent. Give it a concept, pick a genre, and it writes a full novel — outline, characters, world-building, chapters, and all.

v8.0 (Pipeline-to-Frontend Port): the Python scribe CLI and TUI have been removed (cutover shipped in Phase 11, code-side removal in Phase 12). Novel generation now runs in NovelScribe Studio — the Flutter app under frontend/. The Python pipeline is also available as a library (pip install novelscribe) for programmatic use; the thin cross-device sync service lives in novel_harness/sync_backend/ (FastAPI, port 8001).

Language / 语言 / 語言: English | 简体中文 | 繁體中文


What runs where

Component Path Run as
NovelScribe Studio (Flutter app) frontend/ cd frontend && flutter run -d chrome
sync_backend (thin FastAPI sync) novel_harness/sync_backend/ make start-sync-backend (port 8001)
Python pipeline (library) novel_harness/agents/, workflows/, core/ pip install novelscribe

The Flutter app talks to the pipeline locally via RuntimeKernel (BYOK keys configured in-app). sync_backend is the cross-device mirror for projects, chapters, reading state, and the agent/workflow catalog.

What NovelScribe does

Nine specialised AI agents chained into an autonomous pipeline:

discuss → genre → characters → world-building → outline → chapter-planning → writing → continuity → editing

Each agent is a Markdown file with a system prompt and model config. The orchestrator runs them step-by-step through YAML-defined workflows, with verification loops that auto-fix issues until quality passes.

Pipeline capabilities (library-level)

  • 9 specialized agents — writer, editor, character designer, world-builder, continuity checker, etc.
  • Verification loops — auto-detect and fix plot holes, inconsistencies, and quality issues
  • Hook lifecycle framework — YAML-declared hooks with required vs optional semantics and strict guardrails
  • Resilience — step retry/timeout, DAG parallel execution with rollback, exponential+jitter backoff, trigger API
  • Quality gates — Bronze / Silver / Gold / Platinum tiers with metrics and benchmarks
  • Parallel execution — runs independent agents concurrently for 2-4x speedup
  • LLM streaming — real-time token streaming across all providers
  • Circuit breakers — automatic failover between LLM providers
  • Run logging — structured JSONL logs per project
  • Knowledge graph — entity relationships (characters, locations, events) with consistency checking
  • Schema versioning — forward-compatible agent/workflow definitions with migration support
  • Scales to 3M words — hierarchical summaries, memory optimization, chapter pagination, phase-level caching
  • Multi-language — English, 简体中文, 繁體中文 (with fallback)
  • 8 LLM providers — OpenAI, Claude, Gemini, Ollama, LM Studio, MiniMax, ZhipuAI (z.ai), Moonshot (Kimi) — all configurable via BYOK in the Studio

Library use

Install the Python package:

pipx install novelscribe        # isolated env
# or
pip install --user novelscribe

Use the Pipeline programmatically:

from pathlib import Path

from novelscribe import GenerationRequest, Pipeline, PipelineSettings

pipeline = Pipeline(
    PipelineSettings(
        provider="openai",
        model="gpt-5",
        project_root=Path("./novels"),
    )
)

result = pipeline.generate(
    GenerationRequest(
        project_name="the-lighthouse",
        concept="An engineer discovers the lighthouse is sending impossible signals.",
        genre="mystery",
        chapter_count=24,
    )
)

print(result.status)
print(result.project_path)

Pipeline.generate() creates a new project and never overwrites existing state. Use Pipeline.resume(project_name) to continue an interrupted project. Pipeline.run_workflow() is the secondary escape hatch for one named Workflow.

Generation is unattended by default. For checkpoint approval, inject an ApprovalHandler; the Library never reads terminal input. A custom LLMAdapter can replace the built-in provider adapters.

Set provider keys via environment (only needed for direct library use; the Studio manages BYOK itself):

export OPENAI_API_KEY=sk-...
export ANTHROPIC_API_KEY=sk-ant-...
export GOOGLE_API_KEY=...

sync_backend (cross-device sync)

A thin FastAPI service that mirrors projects, chapters, reading state, and the agent/workflow catalog for cross-device use.

make start-sync-backend    # http://0.0.0.0:8001

Endpoints live under /api/v1/... and are documented in openapi.json. The Flutter Studio is the primary client.

Development

git clone https://github.com/huangjien/wst.git
cd wst/novel_harness
uv sync --all-extras

# Run quality checks
make check

# Individual
make format      # ruff format
make lint        # ruff check --fix
make type-check  # mypy
make test        # pytest with coverage
make build       # uv build → dist/

License

MIT

Metadata

Release files for novelscribe 8.4.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for novelscribe 8.4.8
File Size Uploaded Provenance Actions
novelscribe-8.4.8.tar.gz 1.7 MB Without provenance Details for novelscribe-8.4.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for novelscribe 8.4.8
File Interpreter ABI Platform Actions
novelscribe-8.4.8-py3-none-any.whl Python 3 none any Details for novelscribe-8.4.8-py3-none-any.whl

Total release size: 4.0 MB

Release files / novelscribe-8.4.8.tar.gz

Download URL novelscribe-8.4.8.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
a120812b33eb3a53e463fa0257c597100c73a05a48da4f3446b37e8f3da1d0b0
BLAKE2b-256 checksum
How to use checksums
64b94ccfbc71144e319c4d276d1e1954160170b17728ea4deb7c72757a61bca7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / novelscribe-8.4.8-py3-none-any.whl

Download URL novelscribe-8.4.8-py3-none-any.whl
Size 2.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
cb80a636999b4cc5da4df40b0e6a390a6c8a5e26010e05d9c3506c4590e8bade
BLAKE2b-256 checksum
How to use checksums
24e3f805714dd846d34896a3a43ea55410c857c648ab390a7b1183508cbf7943
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for novelscribe 8.4.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

8.4.8 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page