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
| Option | Type | Default |
|---|---|---|
port | number | RUNNER_PORT, then 4021 |
hostname | string | Hono's default host binding |
log | boolean | true |
When logging is enabled, Studio prints the local URL.
Studio UI: http://localhost:4021/playgroundIf you omit port, Studio reads RUNNER_PORT first and falls back to 4021.
RUNNER_PORT=4040 pnpm tsx studio.tsUse .close() when tests or scripts need to stop the server explicitly.
const studio = new Studio([agent]).start({ port: 4021 });
// ...
studio.close();