---
title: "PUT /projects/{projectId}/agent-automations/{automationId}"
method: PUT
path: "/projects/{projectId}/agent-automations/{automationId}"
---

# PUT /projects/{projectId}/agent-automations/{automationId}

`PUT /projects/{projectId}/agent-automations/{automationId}`

## Request

- Base URL: `https://api.caveman.so/api/v1`
- URL: `https://api.caveman.so/api/v1/projects/{projectId}/agent-automations/{automationId}`
- Auth: one of:
  - OAuth 2
    - Authorization code: `/api/v1/oauth/authorize`
    - Token URL: `/api/v1/oauth/token` scopes: `autopilot:manage`
  - HTTP bearer
  - API key in cookie `cave_access`
  - API key in cookie `__Secure-cave_identity.session_token`

PUT /api/v1/projects/{projectId}/agent-automations/{automationId} on the Caveman Cloud control plane. Requires the autopilot:manage scope. Not exposed to autonomous agents: Native user control of standing automation: which sources may open repair cases, under which repository scope and publication rule, owned by the caller. Workload credentials and scoped agent connections cannot configure, resume or pause automations. Native user endpoint. Scoped agent sessions and workload credentials cannot call this operation. Organization budget edits additionally require billing:write. Interactive grants bind current membership and role; input, audit, run and outbox admission commit atomically. Reuse the same request identity, input and deadline on retries.

## Request body

- AgentAutomationConfiguration
  - `expected_revision` integer, required: Zero creates. An edit needs the current revision, makes the caller the owner, resumes a paused automation and fences its older runs.
  - `origins` string[], required
  - `max_run_seconds` integer, required
  - `repository` AgentRepositoryReadScope
    - `binding_id` string, uuid, required
    - `read_prefixes` string[], required: Literal path prefixes. An explicit empty string grants the whole repository; an empty list grants nothing. No glob expansion.
    - `publication` AgentRepositoryPublicationScope
      - `target_branch` string
      - `source_pull_requests` boolean, required
      - `write_prefixes` string[], required: Literal prefixes within repository read scope; protected paths remain denied.
      - `allow_static_drafts` boolean, required: Explicit permission for drafts disclosing static-only assessment. Does not imply execution, passing checks or merge readiness.
  - `production_every_seconds` union: Production telemetry check cadence. Requires a trace, monitor or deployment origin. Zero disables checks.
    - unknown
    - integer
  - `scan_every_seconds` union: Repository scan cadence. Omitted or zero disables scans. Requires the scan origin and a repository.
    - unknown
    - integer

## Response `200`

Native operation persisted.

- AgentAutomationReceipt
  - `id` string, uuid, required
  - `revision` integer, required
  - `owner_user_id` string, uuid, required

## Other responses

- `400`: Invalid or missing explicit configuration/input.
- `401`: Authentication required.
- `403`: Native user lacks authority.
- `404`: Requested resource or current authority unavailable.
- `409`: Revision/input conflict or budget unavailable.
- `503`: Shared agent execution unavailable.
- `4XX`: Structured failure. `error.code` is stable; `error.request_id` is echoed in the x-cave-request-id header.
- `5XX`: Structured failure. `error.code` is stable; `error.request_id` is echoed in the x-cave-request-id header.

---

[API](https://skmtc.dev/caveman/apis/caveman-cloud-api.md) - [All operations](https://skmtc.dev/caveman/apis/caveman-cloud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/caveman/apis/caveman-cloud-api/revisions/508312d01cfc?raw)
