Tawa docs
SDK Reference

TypeScript

The Tawa TypeScript SDK — a fully-typed client for scanning prompts, RAG content, and agent tool traffic.

@tawaguard/sdk is the official TypeScript/JavaScript client for the Tawa Guard API. It wraps the REST API with an idiomatic, fully-typed client.

Install

npm install @tawaguard/sdk

Quick client

import { TawaGuard } from "@tawaguard/sdk";

const tawa = await TawaGuard.create(process.env.TAWA_API_KEY!);

const result = await tawa.analyze("Ignore all previous instructions…");

TawaGuard.create authenticates before returning, so a bad key surfaces immediately rather than on first use. See Configuration for the full set of options, and Scanning for every scan method the client exposes.

On this page