Skip to main content
The @kyberon/memproof TypeScript SDK is a native library that implements the full Memproof control pipeline locally. It is not an HTTP client — it runs the same risk scoring, policy evaluation, and Trailproof audit trail logic as the Python SDK, directly in your Node.js process.

Installation

Quick Start

API Methods

The Memproof class exposes these methods: Every mutation method accepts an optional idempotencyKey parameter. If omitted, one is generated automatically.

Core Types

The SDK exports const enum objects and TypeScript types:

Enums

Key Interfaces

Properties use camelCase in TypeScript (e.g. tenantId, actorType, operationId). The SDK also accepts snake_case input for convenience when passing plain objects.

Error Handling

Failed operations throw typed error classes:

Approval Workflow

Custom Adapters

You can implement custom memory adapters by implementing the MemoryAdapter interface:

Using Individual Components

You can use the risk engine, policy engine, and other components independently:
The TypeScript and Python SDKs use the same risk scoring algorithm, policy evaluation logic, and YAML policy format. A policy file works identically in both SDKs.