Skip to main content

Install the Package

Install the ACP TypeScript SDK using your preferred package manager:
npm install @agentclientprotocol/sdk

Install Peer Dependencies

The SDK requires Zod for runtime schema validation. Install it alongside the SDK:
npm install zod
The SDK supports Zod versions ^3.25.0 or ^4.0.0. Make sure your project uses a compatible version.

TypeScript Configuration

The ACP SDK is designed for modern TypeScript projects. Ensure your tsconfig.json includes these recommended settings:
tsconfig.json
{
  "compilerOptions": {
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "lib": ["ESNext", "DOM"],
    "module": "ESNext",
    "moduleResolution": "bundler",
    "target": "es2022"
  }
}
The strict mode is highly recommended to catch type errors early and ensure proper usage of the SDK’s type-safe interfaces.

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:
node --version
If you need to upgrade, visit nodejs.org to download the latest LTS version.

Verify Installation

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

Create a test file

Create test-acp.ts in your project:
test-acp.ts
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);
2

Run the test

Execute the file using tsx or compile it with tsc:
npx tsx test-acp.ts
3

Check the output

You should see output similar to:
ACP SDK version: 1
AgentSideConnection: function
ClientSideConnection: function
PROTOCOL_VERSION returns the protocol version number (currently 1), not the SDK package version.
If you see the output above, the SDK is correctly installed and ready to use!

What’s Next?

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

Quickstart Guide

Build a working ACP agent or client in just a few minutes

Build docs developers (and LLMs) love