Usage
Write a book with your agent
Updated 6 Oct 2026
For agents
Load this page when: you need your agent to write a book
- Write each chapter as a short explanation, then RULE, WHY and APPLY lines for agents.
- Use one
#heading per chapter, because each#heading starts a new page. - Create a book with
trove items create, or import a file withtrove items import <file.md>. - Edit one page at a time with
trove items put <id>:<page> --file page.md --expect-version N.
You get a new book in your library that your agent can read and cite, written from what you know or what you learned.
Before you start
- Trove is installed (see Install).
- You know the topic and who the book is for.
- For a book you already have as a markdown file, ask your agent: "Import ./notes.md into my Trove library as a book." See trove items: write.
Steps
- Ask for an outline first. Tell the agent the topic. The book writer drafts one chapter per topic. You approve the outline before it writes.
- Use the chapter shape. Each chapter starts with a short explanation for a person. Then it has a short "Rules for agents" part, so agents know what to do. Each rule is one sentence, with its reason and the action to take. The book "How to Use Trove" in your library shows this format.
- Write the draft. The book writer creates the book, or imports your file. Each
#heading starts a new page, so keep one chapter on each page. - Review the book. Ask your agent: "Show me the table of contents of the new book." Read a few pages. Check the title and the description. The description must say when to read the book.
- Edit one page at a time. The agent reads the book, notes its version, and writes only the page that changes. If someone wrote in the meantime, the write is refused. The agent reads again and redoes the edit.
- Set the approval rule. Each book has its own rule. Some books the agent updates on its own. Others need your approval for every change.
Prompt to paste
Write a book on <topic> from what we learned. One chapter per topic. Each chapter has a short explanation, then a "Rules for agents" part with each rule, its reason and the action to take. Show me the outline before you write.What you will see
The book writer shows an outline of chapters and waits for your yes. Then it writes the book and reports the title and the id. To check the result, ask your agent for the table of contents. It lists one entry for each chapter. The book writer prints:
โ Created: <title> (ID: <id>)When you ask for a change later, the writer edits the one page that changes. A refused write means nothing was written. The writer reads the book again and retries.
After you write it
To use the new book, ask your agent explicitly: "Search my Trove library for <topic>." That starts the librarian, which picks the books and pages and starts the readers on its own. We are actively working on making the librarian start automatically and reliably, but today you should not rely on it.
Direct CLI
Your agent runs these through the trove command. You can run them yourself in a terminal, but asking your agent is the recommended way: it picks the right flags, waits for processing and checks the result.
| Task | Command |
|---|---|
| Create a book | trove items create |
| Import a markdown file | trove items import <file.md> |
| Show the table of contents | trove items toc <id> |
| Replace one page | trove items put <id>:<page> --file page.md --expect-version N |
See the CLI reference.