Skip to content

Installation

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

bash pnpm add @kortexya/reasoninglayer
Requirement Minimum version
TypeScript 5.0+
Node.js 18.0+
ES target ES2022

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.

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';
const { ReasoningLayerClient, Value, psi } = require('@kortexya/reasoninglayer');

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.

Runtime Supported versions
Node.js 18.0+
Deno 1.28+
Bun 1.0+
Browsers All modern browsers (Chrome 105+, Firefox 100+, Safari 15.4+, Edge 105+)

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

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.

The package exports:

  • ReasoningLayerClient – main client class with 40+ resource clients
  • Type definitions – all request, response, and DTO types for full IntelliSense
  • Builder functions – Value, psi, constrained, LP, guard, SortBuilder, allen, FuzzyShape
  • Error classes – ApiError, AuthenticationError, ForbiddenError, RateLimitError, TimeoutError, NetworkError, and more
  • Utilities – discriminateFeatureValue, isUuid