Skip to content

Installation

Install the package

The SDK is published as @kortexya/reasoninglayer with zero runtime dependencies.

Terminal window
pnpm add @kortexya/reasoninglayer

Requirements

RequirementMinimum version
TypeScript5.0+
Node.js18.0+
ES targetES2022

The SDK relies on Web Platform APIs that are available natively in Node 18+: fetch, AbortController, AbortSignal.any, Headers, Request, Response, and URL. No polyfills are needed.

Module formats

The package ships dual ESM and CJS builds via tsup. Both formats include full TypeScript declarations (.d.ts / .d.cts).

import { ReasoningLayerClient, Value, psi } from '@kortexya/reasoninglayer';

CommonJS

const { ReasoningLayerClient, Value, psi } = require('@kortexya/reasoninglayer');

Runtime compatibility

The SDK uses only Web Platform APIs and has no Node.js-specific imports, making it compatible with any runtime that supports the Fetch API.

RuntimeSupported versions
Node.js18.0+
Deno1.28+
Bun1.0+
BrowsersAll modern browsers (Chrome 105+, Firefox 100+, Safari 15.4+, Edge 105+)

Zero dependencies

The SDK has zero runtime dependencies. The node_modules footprint is the package itself. This is a deliberate design choice:

  • No supply chain risk from transitive dependencies
  • No version conflicts with your application’s dependencies
  • Tree-shakeable — import only what you use

Verify your installation

Create a file to confirm the SDK is installed and importable:

import { ReasoningLayerClient } from '@kortexya/reasoninglayer';
const client = new ReasoningLayerClient({
baseUrl: 'https://platform.ovh.reasoninglayer.ai',
tenantId: '550e8400-e29b-41d4-a716-446655440000',
auth: { mode: 'cookie' },
});
console.log('SDK loaded successfully');

If this runs without errors, you are ready to proceed to the Quick Start.

What is included

The package exports:

  • ReasoningLayerClient — main client class with 40+ resource clients
  • Type definitions — all request, response, and DTO types for full IntelliSense
  • Builder functionsValue, psi, constrained, LP, guard, SortBuilder, allen, FuzzyShape
  • Error classesApiError, AuthenticationError, ForbiddenError, RateLimitError, TimeoutError, NetworkError, and more
  • UtilitiesdiscriminateFeatureValue, isUuid