The Autonomous AI Writing Agent — Built for Authors
AuthorClaw is a security-hardened AI agent purpose-built for fiction and nonfiction authors. It doesn't just write — it runs the entire book production pipeline autonomously, from first idea to KDP-ready manuscript.
Give it an idea and a pen name. It plans, writes, revises, formats, and launches. Pipeline mode chains 6 production phases automatically. Author personas manage multiple pen names with distinct voices. Deep revision runs 21 editing passes. Export produces professional DOCX and EPUB ready for self-publishing.
Tell it what you want. It figures out the steps, picks the right skills, and executes.
"It's not just a writing tool. It's a writing partner, research assistant, editor, and marketing team rolled into one."
User: "/novel a small-town romance under pen name Lily Hart"
AuthorClaw: "Pipeline created — 6 phases, 48 steps total"
Phase 1: Book Planning (6 steps) — market analysis, premise, characters, outline, synopsis
Phase 2: Book Bible (5 steps) — world-building, character bible, continuity, themes, style
Phase 3: Book Production (20 steps) — write + self-review per chapter
Phase 4: Deep Revision (21 steps) — 3-pass editing + AI beta readers
Phase 5: Format & Export (4 steps) — front matter, back matter, DOCX, EPUB
Phase 6: Book Launch (6 steps) — blurb, Amazon description, keywords, ad copy, social posts
"Phase 1 started. Persona 'Lily Hart' context injected."
# 1. Clone and install
git clone https://github.com/Ckokoski/authorclaw.git
cd authorclaw
npm install
# 2. Start AuthorClaw (auto-generates vault key on first run)
npx tsx gateway/src/index.ts
# 3. Open dashboard: http://localhost:3847
# Settings (sidebar) → paste your Gemini API key → Save
# (Free tier — the whole book costs $0)
# 4. Home → chat: "Write me a thriller about rogue AI" → Send
# OR send /project to your Telegram bot
First run? AuthorClaw auto-generates a vault encryption key and saves it to
.env. Your API keys will persist across restarts. For a guided setup, runbash scripts/setup-wizard.sh.
See QUICKSTART.md for the full setup guide.
┌─────────────────────────────────────────────────────────────┐
│ AUTHORCLAW v4 ARCHITECTURE │
│ │
│ ┌───────────┐ ┌─────────────────┐ ┌────────────────┐ │
│ │ Channels │ │ Gateway │ │ AI Router │ │
│ │ │ │ │ │ │ │
│ │ Telegram │──▶│ Auth + Sandbox │──▶│ Ollama (free) │ │
│ │ Dashboard │ │ Rate Limiting │ │ Gemini (free) │ │
│ │ API │ │ Injection Detect │ │ DeepSeek ($) │ │
│ │ WebSocket │ │ Audit Logging │ │ Claude ($$) │ │
│ └───────────┘ └─────────────────┘ │ OpenAI ($$) │ │
│ └────────────────┘ │
│ ┌───────────┐ ┌─────────────────┐ ┌────────────────┐ │
│ │ Soul │ │ Project Engine │ │ Skills (19) │ │
│ │ │ │ │ │ │ │
│ │ SOUL.md │ │ 6 Templates │ │ Core (4) │ │
│ │ STYLE.md │ │ Pipeline Mode │ │ Author (13) │ │
│ │ VOICE.md │ │ Author Personas │ │ Marketing (2) │ │
│ │ │ │ DOCX + EPUB │ │ │ │
│ └───────────┘ └─────────────────┘ └────────────────┘ │
│ │
│ ┌───────────┐ ┌─────────────────┐ ┌────────────────┐ │
│ │ Security │ │ Smart Agent │ │ Research Gate │ │
│ │ │ │ │ │ │ │
│ │ Vault │ │ Priority Scoring│ │ Web Search │ │
│ │ Sandbox │ │ Self-Improve │ │ HTML Extraction│ │
│ │ Audit │ │ Agent Journal │ │ Domain Allowlist│ │
│ │ Injection │ │ Sub-Projects │ │ Rate Limiting │ │
│ └───────────┘ └─────────────────┘ └────────────────┘ │
└─────────────────────────────────────────────────────────────┘
AuthorClaw supports 5 AI providers with tiered routing:
| Provider | Tier | Cost | Best For | Setup |
|---|---|---|---|---|
| Ollama | FREE | $0 | Local, private | Install Ollama, runs at localhost:11434 |
| Google Gemini | FREE | $0 | General writing, planning | Dashboard → Settings → paste Gemini key |
| DeepSeek | CHEAP | ~$0.14/M tokens | Creative writing | Dashboard → Settings → paste DeepSeek key |
| Anthropic Claude | PAID | ~$3/M tokens | Complex reasoning, editing | Dashboard → Settings → paste Anthropic key |
| OpenAI GPT-4o | PAID | ~$2.5/M tokens | Alternative premium | Dashboard → Settings → paste OpenAI key |
Task routing is automatic — planning and research use free models, creative writing uses mid-tier, final editing uses premium (when available).
Connect a Telegram bot to control AuthorClaw from your phone:
| Command | What It Does |
|---|---|
/novel [idea] |
Create a full novel pipeline (premise → characters → world → outline → chapters → revision → assembly) |
/project [task] |
Plan & auto-execute any task — AuthorClaw figures out the steps |
/write [idea] |
Quick writing task (short-form content, scenes, intros) |
/projects |
List all projects with status and progress |
/status |
Quick status check on what's running |
/stop |
Pause the active project immediately |
continue |
Resume a paused project |
/research [topic] |
Research a topic using Wikipedia + Google Books (allowlisted domains) |
/files [folder] |
List output files (numbered for easy /read and /export) |
/read [# or name] |
Preview a file's contents |
/export [# or name] [format] |
Export to Word (.docx), HTML, or TXT |
/speak [text or #] |
Generate a voice message — text or read a file aloud |
/voice [on/off/preset] |
Toggle voice chat responses (all replies become voice + text) |
/clean |
View workspace disk usage and clean up old files |
You: /write a short snarky YouTube intro for my channel
AuthorClaw: 📝 On it. Planning "a short snarky YouTube intro"...
AuthorClaw: ✅ Planned 2 steps. Running autonomously...
AuthorClaw: ✅ 1/2: Draft the intro (~400 words)
AuthorClaw: 🎉 All 2 steps complete!
You: /novel a sci-fi thriller about rogue AI in aviation
AuthorClaw: 📖 Novel pipeline created: 32 steps
(premise → bible → outline → chapters → revision → assembly)
AuthorClaw: ✅ 1/32: Develop premise (~800 words)
⏭ Next: Refine premise...
You: /stop
AuthorClaw: ⏸ Paused at step 4/32. Say "continue" to resume.
You: /clean
AuthorClaw: 📊 Workspace Usage: 2.1 MB (67 files)
📁 projects: 43 files (1.8 MB)
📁 exports: 2 files (21 KB)
🧹 /clean projects — delete all project files
Open http://localhost:3847 to access the web dashboard — a sidebar-driven interface with 5 panels:
AuthorClaw includes a built-in neural voice engine powered by Microsoft Edge TTS — no API keys, no binary installation, no cost.
9 author-optimized voice presets:
| Preset | Best For |
|---|---|
narrator_female |
Most genres — clear, expressive (default) |
narrator_male |
Literary fiction, thrillers |
narrator_deep |
Epic fantasy, sci-fi, nonfiction |
narrator_warm |
Romance, memoir |
british_male |
Period pieces, cozy mysteries |
british_female |
Elegant literary fiction |
storyteller |
Adventure, YA |
snarky_nerd |
Witty banter, smart humor, sci-fi |
curious_kid |
Full of wonder, MG, picture books, whimsical |
Telegram voice features:
- /speak Hello world — Generate and send a voice message
- /speak narrator_deep In a world... — Use a specific voice
- /speak 3 — Read file #3 from your last /files listing aloud
- /voice on — Toggle voice mode (all chat replies become voice + text)
- /voice narrator_deep — Set voice mode with a specific preset
- "Read that back" — Re-read the last response as voice
API: POST /api/audio/generate with { text, voice, rate, pitch, volume }
⚠️ Audio files are automatically deleted after 24 hours. If you generate a voice file you want to keep (e.g., a narration of your chapter), save or download it before the auto-cleanup runs. Use
/clean audioto clear them manually, or find them inworkspace/audio/.
AuthorClaw supports uploading manuscripts of any size — from short stories to 100K+ word novels.
Two-tier upload system:
| Upload Type | Size | How It Works |
|---|---|---|
| Small files (< 15K words) | Short stories, chapters, articles | Stored inline in project context — full text sent to AI |
| Large files (15K+ words) | Novels, full manuscripts | Auto-saved to workspace/documents/ — smart excerpts sent to AI |
How smart excerpts work for large manuscripts:
- The first ~4,000 words (setup, voice, style) and last ~1,000 words (current state) are sent to the AI
- A truncation marker tells the AI the full document is available on disk
- This keeps AI context manageable while giving it enough to work with
- The full manuscript is always saved in workspace/documents/ for reference
Document Library API:
- GET /api/documents — List all documents in the library
- POST /api/documents/upload — Upload directly to the library (up to 50MB)
- DELETE /api/documents/:filename — Remove a document
Dashboard: Upload files via the Projects tab (Upload button). Large files are automatically saved to both the project and the central library.
When you give AuthorClaw a task, it doesn't use hardcoded templates. Instead:
If AI planning fails, the system falls back to template-based planning (6 project types with pre-built step sequences). For pipeline mode, AuthorClaw chains all 6 phases (Planning → Bible → Production → Revision → Format → Launch) into a single automated workflow, passing outputs forward between phases.
Skills are markdown files that teach the AI how to handle specific writing tasks. V4 ships with 19 focused, author-centric skills:
Core Skills (4): self-improve, after-action-review, prompt-optimizer, error-recovery
Author Skills (13): premise, outline, book-bible, write, revise, dialogue, style-clone, beta-reader, format, research, nonfiction-research, manusc
$ claude mcp add authorclaw \
-- python -m otcore.mcp_server <graph>