Skip to main content
Integrations · GitBook
A Guild agent can draft, review, and publish GitBook documentation without manual intervention. Guild stores the GitBook API key server-side and injects it into every request, so agent code never handles credentials directly. Credential policies let you restrict which operations each agent may call, and every request is recorded for audit.

Book a demo

See how teams govern agents that use GitBook.

Talk to sales

Get access to Guild, then connect GitBook to your first agent.

What the GitBook integration exposes

The integration provides tools under the gitbook_ prefix drawn from the GitBook REST API. They cover documentation sites, spaces, pages, change requests, style guide runs, site analytics, redirects, navigation sections, organization members and teams, and site integrations including MCP servers and channel connections. Tools are imported from the guildai~gitbook package as GitbookTools.

How it works

1

Get a GitBook API key

Generate an API key in your GitBook account settings. Keep it ready to paste into Guild.
2

Connect the credential in Guild

Go to Access & setup > Credentials, click Connect, select gitbook, and paste the key into API Key. See Credentials for workspace, member, and agent-scoped options.
3

Add GitbookTools to your agent

Import GitbookTools from @guildai-services/guildai~gitbook and spread it into your agent’s tools object. Use pick() to include only the tools your agent needs.

Why GitBook access needs governing

GitBook tools can create and delete sites, permanently remove spaces after 7 days, bulk-upsert up to 500 redirects, and manage SAML providers and SCIM connections. Without controls, any agent using the credential could act on any resource it can reach. Guild’s credential proxy checks credential policies before every request leaves the platform, so a DENY rule blocks an operation before it reaches GitBook. You can scope a credential to one workspace, one member, or one agent using the options on the Credentials page, then write ALLOW and DENY rules that restrict operations by name or wildcard pattern. See Credential policies for rule syntax and Credentials for scoping options. An agent that only needs to run style guide checks gets rules that permit only those tools; an agent that manages redirects gets no access to member or team operations.

About the GitBook integration

Agents can create and update GitBook documentation sites, spaces, and pages, manage organization members and teams, and configure site navigation, redirects, and integrations. They can also query site analytics, run style guide checks, and handle change requests for content review workflows. The integration is guildai~gitbook.

Authentication

  • Type: API key
  • Header: Guild sends the key as a bearer token in the Authorization header

Setup

1

Connect GitBook

In Guild, go to Access & setup > Credentials, click Connect, select gitbook, and paste the key into API Key.
See Credentials for workspace, member, and agent-scoped credentials.

Usage

Selecting specific tools

Tools are named with the gitbook_ prefix. Use pick() to include only what your agent needs.

Tools

Tools in the latest published version of guildai~gitbook:

Frequently asked questions

Yes. Write a credential policy that DENY rules cover all mutating operations, or use an ALLOW rule scoped to only the read tools your agent needs. The credential proxy enforces the policy before any request reaches GitBook.
No. The catalog entry for guildai~gitbook lists no webhook_events, so the integration does not fire Guild event triggers from GitBook activity.
Guild sends the API key as a bearer token in the Authorization header. The key is stored server-side and never exposed to agent code.
Yes. An account-scoped credential serves every workspace the account owns by default. You can also scope a credential to a single workspace or a single agent if different workspaces need different GitBook accounts.

Put a governed agent on GitBook documentation this week

Book a demo

See how teams govern agents that use GitBook.

Talk to sales

Get access to Guild, then connect GitBook to your first agent.
Also runs on Guild: Calendly · Coda · Confluence · Fathom Read: Docs: Credential policies · Credentials · Tools in agents
Last modified on December 1, 2026