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

> ## Agent Instructions
> Use a clmt_test_ key while developing. It never touches live data. Send a UUID Idempotency-Key on every POST, PUT and DELETE, generated once per operation and reused on retries. Pin Clemta-Version: 2026-08-13 on every request. Branch on the error code field, never on detail. Retry only timeouts, 5xx and 429, and honor Retry-After. Test companies never advance on their own. Drive them with POST /sandbox/companies/{id}/simulate. OpenAPI: https://api.clemta.com/v1/openapi.json. Skills: npx skills add https://docs.clemta.com. Docs search MCP: https://docs.clemta.com/mcp. Guide: https://docs.clemta.com/partner/ai-agents.md.

# Build with an AI agent

> Let a coding agent write the integration, and let your team ask an agent about the companies behind it.

Agents help on two sides of the Partner API. A coding agent writes and debugs
the integration, if it has the contract. Everything below hands it over, and
none of it needs a key. Once companies are in Clemta, your team can ask an
agent about them instead of opening a dashboard. That part is at the
[end of this page](#not-just-for-code).

## Skills

Two skills cover the Partner API. Each is a Markdown file an agent loads
when the task matches its description, and each names the other.

| Skill                       | Covers                                                                                                                                                            |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `clemta-partner-quickstart` | Creating companies, ordering services, handling requirements, reading events. Includes the request rules: auth, idempotency, versioning, errors, and the sandbox. |
| `clemta-partner-webhooks`   | Writing or debugging a webhook handler: tunnel, simulate, verify, reconcile by polling.                                                                           |

Install both:

```bash theme={null}
npx skills add https://docs.clemta.com
```

## Docs search

A search server for these docs runs at `https://docs.clemta.com/mcp`. Connect
it and the agent looks things up here as it works. It searches the docs and
does not call the API.

<CodeGroup>
  ```bash Claude Code theme={null}
  claude mcp add --transport http clemta-docs https://docs.clemta.com/mcp
  ```

  ```json Cursor (.cursor/mcp.json) theme={null}
  {
    "mcpServers": {
      "clemta-docs": { "url": "https://docs.clemta.com/mcp" }
    }
  }
  ```

  ```json VS Code (.vscode/mcp.json) theme={null}
  {
    "servers": {
      "clemta-docs": { "type": "http", "url": "https://docs.clemta.com/mcp" }
    }
  }
  ```
</CodeGroup>

The **Connect** entries in the menu at the top of every page do the same in
one click.

## Markdown, llms.txt, and the spec

* Add `.md` to any page URL for its Markdown:
  `https://docs.clemta.com/partner/webhooks.md`.
* [`/llms.txt`](https://docs.clemta.com/llms.txt) lists every page.
  [`/llms-full.txt`](https://docs.clemta.com/llms-full.txt) is the whole site
  in one file.
* The OpenAPI description is served from the API without a key:
  `https://api.clemta.com/v1/openapi.json`. See
  [OpenAPI specs](/partner/openapi-specs) for the dated URLs.

Any of these can go in a `CLAUDE.md`, `AGENTS.md`, or `.cursorrules` file.

## A starting prompt

With a skill or the docs server connected:

```text theme={null}
Integrate the Clemta Partner API. Use my clmt_test_ key from CLEMTA_API_KEY.
Create a company for a customer, expose a webhook handler that verifies
signatures, and move the test company to active with the sandbox so I can see
company.incorporated arrive.
```

## When an agent holds a key

* The key sets the mode. A `clmt_test_` key never reaches live objects, and
  `/sandbox/*` refuses live keys. Give an agent a live key only when it should
  act on real companies.
* Keep keys in an environment variable or the agent's secret store. Never put
  one in a prompt, a skill file, or a committed file.
* Send an `Idempotency-Key` on every write. An agent that retries a timed-out
  `POST /companies` without one forms two companies.
* When a request fails with `invalid_request`, the `errors` array names every
  field. Pass that list to the agent. A blind retry fails the same way.

## Not just for code

Once a company is in Clemta, your team can ask about it in plain words. An
operations lead connects Claude, Cursor, or any MCP client to the
[Clemta MCP server](/ai/clemta-mcp) with a Partner API key and asks: which
companies are waiting on a document, what stage an order is at, when a filing
is due. The answers come from the same objects your integration works with.
The server is in development.

## Where the skills come from

The skills are written from these guides and stay in step with them:
[Quickstart](/partner/quickstart), [How it fits together](/partner/concepts),
[Idempotency](/partner/idempotency), [Versioning](/partner/versioning),
[Errors](/partner/errors), [Webhooks](/partner/webhooks), and
[Local development](/partner/local-development).

For everything agent-related across Clemta, see [AI agents](/ai/introduction).
