AI Agent
The HolyDocs AI Agent autonomously maintains your documentation by detecting issues, suggesting improvements, and committing fixes.
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:
| Tool | Purpose |
|---|---|
read_page | Read the content of a specific documentation page |
search_docs | Search across documentation for relevant content |
list_pages | List all pages in the project |
check_links | Verify that internal and external links are valid |
check_openapi_drift | Detect mismatches between OpenAPI spec and documentation |
suggest_edit | Propose a content change for human review |
commit_fix | Commit 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 }] }] }] }
Scans pages for internal and external links, then verifies each one. Internal links are checked against the navigation tree. External links are verified with HEAD requests (with a 5-second timeout).
Parameters: pages (string[] | "all") — specific page paths or "all"
Returns: Array of { page, link, status, error }
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
- Go to AI Agent in your project sidebar
- Enter a prompt describing what you want the agent to do
- 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
bashcurl -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
Queued
The job is placed in the agent queue. Jobs are processed one at a time per project.
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.
Suggestions
The agent generates suggestions — proposed edits with before/after diffs. Depending on configuration, these can be auto-committed or queued for human review.
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:
bashcurl -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
| Plan | Agent Jobs/Day |
|---|---|
| Free | 0 |
| Starter | 0 |
| Pro | 10 |
| Business | 25 |
| Enterprise | Unlimited |
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: "Check all internal and external links across the entire documentation site. Report any that are broken or return non-200 status codes."
What the agent does:
- Calls
list_pagesto get all page paths - Calls
check_linkswith"all"to scan every page - Groups results by status (broken, redirected, timeout)
- Generates a summary with suggested fixes for broken internal links
- For broken external links, creates suggestions to update or remove them
Prompt: "Compare the API reference documentation against the current OpenAPI spec and update any endpoints that have drifted."
What the agent does:
- Calls
check_openapi_driftto compare docs against the spec - For each drift detected, calls
read_pageto get the current content - Generates updated content that matches the spec
- 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:
- Calls
search_docsfor terms like "deprecated", "legacy", "v1", "old" - Reads each flagged page to understand the context
- Proposes edits to update outdated references
- 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:
- Calls
list_pagesto get the full navigation tree - Searches for common documentation topics (authentication, errors, rate limits, etc.)
- Compares against the OpenAPI spec to find undocumented endpoints
- 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:
| Mode | Behavior | Best For |
|---|---|---|
| Review (default) | All changes are queued as suggestions for human approval | Production documentation, teams with review processes |
| Auto-commit | Agent commits fixes directly to a configurable branch | Low-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:
- Set
commitBranchto"docs/agent-fixes" - Enable
autoCommit - The agent commits all fixes to the
docs/agent-fixesbranch - A team member reviews and merges the branch via PR
- The merge triggers a production deployment automatically