# Build with AI

> Point Claude Code, Cursor or any coding agent at the machine-readable docs, and let it drive the cere CLI.

Source: https://docs.compute.dev.ddcdragon.com/reference/build-with-ai/

These docs are published as plain Markdown too, so a coding agent can read the current API, flags and limits instead
of guessing them.

## Machine-readable files

The build generates them from the same Markdown as the pages you read here, so they never drift from the site:

| File | What it is | Use it when |
|---|---|---|
| [`/llms.txt`](https://docs.compute.dev.ddcdragon.com/llms.txt) | The index: every page with its one-line description and a link to its Markdown, grouped by sidebar section. | The agent should find what exists and fetch only what it needs. |
| `/<page>.md` | One page as Markdown. Append `.md` to a page's path, for example [`/reference/http-api.md`](https://docs.compute.dev.ddcdragon.com/reference/http-api.md). | The agent needs one page without navigation and markup. |
| `/llms/<section>.txt` | One sidebar section in one file, at most 100 KB each; a larger section is split into parts. `llms.txt` lists them with their URLs. | The agent needs a whole area, such as the guides or the reference. |
| [`/llms-full.txt`](https://docs.compute.dev.ddcdragon.com/llms-full.txt) | Every page in one file, in sidebar order. | The agent has a large context window and should load everything. |

Each page in these files starts with its title, its description and a `Source:` line with the page's URL, and its
links are absolute. They follow the [llms.txt convention](https://llmstxt.org/).

A request for a page that accepts `text/markdown` gets the page's Markdown at the page's own URL, so an agent that
asks for Markdown needs no `.md` suffix:

```sh
curl -s -H 'Accept: text/markdown' https://docs.compute.dev.ddcdragon.com/reference/http-api/ | head -3
```

```text
# HTTP API

> Every endpoint of the sandbox API, with its request, a real response, and its status and error codes.
```

Every page also has **Copy page** (its Markdown to your clipboard) and **View as Markdown** under its title.

## Use it in your coding agent

Give the agent the index and the task:

```text
Read https://docs.compute.dev.ddcdragon.com/llms.txt and fetch the pages you need.
Use the cere CLI or the cere Python SDK: run my tests in a python:3.12-slim sandbox
with a 600 s timeout, allow only pypi.org and files.pythonhosted.org, and terminate
the sandbox when you are done.
```

Give it the vocabulary up front: a **sandbox** is a gVisor container on a node of the cluster; your **bucket** pays
for it and holds your **secrets**; a sandbox reaches only the hosts its **egress rules** allow; an **agent** is a
definition plus an image, and each **run** is one sandbox.

## Let the agent drive the CLI

The `cere` CLI works without a person at the keyboard:

| What | How |
|---|---|
| Find the real flags | `cere --help`, `cere <command> --help`. Have the agent read them instead of recalling flags. |
| Machine-readable output | Add `--json` to any command: it prints the API's JSON instead of a table. |
| Failures | A failed command prints `error: <message>` on stderr and exits non-zero; `cere sandbox exec` exits with the command's own exit code. |
| Credentials | Sign in once with `cere login`, or set `CERE_TOKEN` to an access token (Developer Console > Access tokens), so no token appears in the agent's command lines. |
| Clean up | Give every sandbox a short `--timeout`, and end it with `cere sandbox terminate <id>`. `cere sandbox list --status running` shows what is still running. |

A sandbox the agent creates is billed to your bucket for as long as it runs, and it reaches only the hosts you allow.
See [Resources and billing](https://docs.compute.dev.ddcdragon.com/concepts/resources-and-billing/) and
[Egress and credentials](https://docs.compute.dev.ddcdragon.com/concepts/egress-and-credentials/).

## Related

- [Quickstart](https://docs.compute.dev.ddcdragon.com/quickstart/)
- [CLI](https://docs.compute.dev.ddcdragon.com/reference/cli/)
- [Python SDK](https://docs.compute.dev.ddcdragon.com/reference/python-sdk/)
- [HTTP API](https://docs.compute.dev.ddcdragon.com/reference/http-api/)
- [Signing in](https://docs.compute.dev.ddcdragon.com/guides/signing-in/)
