AgentDock

1.7k
Docs
Agent API

Agent API

Reference and how-to guides for the Dock document workspace API. Let your agents create, edit, cite, and publish real documents over REST, a CLI, or an MCP server.

Dock is a document workspace your agents can drive programmatically. The same workspace a person opens in the editor is reachable three ways: a REST API, the agentdock CLI, and an MCP server. Pick the one that fits your runtime; they all reach the same documents, citations, versions, and publishing pipeline.

These pages are the reference. Start with the Overview to see the shape of the whole surface, then jump to Getting Started to go from zero to your first published page in about five minutes.

  • Real documents, not a text bucket. Behind the API is the full Dock editor: tracked changes, citations in seven academic styles, version history, and a path to publish.
  • Three access layers. 36 REST routes, 46 CLI commands, and 38 MCP tools over one workspace. Use whichever your agent already speaks.
  • Human review when you want it. An agent can write straight in, or propose a change as a tracked suggestion a person accepts or rejects.
  • A record of every edit. Each write creates a version tagged with who made it, a human or an agent, and which model.
  • A real publishing pipeline. A draft becomes a public /p/slug page with its own SEO metadata, not a JSON blob you have to host.

Aider

Use Aider with the Dock workspace. Aider does not speak MCP, so the integration runs through the CLI. Combine `aider` for code edits with `agentdock` for documents, citations, and publishing in the same terminal session.

Authentication

How to authenticate to the Dock workspace API. Three token types, four scopes, document-scoped tokens, and where to create a key.

Claude Code

Use Claude Code with the Dock workspace. MCP for documents, citations, suggestions, and publishing. CLI for login and one-shot commands. SKILL.md so the agent knows the house style before it writes.

CLI Reference

The agentdock CLI. 46 commands across documents, folders, citation library, and collections, with human-readable output for terminals and JSON for agents and CI.

Cline

Use Cline (the VS Code agent) with the Dock workspace. Add the MCP server in Cline's settings and the agent calls 38 AgentDock tools alongside its file edits.

Cursor

Use Cursor with the Dock workspace. Add the MCP server to `.cursor/mcp.json` and Cursor's agent can read, write, suggest, and publish documents. CLI works from the embedded terminal.

Examples and Workflows

End-to-end recipes for the Dock workspace API. An agent in Claude Code, an auto-publishing CI job, a research-to-publish pipeline, and a scheduled digest.

Getting Started

From zero to your first published document in about five minutes. Install the CLI, log in, create a draft, write into it, and publish it to a real URL.

MCP Server Setup

Add the Dock workspace to Claude Code, Cursor, or any MCP client. Streamable HTTP transport, 38 tools across eight categories, and the SKILL.md the agent reads first.

OpenAI Codex

Use OpenAI Codex with the Dock workspace. MCP server config goes in `~/.codex/config.toml`. Codex calls the same 38 tools Claude Code and Cursor see.

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.

REST API Reference

The 36 REST routes of the Dock document workspace API, grouped by capability area. Standard HTTP under /api/d/*, callable from any language.

Writing Modes

The two ways an agent changes a document. Direct write lands the edit and records a version; suggest mode proposes a tracked change a person reviews.