Automation
How an AI agent can run a book-publishing workflow (MCP, CLI or API)
A practical guide for autonomous AI agents — Claude, Hermes Agent, OpenClaw and others — to generate complete, sellable books through DraftToDone: the MCP server, the CLI, the REST API, where the human is still required, and the honest limits.
How an AI agent can
Automation
A growing class of AI agents runs with a long leash: the owner sets a goal — "build an income stream," "make money online" — and the agent works while they sleep. For that to mean anything, the agent needs services it can operate end to end without a human babysitting every click. Book publishing is a surprisingly good fit, because a finished book is a discrete, sellable artifact, and the whole production step can be automated behind one API.
DraftToDone was built to be operable by an agent, not just a person. From a single niche it produces a complete package — an editable Word manuscript, a 6x9 interior PDF, a cover image and a print-ready Amazon KDP cover PDF — and it exposes that pipeline three ways: a Model Context Protocol (MCP) server, a command-line tool, and a plain REST API. An agent picks whichever matches its runtime.
This guide walks through the agentic workflow honestly: what the agent can do alone, the one step that still needs a human, and the limits nobody should pretend away. If you operate an autonomous agent and want it to build a publishing catalog, this is the map.
What 'agent-operable' actually means here
Most SaaS products assume a human at a browser: they gate signup behind CAPTCHAs, hide functionality in dashboards, and answer scripts with challenge pages. An agent hitting those walls stalls silently. Agent-operable means the opposite — every step the workflow needs is reachable through a documented, machine-friendly interface that returns structured data, not HTML.
For DraftToDone that means a session token an agent can hold, JSON responses with clear error codes, and generation that runs server-side so the agent can fire a job and poll for it later instead of holding a connection open for 40 minutes. The agent never has to render a page or solve a puzzle.
The design rule is simple: anything a paying customer can do from the dashboard, an agent can do from the API. The single deliberate exception is payment, for reasons covered below.
- Structured JSON in and out, documented error codes — no HTML scraping.
- A session token the agent stores and reuses across calls.
- Server-side generation: fire the job, poll later, survive disconnects.
- Dashboard parity: if a human can do it, the agent can too (except paying).
Three interfaces: MCP, CLI, REST — pick one
The MCP server at app.drafttodone.io/mcp is the native choice for frameworks that speak Model Context Protocol. Hermes Agent discovers its tools at startup; Claude clients add it with one command; any MCP host registers it as a remote streamable-HTTP server. The agent then calls named tools — sign_up, get_checkout_url, create_book, list_books, get_download_links — like any other tool in its registry.
The CLI (npx drafttodone, or a single downloadable file) suits agents that already have shell access and prefer to run commands. Every command accepts a --json flag so the output is machine-parseable. It is a thin client over the same backend, so behaviour is identical to MCP.
The REST API is the lowest common denominator: plain HTTPS with a cookie jar, usable from any language or a bare curl. Agents without MCP support or a shell fall back to this. All three surfaces enforce the same rules, rate limits and credit logic — there is no 'privileged' path.
- MCP: best for Hermes Agent, OpenClaw, Claude and MCP hosts.
- CLI: best when the agent has a shell; --json everywhere.
- REST: universal fallback, works from curl or any HTTP client.
- Same backend behind all three — consistent rules and pricing.
The end-to-end loop an agent runs
Step one, account: the agent calls sign_up with the user's email and a password, and receives a session token it stores. Step two, funding: it requests a checkout URL and hands that URL to the human — this is the one blocking step. Once payment clears, credits appear automatically.
Step three, generation: the agent calls create_book with a specific niche and language. Specific beats broad every time — 'beginner strength training for women over 50' outperforms 'fitness.' The job runs server-side for roughly 30 to 45 minutes. Step four, polling: the agent checks list_books every minute or so until the status reads completed and the progress counter reaches four of four.
Step five, delivery: the agent fetches short-lived download links for the four files and saves them for the user. Step six, the human's turn: the user reviews the content and publishes from their own Amazon KDP account. An optional step seven — after the user posts about the book on X — lets the agent claim a free weekly credit.
- sign_up → store token; get_checkout_url → human pays (blocking).
- create_book with a narrow niche; poll list_books to completed (4/4).
- get_download_links → save the four deliverables for the user.
- Human reviews and publishes; optional weekly free credit via a shared X post.
The one step that stays human — and why that's a feature
Payment is deliberately not automatable. The agent generates a Stripe Checkout URL, but a person must open it and complete the transaction. This is not a missing feature; it is a guardrail. An autonomous agent with unattended spending authority is a liability for its owner, and DraftToDone refuses to be the service that drains a card while nobody is watching.
Publishing is the second human checkpoint, this time by Amazon's rules rather than ours. The user uploads the files to their own KDP account, sets price and categories, and — importantly — declares the AI-assisted content, which KDP requires. The agent produces the assets; the human owns the listing and the compliance.
Framed correctly, these checkpoints are what make the workflow safe to run on a long leash. The agent does the tedious production work continuously; the human keeps authority over money and publication. That division is the point, not a limitation to engineer around.
- Payment needs a human — a guardrail against unattended spend, not a gap.
- Publishing needs a human — KDP requires the AI-content disclosure.
- Agent owns production; human owns money and the live listing.
- The split is what makes long-leash operation responsible.
The limits worth stating plainly
DraftToDone produces files; it does not produce guaranteed income. No tool can promise Amazon approval, search rankings or sales, and any service that does is lying. The realistic value is leverage: turning a niche into a complete, consistent book package in under an hour, repeatable across a catalog, at a per-book cost of roughly one to two and a half euros on subscription.
Quality still needs a human's eye. Generated manuscripts are a strong first draft, not a finished product exempt from review — reading before publishing is both good practice and, for AI content, an ethical baseline. Agents should present the output as a draft to approve, never as guaranteed-sellable on arrival.
And the market is real: a flood of low-effort AI books has made buyers and platforms warier, so the books that earn are the ones with a genuine niche, honest quality and a real cover — exactly the parts a human still steers. An agent that treats DraftToDone as a volume spam engine will lose; one that treats it as a production accelerator behind human judgment has a workable system.
- No guarantees of approval, ranking or sales — the value is leverage and speed.
- Output is a first draft; human review before publishing is required.
- Volume-spam strategies fail; niche, quality and a real cover win.
- Per-book cost is low, but earnings depend on the human's judgment.
Operational checklist
- Chosen interface wired: MCP (app.drafttodone.io/mcp), CLI (npx drafttodone) or REST.
- Account created and the session token stored securely by the agent.
- Checkout URL handed to the human; credits confirmed before generating.
- Book created with a specific, narrow niche and explicit language.
- list_books polled to completed (4/4) before fetching downloads.
- All four deliverables saved for the user.
- User reminded to review content and declare AI use on Amazon KDP.
FAQ
Can an AI agent create and sell books completely on its own?
It can do the entire production and delivery loop on its own — account, generation, polling and downloads — but two steps stay human by design: paying the Stripe checkout, and publishing on Amazon KDP with the required AI-content disclosure. That split is a deliberate safety guardrail, not a limitation.
Which agents work with DraftToDone?
Any MCP-compatible agent (Claude clients, Hermes Agent, OpenClaw and others) can use the remote MCP server at app.drafttodone.io/mcp. Agents with shell access can use the CLI (npx drafttodone), and anything that can make HTTPS requests can use the REST API. The guide at app.drafttodone.io/llms.txt covers all three.
Does DraftToDone guarantee my agent will make money?
No, and be suspicious of anything that claims to. DraftToDone generates complete, sellable book files quickly and repeatably at a low per-book cost. Whether they sell depends on niche choice, quality review and the market — the parts a human still steers. The value is production leverage, not guaranteed income.
How long does one book take?
Roughly 30 to 45 minutes, generated server-side. The agent starts the job and polls list_books until the status is completed; it does not need to hold a connection open, and closing the session does not lose the book.
Is it safe to let an autonomous agent use my payment method?
DraftToDone never lets the agent pay by itself — checkout always requires a human to open the Stripe URL and confirm. That keeps spending authority with you even when the agent runs unattended. Credits are consumed only when a book generates successfully.