---
title: "Provision a computer for an agent"
method: POST
path: "/api/v1/agents/{agent}/agent_computers"
---

# Provision a computer for an agent

`POST /api/v1/agents/{agent}/agent_computers`

Creates and provisions a new computer resource associated with the specified
agent. The computer is allocated in the requested region (defaulting to `iad`)
and its status transitions from `provisioning` to `running` once it is ready.

Requires an app-scoped API key. The agent identified by `agent` must belong
to the same app. Supplying a `lookup_key` lets you retrieve this computer
later without storing its ID — the key must be unique within the app.

## Path parameters

- `agent` string, required

## Request body

- object
  - `config` object — Provider-specific configuration for the computer. Supported keys vary by region and plan.
  - `lookup_key` string — Stable, user-defined key for this computer. Must be unique within the app. Use it to look up the computer without storing its ID.
  - `metadata` object — Arbitrary key-value metadata to attach to the computer. Not interpreted by the platform; returned as-is on all subsequent reads.
  - `name` string, required — Human-readable display name for the computer.
  - `region` string — Region in which to provision the computer, e.g. `"iad"`. Defaults to `"iad"` when omitted.

## Response `200`

Successful response

- AgentComputer — A cloud computer resource provisioned for an agent to use for browser and desktop automation tasks.
  - `agent` string — ID of the agent that owns this computer (`agi_...`). `null` if the computer is not yet assigned to an agent.
  - `app` string — ID of the app this computer belongs to (`dap_...`).
  - `config` object — Provider-specific configuration key-value pairs for the computer. Structure depends on the underlying compute provider.
  - `created_at` string, date-time — When the computer was created (ISO 8601).
  - `error_message` string — Human-readable error description when `status` is `"error"`. `null` otherwise.
  - `id` string, required — Computer ID (`cmp_...`).
  - `last_active_at` string, date-time — When the computer last reported activity or received a command. `null` if the computer has never been active.
  - `lookup_key` string — Unique, stable identifier you assign to this computer within its app. `null` if not set.
  - `metadata` object — Arbitrary key-value metadata you attached to the computer. `null` if none was provided.
  - `name` string — Human-readable display name for the computer. `null` if not set.
  - `region` string — Cloud region where the computer is hosted, e.g. `"us-east-1"`. `null` if not yet assigned.
  - `sprite_url` string — URL of the live screenshot sprite used to render a real-time preview of the computer's screen. `null` when no sprite is available.
  - `status` string — Current lifecycle state of the computer. Common values include `"provisioning"`, `"ready"`, `"error"`, and `"terminated"`.
  - `updated_at` string, date-time — When the computer record was last modified (ISO 8601).

## Other responses

- `401` — Unauthorized
- `403` — Forbidden - app scope required
- `404` — Agent not found
- `422` — Validation failed

---

[API](https://skmtc.net/archastro/apis/archastro-platform-api.md) · [All operations](https://skmtc.net/archastro/apis/archastro-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/archastro/archastro-platform-api/versions/a8772b442f86/schema)
