Agent sandbox connections
The Agent sandbox connections endpoints of the Kenso API.
List your sandbox agent connections
/v1/agent-sandbox/connectionsagent-sandbox-connections.listNeeds the agent_sandboxes feature on your workspace. Until it is on, calls answer 404. Needs the agent_work feature on your workspace. Until it is on, calls answer 404.
Always six entries in data, in this order: claude, codex, antigravity, opencode, grok, cursor, each with status (connected or not_connected), connectedAt and lastRunAt. pagination.hasMore is always false. Your box serves every workspace you work in, so the list is the same in each.
Errors:
- 404 not_found: a feature is off, or the credential is not a person's.
Parameters
YYYY-MM-DD form. 1.1 is another name for the first dated version. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and 404 where the path exists only in this version. A date that is not a version answers 400 unsupported_version; any other value that is not a version is treated as legacy.400 workspace_required. A workspace you are not a member of answers 404 not_found.Response 200
data is a list of AgentSandboxConnection. Each item has these fields. The response also carries pagination.
claude, codex, antigravity, opencode, grok or cursor.connected or not_connected.curl -X GET "https://api.ken.so/v1/agent-sandbox/connections" \ -H "Authorization: Bearer $KEN_API_KEY" \ -H "Ken-Version: 1.1" \ -H "X-Ken-Workspace-Id: $KEN_WORKSPACE_ID"
{
"success": true,
"data": [
{
"agent": "string",
"status": "string",
"connectedAt": "2026-09-23T15:02:11Z",
"lastRunAt": "2026-09-23T15:02:11Z"
}
],
"pagination": {
"nextCursor": "eyJpZCI6ODE1fQ",
"hasMore": true,
"total": 1,
"isTotalCapped": true
}
}Disconnect an agent
/v1/agent-sandbox/connections/{agent}agent-sandbox-connections.disconnectNeeds the agent_sandboxes feature on your workspace. Until it is on, calls answer 404. Needs the agent_work feature on your workspace. Until it is on, calls answer 404.
Logs the agent CLI out in your Kenso sandbox and answers { agent, status: "not_connected" }. With no agent left connected, the sandbox itself is deleted. Disconnecting an agent that is not connected answers the same.
Errors:
- 400 validation_failed: an unknown agent. - 404 not_found: a feature is off, or the credential is not a person's. - 409 run_active: your sandbox is running a run. Stop it first. - 503 service_unavailable with Retry-After: the sandbox did not answer; try again.
Parameters
claude, codex, antigravity, opencode, grok or cursor.YYYY-MM-DD form. 1.1 is another name for the first dated version. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and 404 where the path exists only in this version. A date that is not a version answers 400 unsupported_version; any other value that is not a version is treated as legacy.400 workspace_required. A workspace you are not a member of answers 404 not_found.Response 200
data is a AgentSandboxDisconnect.
not_connected.curl -X DELETE "https://api.ken.so/v1/agent-sandbox/connections/string" \ -H "Authorization: Bearer $KEN_API_KEY" \ -H "Ken-Version: 1.1" \ -H "X-Ken-Workspace-Id: $KEN_WORKSPACE_ID"
{
"success": true,
"data": {
"agent": "string",
"status": "string"
}
}