Clatter LabsHelp Center

How do I use the Agent API in a CI pipeline?

How-toUpdated
  1. Secrets: store CLATTER_API_KEY (a key with runs:write and runs:read) and CLATTER_ACCOUNT_ID as encrypted CI secrets.
  2. Start a run with POST /v1/runs. Put the build id in metadata, e.g. {"ci_build": "1234"}.
  3. Wait: stream events, or poll GET /v1/runs/{id} every few seconds.
  4. Check the result: fail the job if status is failed; publish output and files as job artefacts.
  5. Handle limits: back off on 429; stop on 402.

Review agent changes before merging, the same as any pull request.

Learn more#

Related articles

Still need help?

Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyz
For deleting your whole account or the data of one service.