AI Novel Generator: a local novel workspace that will not save a chapter without a MongoDB replica set
Uses AI to generate multi-chapter novels, automatically maintaining context continuity and foreshadowing.
At a glance
- What is it?
- AI Novel Generator is an AGPL-3.0 Python and Node.js writing workspace that plans a novel from world and cast down to volumes, arcs, scenes and chapters, generating candidates you review before saving. The writing model is yours to supply and pay for, and the database setup is stricter than most local tools.
- Who is it for?
- AI Novel Generator suits writers comfortable running Docker and a Python plus Node.js stack who want characters, factions, layered plans and prose in one local project, with every AI candidate reviewed before it is saved. It does not suit anyone expecting a free hosted generator: you bring and pay for a model provider, and there are no tagged releases, only the main branch last pushed on 2026-10-16.
- Can I use it commercially?
- Yes, with strict conditions. AGPL-3.0 is a network copyleft licence: if people use a modified version over a network, for example as a hosted service, you must offer them its source code under the same licence.
- Is it still maintained?
- Yes. The repository last received commits 10 days ago.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- YILING0013/AI_NovelGenerator6,476 ★ · +336
| Repository | 2026-09-28 | 2026-11-15 |
|---|---|---|
| YILING0013/AI_NovelGenerator | 6.1k | 6.5k |
336 Stars in the last 48 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Plans run from volume to arc to scene to chapter before any prose
The application keeps characters, factions, relationships, story plans and prose in one project, with a Writing Progress panel pointing at the next step. You prepare core material, plan volumes and confirm their participants, then detail arcs, scenes and chapter plans. Prose is generated from a saved chapter plan, and each AI result is a candidate to review, edit and save, or you write the chapter by hand. A graph shows character relationships and faction membership, and chapter records help review how characters, relationships, items and world rules change. The demo clips follow a fictional project called Tidal Archives from an idea through a story direction to its first saved chapter. In the planning clip, optional rules and items are skipped and an empty volume location list is confirmed, so not every planning field has to be filled before writing. The clips use preset model responses, so they show the workflow, not the quality of any model.
Saving arcs needs MongoDB transactions, so a replica set is mandatory
Arcs, chapters and related records are saved with MongoDB multi-document transactions, which is why a plain standalone MongoDB will not do. The bundled compose.mongodb.yaml runs MongoDB 8.0 as a single-node replica set named rs0 on 127.0.0.1:27017:
docker compose -f compose.mongodb.yaml up -d
docker compose -f compose.mongodb.yaml exec mongodb mongoshOn a new, empty data volume only, initialise it once in the shell:
rs.initiate({ _id: "rs0", members: [{ _id: 0, host: "localhost:27017" }] })
exit()Then run docker compose -f compose.mongodb.yaml ps and wait until mongodb shows healthy, meaning it is a writable primary. An uninitialised instance can report unhealthy; that is not a reason to erase it. Later starts need only up -d, and an existing replica set must not be initialised again. In the app, open Settings, Database Configuration, choose Replace connection, and enter mongodb://127.0.0.1:27017/?replicaSet=rs0&directConnection=true with the database name novel_generator. The config file defaults mongo_transaction_mode to required, and it should stay that way.
An existing Windows MongoDB service collides on port 27017
A standalone MongoDB service already installed on Windows cannot be mixed with this Docker instance or started on the same port. Check first with netstat -ano | findstr :27017. If you already run a writable replica set, point the app at it instead. If you have a standalone database, back it up before planning a conversion or a separate port, and do not delete volumes or recreate databases to clear the conflict. Data lives in the named volumes novel-generator-mongodb-data and novel-generator-mongodb-config, so stop the service with stop and never run down -v, which removes them.
Two runtimes and a launcher that installs nothing
The main route is Windows with PowerShell. It needs Python 3.13, Node.js 24, Git and Docker Desktop; the frontend itself requires Node.js 20.9 or later.
git clone https://github.com/YILING0013/AI_NovelGenerator.git
cd AI_NovelGenerator
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
cd frontend
npm ci
cd ..start.bat opens a desktop launcher that starts both services from .venv and builds the frontend on first use or after relevant changes. It does not install dependencies or MongoDB, and closing it stops the services it started while Docker keeps MongoDB running. The UI is at http://127.0.0.1:3300 and the backend at http://127.0.0.1:8200. On macOS and Linux you skip start.bat, create the environment with python3 -m venv .venv, use .venv/bin/python, and start the backend with main.py.
The model is your provider, on your bill
Nothing generates until you add a provider under Settings, LLM Provider Management: service type, endpoint, API key and model. A global default provider is set under Novel Generation Workflow Configuration, and individual workflow nodes can choose their own model. requirements.txt pins openai 3.22.1, google-genai 2.25.0 and anthropic 1.9.0 as client libraries. The endpoint must support the selected adapter, parameters depend on the provider, and the provider charges for usage. The project ships no model and no free quota.
No releases, so main is the only version
The repository publishes no GitHub releases. You install whatever is on main, last pushed on 2026-10-16. Direct dependencies are pinned exactly in requirements.txt, including fastapi 0.141.1, uvicorn 0.54.0, pydantic 2.13.5 and pymongo 4.18.2, and a comment there notes that newer versions arrive through Dependabot updates that are tested before merging. Generation workflows were tested during development with community-run API resources from members of the LINUX DO community. The code is AGPL-3.0, and a Simplified Chinese README sits alongside the English one. Without release tags there is no changelog entry to check before pulling, so back up your MongoDB volumes before updating a working install.
Editorial conclusion
AI Novel Generator suits writers comfortable running Docker and a Python plus Node.js stack who want characters, factions, layered plans and prose in one local project, with every AI candidate reviewed before it is saved. It does not suit anyone expecting a free hosted generator: you bring and pay for a model provider, and there are no tagged releases, only the main branch last pushed on 2026-10-16. Before installing, check that port 27017 is free and that you can run MongoDB as a replica set.
Frequently asked questions
Which AI is best for generating novels in AI Novel Generator?
AI Novel Generator does not ship or recommend a model. You add your own provider with an endpoint, API key and model, and individual workflow nodes can use different models; its demo uses preset responses and does not show model quality.
Is AI Novel Generator the same as NovelAI?
No. AI Novel Generator is a separate AGPL-3.0 writing workspace that runs on your own computer with a MongoDB replica set and a model provider you configure.
Can I use AI Novel Generator for free?
The software is open source under AGPL-3.0, but AI generation needs a model service you configure yourself, and that provider charges for model usage.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/yiling0013-ai-novelgenerator)Star history chart for your README
[](https://hysenlabs.com/projects/yiling0013-ai-novelgenerator)Was this useful?