Overview
The shape of the Dock document workspace API. Three access layers, eight capability areas, two writing modes, and the SKILL.md knowledge layer your agent reads before it writes.
Dock gives an agent a real document workspace it can drive end to end: create a draft, write into it, cite sources, keep a version history, and publish to a public URL. The same workspace is reachable three ways, so you pick the layer that fits the runtime you already run instead of learning a new product.
| Layer | Surface | Count | Use it from |
|---|---|---|---|
| REST API | /api/d/* | 36 routes | Any language or backend that can make an HTTP request |
| CLI | agentdock | 46 commands | Terminals, shell scripts, CI/CD |
| MCP server | /api/mcp | 38 tools | Claude Code, Cursor, any MCP client |
All three reach the same documents, citations, versions, folders, and publishing pipeline. They are three doors into the same rooms, not three separate products. A document an agent creates over MCP is the same one you can read over REST and publish from the CLI.
The workspace is organized into eight areas. Operation counts below are the MCP tool counts; the REST and CLI surfaces cover the same ground with a few extra conveniences (a title-only update, a citation search).
| Area | Ops | What an agent can do |
|---|---|---|
| Documents | 8 | List, create, read, write, delete, duplicate, move, and import a web page as an editable document |
| Publishing | 2 | Publish to a public /p/slug page with SEO metadata, or unpublish back to a private draft |
| Suggestions | 4 | Propose tracked changes, list what is pending, then accept or reject each one |
| Folders | 4 | List, create, rename, and delete folders to keep a growing set of documents organized |
| Versions | 2 | Read the full history and open any past snapshot, each tagged human or agent |
| Citations | 15 | Add sources by DOI, URL, PMID, or arXiv ID, format them in seven styles, and reuse them from a library and collections |
| Prompts | 2 | Reach the personal and system prompt library so an agent can pull a saved prompt |
| Settings | 1 | Set the citation style per document |
An agent picks how a change lands:
- Direct write applies the change and records a version. Use it when the agent should just write.
- Suggest proposes the change as a tracked suggestion. The server computes the diff, and a person reviews it as tracked changes to accept or reject. Use it when a human should approve agent edits before they land, for example on anything client-facing.
# Direct write: lands the change, records a version
agentdock docs write abc123 draft.md
# Suggest: proposes a tracked change for review
agentdock docs suggest abc123 "data shows" "evidence demonstrates"Both modes are covered in detail in Writing Modes.
Every workspace ships a SKILL.md the agent reads before it writes a word: the constraints, the house style, the document templates, and what counts as ready to publish. So the agent is not guessing your conventions on the first call, it is working from them. This is the layer a raw "store some markdown" API does not have, and it is the difference between output you have to rewrite and output that already fits.
| Page | Read it for |
|---|---|
| Getting Started | Zero to your first published page in about five minutes |
| Authentication | Token types, scopes, and how to create a key |
| REST API Reference | Every route, parameter, and response |
| CLI Reference | Every command, plus interactive vs JSON output |
| MCP Server Setup | Drop the workspace into Claude Code or Cursor |
| Examples and Workflows | End-to-end recipes for agents, CI, and pipelines |