> ## Documentation Index
> Fetch the complete documentation index at: https://docs.checkfu.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Checkfu is open source (https://github.com/checkfu/checkfu) and runs in the reader's own Cloudflare account. There is no shared hosted base URL: `checkfu deploy` prints the deployment's API URL (`https://<api-worker>.workers.dev` or the CHECKFU_API_DOMAIN hostname, exported as `CHECKFU_BASE_URL` for the CLI, SDK, and curl) and MCP URL (`.../mcp`). Local development serves the API on http://localhost:1337 and MCP on http://localhost:1338/mcp.
> Authenticated HTTP requests send the deployment's CHECKFU_API_KEY as `Authorization: Bearer $CHECKFU_API_KEY` (or `x-api-key`) and `Content-Type: application/json` for JSON bodies. Pass `Idempotency-Key` on retriable writes.
> Core workflow: create an Agent (`POST /v1/agents`) and an Environment (`POST /v1/environments`), create a Session that references both (`POST /v1/sessions`), send a `user.message` event (`POST /v1/sessions/{session_id}/events`), and follow `GET /v1/sessions/{session_id}/events/stream` until `session.status_idle`.
> Other resources: Memory stores (`/v1/memory_stores`), Files (`/v1/files`), Artifacts (`/v1/artifacts`), Vaults and credentials (`/v1/vaults`), Provider credentials (`/v1/provider_credentials`), Automations (`/v1/automations`), Inbound bindings (`/v1/inbound_bindings`), and Webhooks (`/v1/webhooks`). The deployment serves its OpenAPI 3.1 specification at `GET /openapi.json`.

# Architecture

> The Workers, Durable Objects, and storage a Checkfu deployment creates in your Cloudflare account.

A deployment creates seven Workers. All API traffic goes through `ApiWorker`, which the other public Workers call over service bindings (`ContentWorker` also reads artifact bytes directly from R2).

| Worker | Role |
| :- | :- |
| `ApiWorker` | Serves `/v1/*`, `/openapi.json`, and `/schemas/apply/*`, checks the API key, and hosts resource records, Files, Artifacts, and webhook delivery. |
| `McpWorker` | Serves the MCP server at `/mcp`. |
| `App` | Serves the [Dashboard](https://docs.checkfu.com/dashboard.md) and forwards signed-in browser requests to `ApiWorker` with the deployment's API key. |
| `ContentWorker` | Serves Artifact viewing links and published sites. |
| `PiHarnessWorker` | Runs Pi turns and hosts the workspace service and Vault connections used by every harness. Private service binding. |
| `AlternateHarnessWorker` | Runs DeepSeek and OpenCode in Durable Objects, Codex App Server and the Claude Agent SDK in containers, and custom harnesses over HTTP. Private service binding. |
| `CodemodeSandboxWorker` | Runs `codemode` JavaScript scripts in QuickJS. No public address. |

The API routes each turn using the Session's pinned Agent version. Both runtime Workers use the same workspace service. A Session starts its Linux workspace container when it needs filesystem or shell access. `PiHarnessWorker` proxies the workspace container's HTTP and HTTPS traffic under the [Environment](https://docs.checkfu.com/concepts/environments.md)'s networking policy.

Codex and Claude Code use an additional container for the native SDK process. The process sees the admitted tool catalog and sends model requests through `AlternateHarnessWorker`. Checkfu holds the provider credentials and executes tool calls through its workspace and Vault services.

## Where data lives

| Data | Storage |
| :- | :- |
| Resource records and history | Durable Objects on `ApiWorker` |
| Artifact data collections | `ArtifactDataObjects` Durable Objects on `ApiWorker` |
| List endpoints | D1 |
| File and Artifact bytes | R2 |
| Conversation and turn state | `PiSession` on `PiHarnessWorker` or `DurableHarnessSession` on `AlternateHarnessWorker` |
| Session workspace files | `SessionWorkspace` Durable Objects and their attached workspaces (`PiHarnessWorker`) |
| Vault credentials | `Connection` Durable Objects, one per Vault (`PiHarnessWorker`) |
| Webhook deliveries | `WebhookFanout` and `WebhookDeliverer` Durable Objects (`ApiWorker`) |

Checkfu stores the listed data in your Cloudflare account using [`CHECKFU_JURISDICTION`](https://docs.checkfu.com/self-hosting/configuration#jurisdiction). Running `checkfu destroy --stage <name>` deletes those deployment resources.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.