AgentwatchConsole
Getting started

Installation

One package, no peer dependencies, no build step.

Install the package

Pick whichever package manager the project already uses.

npm install @agentwatch-beta/sdk

Runtime support

  • Node 18+ — earlier versions lack a built-in fetch, which the client uses to deliver traces.
  • ESM and CommonJS — both entry points ship in the package, so import and require both work without a bundler shim.
import { watch, AgentWatchClient } from '@agentwatch-beta/sdk'

TypeScript

Declarations ship inside the package, so there is no @types companion to install. The option and payload shapes are exported alongside the runtime API when you want to build your own config objects or helpers around them.

ts
import type {
  WatchOptions,
  TracePayload,
  AgentWatchClientOptions,
} from '@agentwatch-beta/sdk'

Credentials

Two values are needed before the SDK can send anything: an API key and the UUID of an agent registered in your project. Both are shown in the console once you have created an agent — the Quickstart walks through it.

Keep the key server-side

An aw_live_... key can write traces to your project. Read it from the environment on the server; never inline it into a bundle that reaches the browser.
.env
AGENTWATCH_KEY=aw_live_...
AGENTWATCH_AGENT_ID=<agent-uuid>