SDK Reference186 exportsGenerated manifest

Arelis SDK Documentation

Operation-first reference for one package with three surfaces: Unified SDK (`createArelis`) for governed model calls and agent loops, Platform API (`ArelisPlatform`) for `/api/v1/*` wrappers, and Runtime SDK (`createArelisClient`) for in-process governed orchestration.

Install and initialize
Start with one package install, then create the surface-specific client you need.
Install unified SDKbash
npm install @arelis-ai/ai-governance-sdk
Python SDKpython
from arelis import create_arelis_platform
import os

platform = create_arelis_platform({
    "baseUrl": "https://api.arelis.digital",
    "apiKey": os.environ["ARELIS_API_KEY"],
})
Choose your SDK surface

Use `ArelisPlatform` for `/api/v1/*` HTTP wrappers. Use Runtime SDK exports for in-process governance orchestration (models, gates, compliance, and runtime registries). Both come from the same package.

Initialize the client

For Platform API flows, create one ArelisPlatform instance per process and reuse it for all HTTP operation groups.

Authentication modes

Use `apiKey` for service-to-service workloads and `token` for Firebase user-scoped operations. The client sends either `x-api-key` or `Authorization: Bearer` automatically.

Errors and retries

Request failures throw `ArelisApiError` with RFC 7807 fields (`type`, `title`, `status`, `detail`, `instance`). Retries apply to 429 and 5xx responses plus network errors.

Operation-first navigation

Each client method group page documents signatures, endpoint mapping, request parameters, return contracts, and dual code examples (SDK + REST).

Runtime governance SDK
In-process namespaces and capabilities from the published runtime SDK.
Runtime module families
Required runtime module families detected from node_modules/@arelis-ai/ai-governance-sdk/dist/index.d.ts.
agentsdataSourcesevaluationsknowledgemcpmemorymodelspolicypromptsquotassecretstelemetry-oteltools
Platform support modules
Additional workspace modules used for policy, metering, and audit contracts.
Stream essentials
Real-time events are exposed through client.stream() over SSE.
stream() signatureTypeScript
stream(options: {
    onEvent: (type: string, data: unknown) => void;
    eventTypes?: string[];
  }): StreamConnection

Path

/api/v1/stream?token={apiKeyOrToken}

Default events

event:created, proof:created, risk:evaluated, replay:completed, policy:updated, usage:updated, key:updated

Config contract
ArelisPlatformConfig

baseUrl: string

apiKey: string

token: string

maxRetries: number

timeout: number

Error contract
ArelisApiError