---
title: "Create a Cloud Agent"
method: POST
path: "/v2/agents"
tags: ["Cloud Agents"]
---

# Create a Cloud Agent

`POST /v2/agents`

## Request

- Base URL: `https://api.runta.com`
- URL: `https://api.runta.com/v2/agents`
- Auth: HTTP bearer

## Request body

- CreateCloudAgentRequest
  - `name` string
  - `system_prompt` string
  - `initial_message` string
  - `repositories` RuntimeRepositorySelection[]: Ordered GitHub repositories to initialize for fresh or checkpoint runtimes. The first is the default workspace. Nonempty selections are not allowed for existing runtimes.
    - `repository_id` integer, required
    - `branch` string, nullable
  - `model_provider` ManagedModelProviderReference, required
    - `type` 'managed', required
    - `id` string, required
  - `runtime` CloudAgentRuntimeReference
    - `type` 'fresh' | 'checkpoint' | 'existing', required
    - `image_id` string
    - `checkpoint_id` string
    - `id` string
  - `harness` CloudAgentHarnessRequest
    - `id` string
    - `kind` string

## Response `201`

Cloud Agent created.

- CloudAgent
  - `id` string, required
  - `runtime_id` string, required
  - `harness_id` string, required
  - `name` string, required
  - `status` string, required
  - `created_at_unix_seconds` integer, required
  - `updated_at_unix_seconds` integer, required
  - `latest_reply` CloudAgentLatestReply
    - `run_id` string, required
    - `text` string, required
    - `created_at` string, nullable, required
    - `updated_at` string, nullable, required

## Other responses

- `401`: Missing, malformed, or rejected bearer token
- `403`: The bearer token is not allowed to perform this action
- `404`: The requested resource was not found
- `409`: The request conflicts with current resource state
- `422`: Validation or application error
- `429`: Rate limit exceeded
- `501`: Operation is not implemented
- `503`: Upstream service is unavailable
- `504`: Upstream request timed out
- `default`: Error response

## Changes

- **2026-11-05** `fb5a0ecd3fc2`: 20 warning
  - added the new `FEATURE_TEMPORARILY_DISABLED` enum value to the `error/code` response property for the response status `401`
  - added the new `FEATURE_TEMPORARILY_DISABLED` enum value to the `error/code` response property for the response status `403`
  - added the new `FEATURE_TEMPORARILY_DISABLED` enum value to the `error/code` response property for the response status `404`
  - added the new `FEATURE_TEMPORARILY_DISABLED` enum value to the `error/code` response property for the response status `409`
  - …16 more

[Operation history](https://skmtc.dev/runta/apis/runta-public-rest-api/changes/v2/agents/post.md)

---

[API](https://skmtc.dev/runta/apis/runta-public-rest-api.md) - [All operations](https://skmtc.dev/runta/apis/runta-public-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/runta/apis/runta-public-rest-api/revisions/fb5a0ecd3fc2?raw)
