> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nora.my/llms.txt
> Use this file to discover all available pages before exploring further.

# Install the SDK

> Add the Nora client to your Node / TypeScript project

The Nora client ships as an npm package. It's TypeScript-first (types included) and runs on any Node 18+ runtime — Node, Deno, Bun, or an edge worker that supports `fetch` and `globalThis`.

<Note>
  **Status (2026-09-06)**: implemented and typechecks in the platform repo, currently at `0.0.1`. Publishing to a public npm scope is in progress — until then, install from the internal registry (or vendor the `packages/nora-agents` source if you have platform repo access). The API is stable — swap the install URL when the public publish lands without changes.
</Note>

## Install

```bash theme={null}
npm install @conscience-technology/nora-sdk
# or:
pnpm add @conscience-technology/nora-sdk
yarn add @conscience-technology/nora-sdk
```

## Import

```ts theme={null}
import { createClient } from "@conscience-technology/nora-sdk";

const nora = createClient({
  tenant: "t_...",
  token: process.env.NORA_PAT,
  triggerSecret: process.env.NORA_TRIGGER_SECRET,
});
```

Named exports available from the package root:

* `createClient(opts)` — factory that returns a `NoraClient`.
* `NoraClient` — the class itself, if you'd rather `new` it up.
* Types: `ClientOptions`, `RunResult`, `Improvement`, `Change`, `Logger`, `LogEvent`.
* Error classes: `NoraError`, `NoraAuthError`, `NoraRequestError`, `NoraAccessError`, `NoraProviderError`, `NoraPlatformError` — see [Errors](/sdk/errors).
* Trace helpers: `traceRef`, `withTrace`, `currentTrace`, `injectHeaders`, `extractTrace`, `TRACE_HEADER`.

## Prerequisites

* **Node 18+** (or a runtime with global `fetch`). No polyfill needed.
* **ESM only** — the package ships `"type": "module"`. If your project is CommonJS, use dynamic `import()` or convert your entrypoint to ESM.
* **Server-side only** — the client refuses to initialise in the browser (PAT / trigger-secret leakage guard). See [Overview · server-side only](/sdk/overview#server-side-only).

## Version pinning

Pin an exact version in production so a re-install doesn't drift:

```json theme={null}
{
  "dependencies": {
    "@conscience-technology/nora-sdk": "0.0.1"
  }
}
```

Follow semver on upgrade — the client contract is stable but option shapes may extend between minor versions.

## Next

* [Auth](/sdk/auth) — set up your PAT and trigger secret, and pick the right scopes.
* [Client options](/sdk/client-options) — the full `ClientOptions` reference (base URL, retries, logging, custom fetch, …).
