# How to write documentation with AI

[GitBook Agent](https://app.gitbook.com/s/NkEGS7hzeqa35sMXQZ4X/gitbook-agent) is your AI teammate that helps you write, update, review, and maintain documentation — directly inside GitBook.

This video and guide will take you through GitBook Agent, covering:

* What GitBook Agent is, and common use cases
* Where to find GitBook Agent
* [Drafting changes based on prompts](https://app.gitbook.com/s/NkEGS7hzeqa35sMXQZ4X/gitbook-agent/write-and-edit-with-ai)
* [Reviewing changes using GitBook Agent](https://app.gitbook.com/s/NkEGS7hzeqa35sMXQZ4X/gitbook-agent/review-change-requests-with-gitbook-agent)
* Working with GitBook Agent in comments
* [How to manage change requests](https://app.gitbook.com/s/NkEGS7hzeqa35sMXQZ4X/collaboration/change-requests/change-requests-screen) opened by GitBook Agent

{% embed url="<https://www.youtube.com/watch?v=orBAtT9mL7k>" %}

### What is GitBook Agent?

GitBook Agent is an AI assistant built into GitBook. It helps keep docs accurate and current.

It works mainly through **change requests**. That’s where your team already reviews and collaborates.

### Basic workflow

{% stepper %}
{% step %}

### Create a change request with the Agent

Click **Edit** on your docs. Then click **Agent** <picture><source srcset="https://1940848424-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLBGJKQic7BQYBXmVSjy0%2Fuploads%2FloeXRbdcTVIQghEtTeu1%2Fgitbook-agent-dark.svg?alt=media&#x26;token=900a9933-223d-4c94-babb-5308a1a07888" media="(prefers-color-scheme: dark)"><img src="https://1940848424-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLBGJKQic7BQYBXmVSjy0%2Fuploads%2FF1KFkTaGoZ61InqpK1SP%2Fgitbook-agent-light.svg?alt=media&#x26;token=0ca57963-c2a2-4fca-9125-e7ce0b9418d7" alt=""></picture> in the upper right corner to start chatting with GitBook Agent.

Describe what you want in plain language. Tag pages or sections if you want tighter context.

If you’re new to the branching workflow, start with [change requests](https://app.gitbook.com/s/NkEGS7hzeqa35sMXQZ4X/collaboration/change-requests).
{% endstep %}

{% step %}

### Let the Agent draft changes

The Agent reads relevant pages and proposes edits in the change request.

You can watch what it’s doing, and which pages it’s editing, as it goes.
{% endstep %}

{% step %}

### Review what changed

Use the **Changes** tab (aka diff view) to review the full diff before anything goes live.

If you need tweaks, [ask GitBook Agent](https://app.gitbook.com/s/NkEGS7hzeqa35sMXQZ4X/gitbook-agent/review-change-requests-with-gitbook-agent) for another pass inside the same change request.
{% endstep %}

{% step %}

### Merge when you’re happy

When the updates look right, merge the change request to publish them.
{% endstep %}
{% endstepper %}

### Get help while you edit

#### Use the Agent panel

Open the **GitBook Agent panel** any time inside a change request.

Ask for focused work like rewriting a section, tightening tone, or fixing typos.

#### Use the Agent in comments

The Agent also works in **comments**. Mention it with @gitbook to request help on a specific block or paragraph.

Accept the suggestion if it’s correct. Ignore it if it isn’t.

#### Request an AI review

In any change request, open **Request a review** and select **GitBook Agent**. You can also [request a review](https://app.gitbook.com/s/NkEGS7hzeqa35sMXQZ4X/gitbook-agent/review-change-requests-with-gitbook-agent) on work it didn’t create. The Agent can flag issues and check consistency.

### Manage change requests at scale

Open the **Change Requests** dashboard from the left sidebar to triage work across your organization.

Filter by status (draft, in review, merged, archived). Inspect titles, reviewers, participants, and merge rules. Merge directly from the dashboard if you have permission.

#### Filter Agent-created change requests

Filter change requests by author to separate human edits from AI-assisted ones:

* Created by you
* Created by GitBook Agent

### Related documentation

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref">Link</th></tr></thead><tbody><tr><td><strong>GitBook Agent</strong></td><td><a href="https://app.gitbook.com/s/NkEGS7hzeqa35sMXQZ4X/gitbook-agent">GitBook Agent</a></td></tr><tr><td><strong>Request a review from GitBook Agent</strong></td><td><a href="https://app.gitbook.com/s/NkEGS7hzeqa35sMXQZ4X/gitbook-agent/review-change-requests-with-gitbook-agent">Review change requests with GitBook Agent</a></td></tr><tr><td><strong>Change requests</strong></td><td><a href="https://app.gitbook.com/s/NkEGS7hzeqa35sMXQZ4X/collaboration/change-requests">Change requests</a></td></tr></tbody></table>
