Skip to main content
POST
/
agent
/
v1
/
execute
Execute ad-hoc agent
curl --request POST \
  --url https://api.case.dev/agent/v1/execute \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "instructions": "<string>",
  "model": "<string>",
  "vaultIds": [
    "<string>"
  ],
  "objectIds": [
    "<string>"
  ],
  "guidance": "<string>",
  "enabledTools": [
    "<string>"
  ],
  "disabledTools": [
    "<string>"
  ],
  "sandbox": {
    "cpu": 123,
    "memoryMiB": 123
  }
}
'
{
  "runId": "<string>",
  "agentId": "<string>",
  "status": "running",
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

API key starting with sk_case_

Body

application/json
prompt
string
required

Task prompt for the agent

instructions
string

System instructions. Defaults to a general-purpose legal assistant prompt if not provided.

model
string

LLM model identifier. Defaults to anthropic/claude-sonnet-4.6

vaultIds
string[] | null

Restrict agent to specific vault IDs

objectIds
string[] | null

Scope this run to specific vault object IDs. The agent will only access these objects.

guidance
string | null

Additional context or constraints for this run

enabledTools
string[] | null

Allowlist of tools the agent can use

disabledTools
string[] | null

Denylist of tools the agent cannot use

sandbox
object

Custom sandbox resources (cpu, memoryMiB)

Response

Run started

runId
string

Run ID — poll /agent/v1/run/:id/status

agentId
string

Ephemeral agent ID (auto-created)

status
enum<string>
Available options:
running
message
string