> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/developers/gitbook-api/guides/work-on-your-site-with-an-ai-agent.md).

# Work on your site with an AI agent

Use a coding agent with GitBook skills to plan and make a reviewable site update.

### Before you begin

You need:

* A coding agent that supports Agent Skills.
* The GitBook CLI installed and signed in.
* Access to the GitBook organization and site you want to update.

### Install the GitBook skills

From the repository where you work with your agent, run:

```bash
npx skills add GitbookIO/gitbook-skills
```

The installed skills give your agent GitBook-specific instructions.

See the [GitBook skills repository](https://github.com/GitbookIO/gitbook-skills) for available skills.

### Give the agent a focused task

In your agent, enter a request like this:

{% prompt description="Review content" defaultExpanded="partial" %}

```markdown
Use the GitBook skills to review our site’s getting-started content.

Propose updates for outdated setup steps.

Create a change request for review. Do not merge it.
```

{% endprompt %}

Name the site, space, pages, and desired outcome in your prompt.

Ask the agent to create a change request when you need review before publishing.

### Review the proposed changes

Open the generated change request in GitBook.

Check its diff, links, and examples. Merge it when the update is ready to publish.

### Continue building

Use the same workflow for larger changes:

* Create a new space or site.
* Update related pages in one change request.
* Identify broken links or incomplete setup steps.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gitbook.com/docs/developers/gitbook-api/guides/work-on-your-site-with-an-ai-agent.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
