Configure Studio

Serve Options

Configure the local Studio server port, host, and startup logs.

Call .start(...) to serve the Studio UI and HTTP API.

new Studio([agent]).start({
  port: 4021,
  hostname: "localhost",
  log: true,
});

Options

OptionTypeDefault
portnumberRUNNER_PORT, then 4021
hostnamestringHono's default host binding
logbooleantrue

When logging is enabled, Studio prints the local URL.

Studio UI: http://localhost:4021/playground

If you omit port, Studio reads RUNNER_PORT first and falls back to 4021.

RUNNER_PORT=4040 pnpm tsx studio.ts

Use .close() when tests or scripts need to stop the server explicitly.

const studio = new Studio([agent]).start({ port: 4021 });

// ...

studio.close();