# Install Docket for your tenant

This is the canonical install procedure. Follow it in order. Everything needed
is on these public pages except the tenant token, which your Docket
administrator sends privately.

> **Durability notice:** When Docket runs with the Postgres case store
> (`DOCKET_CASE_STORE=postgres`), cases, facts, stage state, journals and
> explicit step events, recorded outcomes, idempotency replay records and
> queued jobs are stored in Postgres, so they survive deploys and restarts.
> Published process definitions are reinstalled from code at boot, and the
> per-process mirror-deduplication markers are not durable; losing the markers
> can cause a telemetry mirror retry, not case loss. With the in-memory fallback
> store (`DOCKET_CASE_STORE=memory`), cases and records are process-local and
> are lost on every deploy or restart, and idempotent replay holds only within
> one server process lifetime. Keep your own durable record of Docket case ids
> and pending intents outside Docket, and do not treat Docket alone as the
> system of record.

## Copy this to your agent

```text
Install Docket for this tenant by following the public procedure at
https://docket.cstmr.bot/install.

1. Get the tenant token from your Docket operator through the approved secret
   channel. Read https://docket.cstmr.bot/llms.txt and the linked pages, especially the
   concepts, connect, tokens, agent-instructions, adapter-outbox and errors
   pages.
2. Store the token in your secret store or an environment variable such as
   DOCKET_SMOKE_TOKEN. Never put it in a URL, command argument, log, trace,
   repository or chat message.
3. Configure the MCP connection to https://docket.cstmr.bot/v1/mcp/mcp with an
   Authorization: Bearer header, and carry out only the edges and outputs
   Docket returns.
4. Add the drop-in rules from https://docket.cstmr.bot/docs/agent-instructions.md to the
   instruction file your agent already reads, such as AGENTS.md, CLAUDE.md or
   your framework's system-prompt file. If none exists, create AGENTS.md. Keep
   your own durable case record. Use list_cases and get_case for live queue and
   detail reads; reads ignore idempotency keys. Never act on a needs_approval
   response, and report every completed host effect with record_outcome using
   kind effect. A drafted reply must pass awaiting-send-approval before you
   report it sent.
5. Download and run https://docket.cstmr.bot/docs/smoke_mcp.py with --e2e last. A 401 here
   means the token is missing, revoked or expired, or was issued for the wrong
   tenant. Stop and report the failure to the operator.
```

## The five steps

1. **Get the private token from your administrator.** There is no self-serve
   signup. Ask your Docket administrator to issue a tenant token and send it
   through an approved secret channel. The placeholder
   `dkt_EXAMPLE_NOT_A_REAL_TOKEN` is not a working credential. Start at
   `https://docket.cstmr.bot/docs` or `https://docket.cstmr.bot/llms.txt`; the connect page contains the
   live tool reference and the errors page contains the live status mapping.
2. **Store the token safely.** Keep it in an approved secret store or an
   environment variable such as `DOCKET_SMOKE_TOKEN`. Never put the token in a
   URL, command argument, log, trace, repository or chat message.
3. **Connect the agent.** Point the agent at `https://docket.cstmr.bot/v1/mcp/mcp`, send the
   token only in the `Authorization: Bearer` header, and use
   `https://docket.cstmr.bot/v1/mcp/tools` for the REST helper tool list.
4. **Install the operating rules and keep your own durable case record.** Copy
   the block from `https://docket.cstmr.bot/docs/agent-instructions.md` into the instruction
   file your agent already reads, such as `AGENTS.md`, `CLAUDE.md`, or your
   framework's system-prompt file. If none exists, create `AGENTS.md`. Call
   Docket for every decision, carry out exactly what it returns, stop for human
   approval, pass an idempotency key on writes, use `list_cases` and `get_case`
   for live reads, and record approved host effects only after they happen. A
   drafted reply waits at `awaiting-send-approval` until a human approves its
   exact draft hash.
5. **Run the smoke test last.** Save `https://docket.cstmr.bot/docs/smoke_mcp.py`, make sure
   the token is in your secret store or environment, and run
   `python smoke_mcp.py --e2e https://docket.cstmr.bot`. Require `smoke_mcp: PASS`, which
   checks health, tools/list, a process read, an idempotent case start and the
   allowed-next-step read. The test starts a throwaway case. A 401 here means the
   token is missing, revoked or expired, or was issued for the wrong tenant. Stop
   and report the failure to the operator.

Browse the [documentation index](https://docket.cstmr.bot/docs) or the
[llms.txt index](https://docket.cstmr.bot/llms.txt) whenever the agent needs the public
contract again.
