Working with Agents
Key GuideHow to connect AI agents, LLMs, and automation tools to your documentation.
Agents are First-Class Citizens
AgentDocs is designed from the ground up with AI agents as first-class consumers of documentation. Every page can be accessed as clean, structured Markdown via a dedicated agent endpoint — no HTML parsing, no JavaScript rendering, no authentication hassles.
Whether you're feeding documentation to Claude, ChatGPT, a custom LLM pipeline, or a CI/CD script, AgentDocs provides multiple integration points:
Raw Endpoint
Plain Markdown via share links. No auth needed.
API Tokens
Full CRUD access for agents that need to write.
Webhooks
Push notifications when docs change.
MCP Server — the fastest integrationRecommended
If your agent runs in a client that can launch a local MCP server (Claude Code, Claude Desktop, Cursor, Windsurf), you can skip raw REST: the official MCP server exposes AgentDocs as 14 native tools (keyword and semantic search, read, create, update, append, markdown-folder import, share and more), addressable by slug or UUID. Works with account tokens and space-scoped tokens alike. On Claude.ai web, upload the Skill instead (a hosted remote connector is on the roadmap).
claude mcp add agentdocs --env AGENTDOCS_TOKEN=<your-token> -- npx -y agentdocs-mcp
Any other MCP client can launch the same server with this standard config:
{
"mcpServers": {
"agentdocs": {
"command": "npx",
"args": ["-y", "agentdocs-mcp"],
"env": { "AGENTDOCS_TOKEN": "<your-token>" }
}
}
}github.com/hoornet/agentdocs-mcp · npmjs.com/package/agentdocs-mcp
The Agent-Friendly Raw Endpoint
The raw endpoint is the recommended way to give AI agents access to your documentation. It returns pure Markdown text with YAML frontmatter — no HTML, no JSON wrapping, no authentication required.
GET /api/shared/{token}/rawResponse Format
The response is plain text (Content-Type: text/markdown; charset=utf-8) with the following structure:
--- title: Deployment Guide shared_via: AgentDocs last_updated: 2025-01-15T10:30:00.000Z --- # Deployment Guide This guide covers how to deploy the application to production. ## Prerequisites - Docker 20.10+ - Kubernetes 1.25+ - Access to the container registry ## Steps 1. Build the container image: ```bash docker build -t myapp:latest . ``` 2. Push to the registry: ```bash docker push registry.example.com/myapp:latest ``` 3. Apply the Kubernetes manifests: ```bash kubectl apply -f k8s/ ```
YAML Frontmatter Fields
| Field | Type | Description |
|---|---|---|
| title | string | The page title as set by the author |
| shared_via | string | Always "AgentDocs" — useful for source attribution |
| last_updated | ISO 8601 | When the page was last modified |
ℹ️ No authentication required. The share token in the URL is all that's needed. This makes it trivial to paste the URL into an agent's system prompt, tool definition, or configuration file.
Getting the Agent Link
The easiest way to get an agent-friendly URL:
Create a share link
Right-click a page in the sidebar and select "Share", or use the share button in the editor toolbar.
Click the 🤖 "Copy agent link" button
In the share dialog, you'll see a robot icon button next to the standard copy button. Click it to copy the /api/shared/:token/raw URL to your clipboard.
Paste into your agent's config
Use the URL in your agent's system prompt, tool definition, MCP server config, or wherever it needs to access documentation.
Example: Fetching from the Command Line
# Fetch the raw markdown for a shared page curl https://agentdocs.eu/api/shared/abc123def456.../raw # Response: # --- # title: Deployment Guide # shared_via: AgentDocs # last_updated: 2025-01-15T10:30:00.000Z # --- # # # Deployment Guide # ... # You can also pipe it directly to other tools: curl -s https://agentdocs.eu/api/shared/abc123.../raw | head -20
Practical Examples
Feeding Docs to Claude / ChatGPT
You can include an AgentDocs raw URL in your AI assistant's system prompt or tool definition to give it access to always-up-to-date documentation:
# In a system prompt or instruction set: You have access to our deployment documentation. Fetch the latest version from: https://agentdocs.eu/api/shared/abc123def456/raw Use this documentation to answer questions about deployment procedures, troubleshooting, and configuration.
Using in MCP Tool Definitions
If your agent framework supports tools/functions, you can define a tool that fetches doc pages:
{
"name": "get_deployment_docs",
"description": "Fetch the latest deployment documentation from AgentDocs",
"parameters": {},
"implementation": {
"type": "http",
"method": "GET",
"url": "https://agentdocs.eu/api/shared/abc123def456/raw"
}
}CI/CD Pipeline Integration
Pull documentation into your build pipelines, test suites, or deployment scripts:
# GitHub Actions example
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Fetch deployment runbook
run: |
curl -s https://agentdocs.eu/api/shared/abc123.../raw \
> docs/runbook.md
- name: Validate against runbook
run: |
# Parse the markdown and check deployment prerequisites
python scripts/validate_deployment.py docs/runbook.mdPython Script Example
import requests
def fetch_agentdocs_page(share_token: str) -> dict:
"""Fetch a page from AgentDocs and parse the frontmatter."""
url = f"https://agentdocs.eu/api/shared/{share_token}/raw"
response = requests.get(url)
response.raise_for_status()
text = response.text
# Parse YAML frontmatter
if text.startswith("---"):
parts = text.split("---", 2)
import yaml
metadata = yaml.safe_load(parts[1])
content = parts[2].strip()
return {"metadata": metadata, "content": content}
return {"metadata": {}, "content": text}
# Usage:
page = fetch_agentdocs_page("abc123def456")
print(f"Title: {page['metadata']['title']}")
print(f"Updated: {page['metadata']['last_updated']}")
print(f"Content length: {len(page['content'])} chars")Full API Access with API Tokens
If your agent needs to create, update, or delete pages (not just read them), it needs an API token for authenticated access to the full REST API.
Read vs. Write access:
- Read-only → Use share links + raw endpoint (no auth needed)
- Read + Write → Use API token with
Authorization: Token <api_token>
# Authenticate with an API token
curl https://agentdocs.eu/api/workspaces \
-H "Authorization: Token your_api_token_here"
# Create a page programmatically
curl -X POST https://agentdocs.eu/api/spaces/SPACE_ID/pages \
-H "Authorization: Token your_api_token_here" \
-H "Content-Type: application/json" \
-d '{
"title": "Auto-generated Changelog",
"slug": "changelog-2025-01-15",
"content": "# Changelog\n\n## v2.1.0\n- Added new feature X\n- Fixed bug Y"
}'
# Update an existing page
curl -X PUT https://agentdocs.eu/api/pages/PAGE_ID \
-H "Authorization: Token your_api_token_here" \
-H "Content-Type: application/json" \
-d '{"content": "# Updated content..."}'Learn how to get your API token in the API Authentication guide.
Webhook Notifications
Instead of polling for changes, configure webhooks to get notified instantly when documentation changes. This is ideal for agents that need to stay in sync with the latest docs.
# When a page is updated, your webhook receives:
{
"event": "page.updated",
"timestamp": "2025-01-15T10:30:00.000Z",
"workspace_id": "...",
"data": {
"page_id": "...",
"title": "Deployment Guide",
"space_id": "...",
"updated_by": "alice@example.com"
}
}Your agent can receive the webhook, then fetch the latest content via the raw endpoint or API. Read more in the Webhooks guide.
Integration Summary
| Use Case | Method | Auth |
|---|---|---|
| Agent reads a doc page | GET /api/shared/:token/raw | None (share token) |
| Agent creates/updates pages | POST/PUT /api/pages/... | API Token |
| Agent lists workspaces/spaces | GET /api/workspaces/... | API Token |
| Agent gets notified of changes | Webhook POST to your URL | HMAC signature |
Agent Skill Files
AgentDocs ships with ready-made skill files that let your agent discover and use the full API instantly — no manual configuration needed.
/llms.txt — Quick Start
Point any AI agent at this URL. 60-line overview with auth instructions, key endpoints, and a link to the full reference. Follows the emerging llms.txt standard.
curl https://agentdocs.eu/llms.txt
/llms-full.txt — Complete API Reference
Every endpoint, every field, with request/response examples. 500+ lines covering auth, workspaces, spaces, pages, share links, comments, webhooks, members, search, Socket.IO, and more.
curl https://agentdocs.eu/llms-full.txt
/agentdocs-skill.md — Claude Custom Skill
Download this file and upload it to Claude as a custom skill. Claude will automatically know how to read, create, update, search, and share your docs. Drag, drop, done.
How to use: In Claude, go to Skills → Upload Skill → drag in the agentdocs-skill.md file. Then just ask Claude to work with your docs.
Also works in Claude Code — install instructions are inside the file.
💡 Tip: These files are served as plain text with no authentication required. Any agent, LLM, or automation tool can fetch them with a simple HTTP GET.