Skip to main content

TypeScript SDK

The Z3rno TypeScript SDK is a thin fetch-based client with Zod runtime validation on every response. Dual ESM + CJS build, native fetch — no axios, no node-fetch, no undici. Current version: @z3rno/sdk 0.7.0 on npm. Requires Node.js 18+ or any runtime with fetch (Deno, Bun, Cloudflare Workers).

Install

Client

Method reference

The TS client mirrors the Python SDK’s surface. Method names are camelCase; the API contract is identical.

Memory primitives

Conversation memory (Phase G slice 2)

Forge — ingest, distill, refine

Tenant self-management (v0.20.3)

Sessions

Framework integrations

Two adapters ship in @z3rno/sdk and lazy-load their host runtimes — no extra install needed for the SDK itself.

Vercel AI SDK

Mastra-JS

Models

Zod schemas + inferred TypeScript types are exported by name:
Zod parses every response at runtime — you get both compile-time TypeScript types and immediate failure on unexpected server payloads instead of silent downstream issues.

Exceptions

All inherit from Z3rnoError:

Reference