Overview

The HolyDocs AI Agent is an autonomous system that monitors your documentation for issues and can automatically fix them. It uses a set of tools to read your content, detect problems, generate improvements, and commit changes directly to your Git repository.

What the Agent Can Do

The agent has access to 7 specialized tools:

ToolPurpose
read_pageRead the content of a specific documentation page
search_docsSearch across documentation for relevant content
list_pagesList all pages in the project
check_linksVerify that internal and external links are valid
check_openapi_driftDetect mismatches between OpenAPI spec and documentation
suggest_editPropose a content change for human review
commit_fixCommit a fix directly to the repository

Tool Details

Fetches the full MDX content of a page by path. The agent uses this to understand existing content before proposing changes. Returns the raw MDX source including frontmatter.

Parameters: path (string) — the page path, e.g., /quickstart Returns: { title, description, content, lastModified }

Performs hybrid search (keyword + semantic) across all pages. The agent uses this to find related content, detect duplicates, and understand how topics are covered across the site.

Parameters: query (string) — the search query Returns: Array of { path, title, snippet, score }

Returns the full navigation tree with page titles, paths, groups, and tabs. The agent uses this to understand site structure and identify gaps in documentation coverage.

Parameters: none Returns: { tabs: [{ tab, groups: [{ group, pages: [{ title, path }] }] }] }

Compares documented API endpoints against the current OpenAPI specification. Detects missing endpoints, changed request/response schemas, updated descriptions, and deprecated operations.

Parameters: specUrl (string, optional) — override the spec URL from docs.json Returns: Array of { endpoint, type, description, severity }

Creates a suggestion with a before/after diff for human review. The suggestion appears in the dashboard and can be approved, edited, or rejected.

Parameters: path (string), description (string), newContent (string) Returns: { suggestionId, status: "pending" }

Commits a change directly to the connected Git repository. Creates a commit on the configured branch with a descriptive commit message. Only available when auto-commit is enabled.

Parameters: path (string), content (string), commitMessage (string) Returns: { commitSha, branch }

Creating Agent Jobs

From the Dashboard

  1. Go to AI Agent in your project sidebar
  2. Enter a prompt describing what you want the agent to do
  3. Click Run Agent

Example prompts:

  • "Check all links in the documentation and fix any broken ones"
  • "Review the API reference pages and update any outdated endpoint descriptions"
  • "Find pages that reference deprecated features and suggest updates"

Via the API

bash
curl -X POST "https://api.holydocs.com/api/v1/projects/PROJECT_ID/agent/jobs" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Check all internal links and report any that return 404" }'

Job Lifecycle

1

Queued

The job is placed in the agent queue. Jobs are processed one at a time per project.

2

Running

The agent executes tools in sequence, reasoning about each step. It can perform multiple rounds of tool calls to gather information and apply fixes.

3

Suggestions

The agent generates suggestions — proposed edits with before/after diffs. Depending on configuration, these can be auto-committed or queued for human review.

4

Completed

The job finishes with a summary of all actions taken, suggestions made, and any issues found.

Reviewing Suggestions

Agent suggestions appear in the dashboard under AI Agent > Suggestions. Each suggestion includes:

  • The affected page path
  • A description of the proposed change
  • A diff showing the before and after content
  • Actions to approve, reject, or edit the suggestion

Approved suggestions are committed to your Git repository using the connected GitHub or GitLab integration.

The agent requires a connected Git repository to commit changes. Projects without Git integration can still generate suggestions but cannot auto-commit fixes.

OpenAPI Drift Detection

The agent can automatically detect when your API documentation drifts out of sync with your OpenAPI specification:

bash
curl -X POST "https://api.holydocs.com/api/v1/projects/PROJECT_ID/agent/jobs" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Check for OpenAPI drift and update any documentation that is out of sync with the current spec" }'

The agent compares documented endpoints, request/response schemas, and descriptions against the live OpenAPI specification and proposes updates.

Usage Limits

PlanAgent Jobs/Day
Free0
Starter0
Pro10
Business25
EnterpriseUnlimited

Slack Integration

The AI Agent integrates with Slack for notifications and interactive approvals:

  • Receive notifications when agent jobs complete
  • Review suggestions directly in Slack
  • Approve or reject changes from the Slack message

See the Slack integration page for setup instructions.

Scheduling

Agent jobs can be scheduled to run on a recurring basis through the dashboard:

  • Daily link checks — Verify all links once per day
  • Weekly content review — Scan for outdated content weekly
  • Post-deploy validation — Run after each deployment to catch issues

Start with a narrow prompt to test the agent's behavior before running broad sweeps. For example, try "Check links on the quickstart page" before "Check all links in the entire site."

Example Workflows

Here are common agent workflows with the prompts and expected outcomes:

Prompt: "Compare the API reference documentation against the current OpenAPI spec and update any endpoints that have drifted."

What the agent does:

  1. Calls check_openapi_drift to compare docs against the spec
  2. For each drift detected, calls read_page to get the current content
  3. Generates updated content that matches the spec
  4. Creates suggestions (or auto-commits) for each changed page

Prompt: "Find pages that reference deprecated features or outdated version numbers and suggest updates."

What the agent does:

  1. Calls search_docs for terms like "deprecated", "legacy", "v1", "old"
  2. Reads each flagged page to understand the context
  3. Proposes edits to update outdated references
  4. Flags pages that may need human review for factual accuracy

Prompt: "Review the documentation structure and identify topics that are missing or underdocumented."

What the agent does:

  1. Calls list_pages to get the full navigation tree
  2. Searches for common documentation topics (authentication, errors, rate limits, etc.)
  3. Compares against the OpenAPI spec to find undocumented endpoints
  4. Generates a report of suggested new pages and sections to add

Auto-Commit vs Review Mode

Control whether the agent commits changes directly or queues them for human review:

ModeBehaviorBest For
Review (default)All changes are queued as suggestions for human approvalProduction documentation, teams with review processes
Auto-commitAgent commits fixes directly to a configurable branchLow-risk fixes (typos, broken links), staging branches

Configure the mode in your project settings:

json
{ "agent": { "autoCommit": false, "commitBranch": "docs/agent-fixes", "commitPrefix": "docs(agent):" }}

When autoCommit is enabled, the agent creates commits on the specified commitBranch. It never commits directly to your default branch. You can then create a pull request to merge the agent's changes after review.

Branch Strategy

For teams that want automated fixes without risking production content:

  1. Set commitBranch to "docs/agent-fixes"
  2. Enable autoCommit
  3. The agent commits all fixes to the docs/agent-fixes branch
  4. A team member reviews and merges the branch via PR
  5. The merge triggers a production deployment automatically
Ask a question... ⌘I