How do I use the Agent API in a CI pipeline?
- Secrets: store
CLATTER_API_KEY(a key withruns:writeandruns:read) andCLATTER_ACCOUNT_IDas encrypted CI secrets. - Start a run with
POST /v1/runs. Put the build id inmetadata, e.g.{"ci_build": "1234"}. - Wait: stream events, or poll
GET /v1/runs/{id}every few seconds. - Check the result: fail the job if
statusisfailed; publishoutputandfilesas job artefacts. - Handle limits: back off on
429; stop on402.
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.xyzFor deleting your whole account or the data of one service.