Installation

Install the AOP SDK and collector to start observing your agents.

Requirements

  • Node.js 18+ — AOP uses modern Node APIs including native fetch and structured clone.
  • TypeScript 5+ — recommended but not required. The SDK ships type declarations.

Install the SDK

The SDK is the client library you import into your agent code. It provides AOPClient with typed methods for every AOP event.

# npm
npm install @useaop/sdk

# pnpm
pnpm add @useaop/sdk

# yarn
yarn add @useaop/sdk

Install the collector

The collector is a local server that receives events, stores them in SQLite, and serves the dashboard UI. You can run it without installing globally:

npx @useaop/collector start

Or install it as a dev dependency in your project:

# npm
npm install --save-dev @useaop/collector

# pnpm
pnpm add -D @useaop/collector

# yarn
yarn add -D @useaop/collector

Verify the installation

Start the collector in one terminal:

npx @useaop/collector start

Then in another terminal, run a quick smoke test:

import { AOPClient } from '@useaop/sdk'

const aop = new AOPClient({ agentId: 'install-test' })
await aop.sessionStarted({ goal: 'Verify AOP installation' })
await aop.sessionEnded('completed')
// Check localhost:4317 — you should see the session.
Both packages follow semver. Pin major versions in production to avoid breaking changes.

Next steps