Overview

@cxpa/sdk is the official TypeScript SDK for the CXP Agent Platform. It wraps the public HTTP API in typed helpers and ships zone-app primitives for Next.js.

Install

bash
npm install @cxpa/sdk

The SDK has a single runtime dependency (jose, for JWT verification) and declares next as an optional peer dependency.

Subpath exports

SubpathPurpose
@cxpa/sdk/agentTrigger / register / ingest runs, plus the runtime-side AgentClient for callbacks and credential resolution.
@cxpa/sdk/zoneNext.js middleware, session helpers, and a ZoneClient for zone apps.

When to use which

  • Triggering or ingesting runs from your backend@cxpa/sdk/agent.
  • Building the runtime task@cxpa/sdk/agent (createAgentClient).
  • Building a zone app@cxpa/sdk/zone.

Versioning

@cxpa/sdk follows semver. Breaking changes ship in a major version with a migration note in CHANGELOG.md on npm.