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

# Install and import the @dolphinclaw/sdk npm package

> Install the Dolphinclaw SDK with npm, pnpm, or yarn, and import it in CommonJS or ESM. Built-in TypeScript types included — no @types/ package needed.

Before your agent can send structured logs or report results to the Dolphinclaw dashboard, you need to add `@dolphinclaw/sdk` to your project. The package is published to the public npm registry and works with any Node.js-compatible package manager.

## Install

<CodeGroup>
  ```bash npm theme={null}
  npm install @dolphinclaw/sdk
  ```

  ```bash pnpm theme={null}
  pnpm add @dolphinclaw/sdk
  ```

  ```bash yarn theme={null}
  yarn add @dolphinclaw/sdk
  ```
</CodeGroup>

## Import

The package supports both CommonJS `require` and ESM/TypeScript `import` syntax.

<CodeGroup>
  ```javascript CommonJS theme={null}
  const sdk = require('@dolphinclaw/sdk');
  ```

  ```typescript ESM / TypeScript theme={null}
  import sdk from '@dolphinclaw/sdk';
  ```
</CodeGroup>

## TypeScript support

`@dolphinclaw/sdk` ships with a bundled `index.d.ts` declaration file. You do not need to install a separate `@types/dolphinclaw__sdk` package — type checking and editor autocomplete work as soon as you install the package.

## Add to `package.json`

Make sure `@dolphinclaw/sdk` appears in the `dependencies` field of your project's `package.json`, not `devDependencies`. The Dolphinclaw platform installs `dependencies` when it deploys your agent; packages listed only under `devDependencies` will not be available at runtime.

```json package.json theme={null}
{
  "dependencies": {
    "@dolphinclaw/sdk": "^1.0.0"
  }
}
```

<Note>
  `@dolphinclaw/sdk` exports a single shared instance. Every `require` or `import` in your project resolves to the same object, so you can safely import the SDK in multiple files without creating duplicate instances.
</Note>
