Installation
Install the package
Section titled “Install the package”The SDK is published as @kortexya/reasoninglayer with zero runtime dependencies.
bash pnpm add @kortexya/reasoninglayer bash npm install @kortexya/reasoninglayer bash yarn add @kortexya/reasoninglayer bash bun add @kortexya/reasoninglayer Requirements
Section titled “Requirements”| 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.
Module formats
Section titled “Module formats”The package ships dual ESM and CJS builds via tsup. Both formats include full TypeScript declarations (.d.ts / .d.cts).
ESM (recommended)
Section titled “ESM (recommended)”import { ReasoningLayerClient, Value, psi } from '@kortexya/reasoninglayer';CommonJS
Section titled “CommonJS”const { ReasoningLayerClient, Value, psi } = require('@kortexya/reasoninglayer');Runtime compatibility
Section titled “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.
| 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+) |
Zero dependencies
Section titled “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
Section titled “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
Section titled “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 functions –
Value,psi,constrained,LP,guard,SortBuilder,allen,FuzzyShape - Error classes –
ApiError,AuthenticationError,ForbiddenError,RateLimitError,TimeoutError,NetworkError, and more - Utilities –
discriminateFeatureValue,isUuid