---
title: "Execute ad-hoc v2 agent"
method: POST
path: "/agent/v2/execute"
tags: ["Agents"]
---

# Execute ad-hoc v2 agent

`POST /agent/v2/execute`

Creates an ephemeral agent and immediately executes a v2 run on the Daytona runtime.

## Request body

- object
  - `prompt` string, required
  - `instructions` string
  - `model` string
  - `vaultIds` string[], nullable
  - `objectIds` string[], nullable
  - `guidance` string, nullable
  - `enabledTools` string[], nullable
  - `disabledTools` string[], nullable
  - `sandbox` object, nullable
    - `cpu` integer
    - `memoryMiB` integer

## Response `200`

Run started

- object
  - `runId` string
  - `agentId` string
  - `status` 'running'
  - `provider` 'daytona'
  - `runtimeState` 'running'
  - `message` string

## Other responses

- `400` — Missing required fields (prompt)
- `401` — Invalid API key
- `403` — No agent access

## Changes

- **2026-03-27** `220d723a75ba` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/casemark/apis/case-dev-api/changes/agent/v2/execute/post.md)

---

[API](https://skmtc.dev/casemark/apis/case-dev-api.md) · [All operations](https://skmtc.dev/casemark/apis/case-dev-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/casemark/case-dev-api/revisions/9579fb47836b/schema)
