# Hecaton developer documentation

Drive workspaces from a script, a CI pipeline or the agent on your computer.

## Get started

1. In Hecaton, add the repository as a project and note its project ID. The [CLI](cli.md) can list the projects you can access.
2. On your computer, use the [local agent guide](local-agent.md) to sign in through your browser. For unattended jobs, create a project-scoped [API token](tokens.md) and store it as a secret.
3. Choose the [CLI](cli.md), the [TypeScript SDK](sdk.md) or direct requests to `https://api.hecaton.io/v1`. The [REST API reference](api.md) lists the operations and links to the OpenAPI contract.

## Integration guides

- [GitHub Actions](github-actions.md) — start a workspace on a pull request branch and wait for its result.
- [GitLab CI](gitlab-ci.md) — do the same from a trusted merge request pipeline.
- [Local agent](local-agent.md) — delegate from the CLI or connect the public MCP server.
- [Webhooks](webhooks.md) — verify a delivery signature before processing the event.

## REST conventions

- Send `Authorization: Bearer <token>` on every authenticated request. `GET /v1/openapi.json` is public.
- List responses use an opaque `nextCursor`. Pass it back as `cursor` while it is present. Use `limit` from 1 to 100 (20 by default).
- For endpoints that require `Idempotency-Key`, send one key per operation. Retry with the same key and payload for 24 hours. Reusing the key with a different request returns 409 `idempotency_key_reused`.
- Errors use `{ error: { code, message, details }, requestId }`. Keep the request ID for support. When a request is rate limited (429), check `Retry-After`, `RateLimit` and `RateLimit-Policy`. Each token can make 600 reads, 60 writes and 10 workspace creations per minute, with up to 5 open streams.
- To resume a workspace event stream, send its last processed event ID as `Last-Event-ID`. Retained events expire after 24 hours. When the API returns 410 `event_cursor_expired`, read the current workspace and turn state before resuming the stream.

[Agent index](/llms.txt)
