Guide
TypeScript SDK
A typed client for every endpoint, generated from the OpenAPI document.
Use it
import { createJutsu } from "@jutsu/sdk";
const jutsu = createJutsu({ token: process.env.JUTSU_TOKEN!, baseUrl: "https://YOUR-HOST" });
const me = await jutsu.ok(jutsu.GET("/self"));
await jutsu.ok(jutsu.POST("/agents/{id}/messages", { params: { path: { id: me.id } }, body: { text: "Brief me on tea" } }));
Every path, parameter, body and response is typed. jutsu.ok() returns the data or throws a
JutsuError with status, code and details. Every POST gets an Idempotency-Key
automatically, so retries never repeat an action. jutsu.mcp holds the MCP URL and headers.
Regenerate
pnpm --filter @jutsu/sdk gen rebuilds the types from /api/v1/openapi.json.