# Build with a coding agent

> Point Claude Code, Cursor, Codex, or another coding agent at Koil's machine-readable docs and OpenAPI document, and let it integrate end to end in sandbox mode.

Koil's docs and contract are published in forms a coding agent reads directly, and [sandbox mode](https://docs.koil.co/sandbox) runs the whole API with no app, so an agent can write an integration and run it against real responses before your app is approved.

## What to give the agent

-   **[`llms.txt`](https://docs.koil.co/llms.txt)**: every docs page and endpoint, one line each, linking to its markdown copy.
-   **Markdown copies**: every page is also served as markdown at its path plus `.md`, such as [`/quickstart.md`](https://docs.koil.co/quickstart.md).
-   **[`openapi.json`](https://docs.koil.co/openapi.json)**: the OpenAPI 3.1 document that types every request, response, error, and event. [openapi-typescript](https://openapi-ts.dev/) is the generator verified against it; Koil publishes no SDK.
-   **A sandbox key** (`koil_sandbox_…`) from the [admin console](https://admin.koil.co/), kept in an environment variable rather than in the prompt.

Koil publishes no MCP server: the API and these documents are the whole interface.

## A prompt to start from

```text
Integrate Koil (https://docs.koil.co) into this codebase.
Read https://docs.koil.co/llms.txt first, then the markdown copy of each page you need.
Type every request and event from https://docs.koil.co/openapi.json.
Use the sandbox key in KOIL_API_KEY and the magic connections listed at
https://docs.koil.co/sandbox.md. Never call a live key.
Goal: <what your product should do, e.g. receive Instagram and Facebook comments and DMs
for each customer's Profile and reply from our inbox>.
Verify each step against the sandbox before moving on.
```

## What the agent can verify in sandbox mode

-   Listing a magic connection's eligible profiles and creating Profiles from them.
-   Publishing and replying, with the final status of every item and the typed errors of an [expired or under-scoped credential](https://docs.koil.co/sandbox#magic-connections).
-   Receiving lifecycle events at an Event Destination, and [verifying their signatures](https://docs.koil.co/guides/verify-webhooks).

The connect flow and importing existing grants need your own app, so run those against live mode once it is approved ([Bring your own app](https://docs.koil.co/byo-apps)).
