> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/iii-hq/sdk/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Install the III Node.js SDK

## Prerequisites

* Node.js 18.0.0 or higher
* npm, yarn, or pnpm package manager

## Install the SDK

Install the III SDK using your preferred package manager:

<CodeGroup>
  ```bash npm theme={null}
  npm install iii-sdk
  ```

  ```bash yarn theme={null}
  yarn add iii-sdk
  ```

  ```bash pnpm theme={null}
  pnpm add iii-sdk
  ```
</CodeGroup>

## Package Information

The III SDK is published as `iii-sdk` and provides both ESM and CommonJS exports:

* **Main export**: Core SDK functionality
* **Subpath exports**:
  * `iii-sdk/stream` - Stream interfaces
  * `iii-sdk/state` - State management
  * `iii-sdk/telemetry` - OpenTelemetry utilities

## Dependencies

The SDK includes built-in support for:

* **OpenTelemetry**: Automatic distributed tracing, metrics, and logging
* **WebSocket**: Persistent connection to the III Engine
* **W3C Trace Context**: Standard distributed tracing propagation

## Verify Installation

Create a simple test file to verify the installation:

```typescript test.ts theme={null}
import { init } from 'iii-sdk'

const iii = init('ws://localhost:49199')

iii.onConnectionStateChange((state) => {
  console.log('Connection state:', state)
})
```

Run the file:

```bash theme={null}
node test.ts
```

You should see the connection state change to `connected` if the III Engine is running.

## Next Steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/nodejs/quickstart">
    Get started with your first III function
  </Card>

  <Card title="API Reference" icon="code" href="/nodejs/api/client">
    Explore the complete API documentation
  </Card>
</CardGroup>
