> ## Documentation Index
> Fetch the complete documentation index at: https://alibi.itsdote.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Node SDK

> Reference for @alibi/sdk-node — generated from packages/sdk-node/src.

Alibi is **SDK-first**. After the [Python SDK](https://alibi.itsdote.tech/sdk/python.md), this is the Express
parity surface for the same workflow (extend, customize, integrate). Generated from
`packages/sdk-node/src` (signatures + JSDoc).

Control-plane [OpenAPI](https://alibi.itsdote.tech/api/overview.md) is the HTTP contract **underneath** — not the
preferred starting point. This SDK mirrors Python middleware and **consumes** the
control-plane TypeScript routes (`apps/control-plane/src/api/routes.ts`).

## Install

```bash theme={null}
pnpm --filter @alibi/sdk-node build
# from an Express app in the workspace:
pnpm add @alibi/sdk-node @alibi/plugin-sql @alibi/plugin-redis --filter your-app
```

## Junnu — record a case

```ts theme={null}
import { alibi } from "@alibi/sdk-node";
import { createPostgresPlugin } from "@alibi/plugin-sql";
import { createRedisPlugin } from "@alibi/plugin-redis";

alibi.init({
  project: "demo-coffee",
  plugins: [createPostgresPlugin(...), createRedisPlugin(...)],
});
app.use(alibi.middleware());
// Control plane (as Junnu) starts a session; sandbox traffic carries
// x-alibi-sandbox + x-alibi-session-id with ALIBI_MODE=record.
```

## Laddu — verify-live

```ts theme={null}
// Same Express app; verify-live sets mode/run/case/sandbox headers for Laddu.
// middleware restores the baseline once per run and diffs observed steps.
```

## Modules

| Module | Contents |
| - | - |
| [`@alibi/sdk-node/core`](https://alibi.itsdote.tech/sdk/node/core) | Middleware |
| [`@alibi/sdk-node/client`](https://alibi.itsdote.tech/sdk/node/client) | Control plane client |
| [`@alibi/sdk-node/backoff`](https://alibi.itsdote.tech/sdk/node/backoff) | Retry / backoff |
| [`@alibi/sdk-node/offline-queue`](https://alibi.itsdote.tech/sdk/node/offline-queue) | Offline queue |
| [`@alibi/sdk-node/observability`](https://alibi.itsdote.tech/sdk/node/observability) | Metrics & spans |
| [`@alibi/sdk-node/redaction`](https://alibi.itsdote.tech/sdk/node/redaction) | Secret / PII redaction |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.