---
title: "Run a shell command on the agent's machine"
method: POST
path: "/agents/{agent_id}/exec"
tags: ["Agent work"]
---

# Run a shell command on the agent's machine

`POST /agents/{agent_id}/exec`

## Request

- Base URL: `https://api-docs.jackhamr.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.jackhamr.ai/agents/{agent_id}/exec`
- Auth: none declared

## Path parameters

- `agent_id` string, required

## Request body

- ExecBody
  - `command` string, required
  - `cwd` string
  - `timeout` integer

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/jackhamr/apis/jackhamr-api.md) · [All operations](https://skmtc.dev/jackhamr/apis/jackhamr-api/llms.txt) · [OpenAPI document](https://skmtc.dev/jackhamr/apis/jackhamr-api/revisions/f75d221481d8?raw)
