---
title: "Send a message to the agent in a sandbox"
method: POST
path: "/api/v0beta1/sandboxes/{id}/agent-send"
tags: ["Sandboxes"]
---

# Send a message to the agent in a sandbox

`POST /api/v0beta1/sandboxes/{id}/agent-send`

## Path parameters

- `id` string, required

## Request body

- AgentSendRequest
  - `message` string, required
  - `new_session` boolean
  - `session_id` string
  - `agent` string

## Response `200`

Agent response.

- AgentSendResponse
  - `session_id` string, required
  - `agent_session_id` string
  - `response` string, required
  - `is_error` boolean, required
  - `is_new_session` boolean, required
  - `cost_usd` number

## Other responses

- `400` — Error
- `401` — Error
- `403` — Error
- `404` — Error

---

[API](https://skmtc.net/amika/apis/amika-api.md) · [All operations](https://skmtc.net/amika/apis/amika-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/amika/amika-api/revisions/664536fccd0e/schema)
