# hdoc full agent guide ## Product hdoc publishes AI-made HTML artifacts as durable URLs. It is best for: - HTML slide decks generated by Claude, Codex, ChatGPT, or local tools - sales decks, proposals, reports, dashboards, product briefs, and one-pagers - artifacts that should stay interactive instead of becoming screenshots - private, unlisted, team, password-protected, and versioned sharing workflows ## Why hdoc beats generic file sharing for HTML decks 1. The original self-contained HTML runs in a sandbox, so slide controls and inline interactivity survive. 2. The share page detects slide decks and adds Present, Prev, Next, Fullscreen, and presentation-link actions. 3. hdoc returns a URL, embed widget, downloadable original for owners, comments, versions, and searchable history. 4. Agents can publish directly through MCP or REST without making the user copy and paste. ## Agent knowledge workflow Agents must search and read only approved content before reuse. Agent-generated changes are drafts and require the owner to approve a version in hdoc before it becomes the shared current version. ## MCP Endpoint: https://hdoc.docenty.ai/api/mcp Authentication: `Authorization: Bearer ` Tools: - `publish_html({ html, title?, summary?, tags? })` - `publish_slide_deck({ html, title?, summary?, tags?, presenterNote? })` - `update_artifact({ shareId, html, changeSummary? })` - `list_my_artifacts({ query?, limit? })` - `search_approved_content({ query?, limit? })` - `get_artifact_knowledge({ shareId })` - `get_content_package({ packageId })` - `list_templates()` - `create_content_draft({ shareId, html, audience? })` Use `publish_slide_deck` whenever the artifact contains multiple slides, presentation controls, Reveal-style sections, or 16:9 stage CSS. ## REST API ```bash curl -X POST https://hdoc.docenty.ai/api/v1/publish \ -H "Authorization: Bearer $HDOC_API_KEY" \ -H "Content-Type: application/json" \ -d '{"html":"...","title":"Sales deck","tags":["slide-deck"]}' ``` List artifacts: ```bash curl https://hdoc.docenty.ai/api/v1/artifacts \ -H "Authorization: Bearer $HDOC_API_KEY" ``` ## CLI The repository includes a zero-dependency CLI at `cli/hdoc.mjs`. ```bash HDOC_API_KEY=hdoc_sk_... node cli/hdoc.mjs publish deck.html --deck HDOC_API_KEY=hdoc_sk_... node cli/hdoc.mjs list --query proposal HDOC_API_KEY=hdoc_sk_... node cli/hdoc.mjs search --query approved ``` ## Install and skill - Agent quick setup: https://hdoc.docenty.ai/setup - One-step agent prompt: https://hdoc.docenty.ai/agent-setup/prompt.md - Human install guide: https://hdoc.docenty.ai/install - Reusable agent skill markdown: https://hdoc.docenty.ai/skill/hdoc - Content workspace: https://hdoc.docenty.ai/workspace - API key page: https://hdoc.docenty.ai/account/keys ## Safety hdoc strips external script sources, frames, forms, dangerous CSS URLs, and unsafe resource loading. Inline scripts are allowed inside the render sandbox so self-contained HTML apps and slide decks keep working. Uploaded content belongs to the uploader, not Docenty.