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

# Installation

> Install and configure the ACP TypeScript SDK for your project.

## Install the Package

Install the ACP TypeScript SDK using your preferred package manager:

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

  ```bash yarn theme={null}
  yarn add @agentclientprotocol/sdk
  ```

  ```bash pnpm theme={null}
  pnpm add @agentclientprotocol/sdk
  ```
</CodeGroup>

## Install Peer Dependencies

The SDK requires **Zod** for runtime schema validation. Install it alongside the SDK:

<CodeGroup>
  ```bash npm theme={null}
  npm install zod
  ```

  ```bash yarn theme={null}
  yarn add zod
  ```

  ```bash pnpm theme={null}
  pnpm add zod
  ```
</CodeGroup>

<Note>
  The SDK supports Zod versions `^3.25.0` or `^4.0.0`. Make sure your project uses a compatible version.
</Note>

## TypeScript Configuration

The ACP SDK is designed for modern TypeScript projects. Ensure your `tsconfig.json` includes these recommended settings:

```json tsconfig.json theme={null}
{
  "compilerOptions": {
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "lib": ["ESNext", "DOM"],
    "module": "ESNext",
    "moduleResolution": "bundler",
    "target": "es2022"
  }
}
```

<Tip>
  The `strict` mode is highly recommended to catch type errors early and ensure proper usage of the SDK's type-safe interfaces.
</Tip>

## Node.js Version Requirements

The SDK requires **Node.js 18+** for modern JavaScript features like:

* Native `fetch` API
* Web Streams API
* `crypto.getRandomValues()`

Verify your Node.js version:

```bash theme={null}
node --version
```

If you need to upgrade, visit [nodejs.org](https://nodejs.org) to download the latest LTS version.

## Verify Installation

Create a simple test file to verify the SDK is installed correctly:

<Steps>
  <Step title="Create a test file">
    Create `test-acp.ts` in your project:

    ```typescript test-acp.ts theme={null}
    import * as acp from "@agentclientprotocol/sdk";

    console.log("ACP SDK version:", acp.PROTOCOL_VERSION);
    console.log("AgentSideConnection:", typeof acp.AgentSideConnection);
    console.log("ClientSideConnection:", typeof acp.ClientSideConnection);
    ```
  </Step>

  <Step title="Run the test">
    Execute the file using `tsx` or compile it with `tsc`:

    <CodeGroup>
      ```bash tsx theme={null}
      npx tsx test-acp.ts
      ```

      ```bash tsc theme={null}
      npx tsc test-acp.ts && node test-acp.js
      ```
    </CodeGroup>
  </Step>

  <Step title="Check the output">
    You should see output similar to:

    ```
    ACP SDK version: 1
    AgentSideConnection: function
    ClientSideConnection: function
    ```

    <Info>
      `PROTOCOL_VERSION` returns the protocol version number (currently `1`), not the SDK package version.
    </Info>
  </Step>
</Steps>

<Info>
  If you see the output above, the SDK is correctly installed and ready to use!
</Info>

## What's Next?

Now that you have the SDK installed, follow the quickstart guide to build your first agent or client:

<Card title="Quickstart Guide" icon="rocket" href="/quickstart">
  Build a working ACP agent or client in just a few minutes
</Card>
