---
title: "SDK installation"
canonical: https://trickest.com/docs/developer-tools/sdk/installation
description: "Install @trickest/sdk, Node version requirements, and environment variables."
---

# SDK installation

## Requirements

- **Node.js 18+** for HTTP operations (`engines.node` is `>=18`). Agent realtime needs WebSocket support; use Node 22+ or supply a WebSocket implementation as described in [Sessions](/docs/developer-tools/sdk/sessions).
- A Trickest **API token**
- **npm**, **pnpm**, or **bun**

## Install

Install the SDK from the public npm registry:

<Tabs>
  <Tab title="npm">

```bash
npm install @trickest/sdk
```

</Tab>
  <Tab title="bun">

```bash
bun add @trickest/sdk
```

</Tab>
  <Tab title="pnpm">

```bash
pnpm add @trickest/sdk
```

</Tab>
</Tabs>

For the optional response-validation examples, add Zod as a direct dependency
with `npm install zod`.

Verify package loading:

```ts
import { TrickestClient } from "@trickest/sdk";
console.log(typeof TrickestClient); // 'function'
```

## Environment variables

| Variable            | Purpose                                                                                         |
| ------------------- | ----------------------------------------------------------------------------------------------- |
| `TRICKEST_TOKEN`    | API token (read by constructor if `token` option omitted)                                       |
| `TRICKEST_BASE_URL` | Public platform origin (default `https://trickest.io`); omit `/api`                             |
| `TRICKEST_WS_URL`   | WebSocket URL for agent realtime (optional; see [Sessions](/docs/developer-tools/sdk/sessions)) |

```bash
export TRICKEST_TOKEN='replace-with-your-token'
export TRICKEST_BASE_URL=https://trickest.io   # default
```

Run token-bearing code on a server or in a trusted local process. Never bundle
the token into browser JavaScript. An import check proves package loading, not
authentication or permission to execute a workflow.

## Next step

<CardGroup cols={2}>
  <Card
    title="Client setup"
    icon="gear"
    href="/docs/developer-tools/sdk/client-setup"
  >
    Create `TrickestClient`, per-request options, and `client.http`.
  </Card>
  <Card title="SDK overview" icon="code" href="/docs/developer-tools/sdk">
    Namespace map and quick start.
  </Card>
</CardGroup>

---
_Markdown source of https://trickest.com/docs/developer-tools/sdk/installation._
