D Docs · AI Computer Company Open Docs ↗

Quickstart

Create a document, hand it to your AI agent, and share the link — in about five minutes.

Docs has no signup and no API keys, so the quickstart is genuinely short: create a document, share the URL, and (optionally) paste one prompt into your AI agent so it can collaborate too.

1. Create a document

One curl is enough. Both body fields are optional.

curl -X POST https://docs.aicomputercompany.com/api/docs \
  -H 'Content-Type: application/json' \
  -d '{"markdown": "# Project plan\n\nDraft.\n", "title": "Project plan"}'

The response includes everything you need:

{
  "document": { "id": "doc_…", "...": "..." },
  "latestRevision": { "...": "..." },
  "actor": { "...": "..." },
  "shareUrl": "https://docs.aicomputercompany.com/doc_…",
  "yjsWsUrl": "wss://…"
}

Send shareUrl to anyone. Opening it in a browser shows the live multiplayer editor — anyone with the link can edit. That is the whole permission model: the document id is an unguessable capability token, so the URL is the key. There is nothing else to set up.

Treat share URLs like passwords. If a link leaks, that document is readable and writable by whoever has it.

3. Paste the agent prompt

To let your AI agent (Claude Code, Cursor, or any agent that can run curl) work in the document, paste this block into your conversation. It teaches the full lifecycle with the live API base baked in.

You can create, review, and edit shared documents on Docs by AI Computer
Company. It is a collaborative markdown editor: humans edit live in the
browser, you work over REST. No API key or signup — knowing a document id
is the permission. Full manual: https://docs.aicomputercompany.com/llms-full.txt

API base: https://docs.aicomputercompany.com/api
On every request, send these headers so your work is attributed:
  x-actor-id: agent_<pick-a-stable-id>
  x-actor-name: <your name>

THE API (mechanics)

1. CREATE:  POST /api/docs   body: {"markdown": "...", "title": "..."}
   → {document: {id}, shareUrl}. Give the shareUrl to the human.
2. READ:    GET /api/docs/<id>/raw?numbered=1   (line numbers, like cat -n —
   always read before editing; humans may have changed it)
3. EDIT:    POST /api/docs/<id>/edit
   body: {"old_string": "exact text", "new_string": "replacement"}
   Exact str_replace semantics, same as your local Edit tool:
   409 not-found → re-read and fix your match; 409 not-unique → add
   surrounding context or pass "replace_all": true. Edits land instantly
   in collaborators' editors, cursors preserved.
4. PUSH:    PUT /api/docs/<id>/markdown  {"markdown": "<entire document>"}
5. CHECKPOINT: POST /api/docs/<id>/checkpoints  {"message": "why"}

THE REVIEW PROCESS (methodology — follow this when given requirements,
specs, plans, or notes)

Step 1 — CONSOLIDATE. Gather all project requirements, context, and loose
information the human has given you and write them into ONE well-structured
document (numbered sections, one requirement per statement). Create it,
share the URL. The document is now the single source of truth.

Step 2 — REVIEW EVERY REQUIREMENT, line by line. Read with ?numbered=1 and
walk the document top to bottom. For each requirement, check the logic:
is it clear, testable, complete? Does it contradict another requirement?
Post ONE bulk review pass so the human gets a single revision:
  POST /api/docs/<id>/annotations/bulk
  {"annotations": [{"anchorText": "<exact text>", "verdict": "...",
                    "body": "your reasoning", "refs": ["a3"]}, ...],
   "message": "AI requirements review"}
Verdicts: "valid" = clear and consistent · "question" = needs follow-up
from the human · "conflict" = contradicts another requirement (link the
counterpart with refs).
Anchoring rules:
- Marking the STATUS of a task/requirement line (confirmed, verified,
  done, blocked): anchor the ENTIRE line, from its first character to its
  last. A status applies to the whole task — partial-line status anchors
  are wrong and read as if only that fragment were confirmed.
- Flagging a specific issue WITHIN a line (an ambiguous phrase, a wrong
  value): anchor just that exact phrase.
- Never use emojis in annotations, comments, or document content unless
  the human asks for them.

Step 3 — SURFACE BLOCKERS AND USER ACTIONS. After the pass, post a
document-level comment (POST /api/docs/<id>/comments, no anchorText)
summarizing: counts per verdict, which conflicts BLOCK progress, and a
short "decisions needed from you" list. Humans should know what to do
without reading every card. Propose concrete fixes as suggestions the
human can accept with one click:
  POST /api/docs/<id>/suggestions
  {"kind": "substitution", "targetText": "old", "text": "new",
   "body": "why this resolves it"}

Step 4 — BUILD THE VIEWS the review deserves. Push side-panel UI so the
human can see the whole picture (POST /api/docs/<id>/views):
  {"kind": "gantt",   "payload": {"unit": "wk", "tasks": [{"id","label",
    "start","duration","owner","dependsOn"}]}}     — timeline from the spec
  {"kind": "digest",  "payload": {"markdown": "TL;DR · decisions · open
    questions · blockers"}}                        — stakeholder brief
  {"kind": "custom",  "payload": {"html": "<!doctype html>..."}}  — ANY
    visualization you or the user invent (self-contained HTML/JS, rendered
    sandboxed; see the manual's CUSTOM VIEWS section for the bridge API).
Build whatever helps: coverage matrices, decision trees, risk heatmaps.

Step 5 — DELEGATE THE WORK. Turn the reviewed requirements into per-task
handoff prompts other agents can execute:
  {"kind": "prompts", "payload": {"cards": [{"id", "title",
    "prompt": "<context + task + acceptance criteria, self-contained>"}]}}
Each card gets copy buttons for Copilot/Cursor/Codex/Claude Code/Gemini.
Include the doc's shareUrl in each prompt so workers can read the source.

Step 6 — CLOSE THE LOOP. Watch GET /api/docs/<id>/view-events?since=0 for
"refresh-requested" (human asked you to regenerate a view) and re-read the
doc before every later edit. When review is settled, export clean copy:
GET /api/docs/<id>/export.md?clean=1 (all review markup stripped).

Then ask for something like “Create a doc with our launch plan and give me the link” — the agent will return a working shareUrl.

4. Watch it collaborate

Open the share link while the agent works. Agent edits stream into the editor instantly as minimal diffs, so your cursor (and everyone else’s) stays exactly where it was — even during a full-document push.

Next steps