NylorunDocsBeta
Runtime APISessions

Run a sandbox tool in a session

POST
/v1/sessions/{sessionId}/sandbox/{tool}

For an app's own tools; not while a turn is running.

Authorization

applicationKey
headerAuthorizationBearer <token>

An application key of the Tenant (PUT /v1/tenant/keys/{keyId}), or Studio's key, derived from the admin key. With Nylorun-Subject and Nylorun-Scopes, it acts for that person, narrowed to those scopes. Never accepted from a browser (Origin).

Path Parameters

sessionId*string
tool*string
Value in"bash""read""write""edit""grep""glob"

Header Parameters

Nylorun-Protocol*string

The protocol version, 8

Request Body

application/json
  1. body

The tool's input

[key: string]?unknown

Response Body

The tool's output, or why it failed

application/json
  1. response
kind*"completed"
Value in"completed"
output?unknown
import { createClient } from "@nylorun/agents";const client = await createClient();const result = await client.session("ses_123").sandbox.bash({  command: "npm test",});
{  "kind": "completed",  "output": null}