Overview

Last updated Aug 12, 2026View as MarkdownAgent setup

For most stacks (Python, Go, Rails, PHP, bash) the curl example is the SDK: one HTTP call, done. See the Quickstart. SDKs exist only where the runtime actively fights the simple path. There is one per execution model, and each solves a specific way the naive fire-and-forget fetch gets dropped.

PackageRuntimeThe problem it solves
@datagauge/edgeServerless & edge (Workers, Vercel, Deno, Lambda)The runtime freezes the instant your response returns.
@datagauge/convexConvexMutations can't fetch().
@datagauge/clientClient & offline (Expo, Electron, PWAs)Devices go offline and apps get killed mid-session.
@datagauge/nodeShort-lived CLIs, cron jobs, scriptsThe process exits before any background batcher fires.

Installing

npm install @datagauge/<runtime>   # edge | convex | client | node

Or skip the dependency entirely: every SDK is a single dependency-free TypeScript file, and vendoring it is a supported install, not a workaround.

# pick your runtime: edge | convex | client | node
curl -o lib/datagauge.ts \
  https://raw.githubusercontent.com/raymond-UI/datagauge/main/sdks/edge/index.ts

A note on keys

Server SDKs (edge, convex, node) send with an sk_live_ key and can write payments and subscriptions. The client SDK is built to ship inside binaries, so it uses a public pk_live_ key that can never write money; see Keys & scoping. Every prefix has an sk_test_ / pk_test_ twin that writes to an isolated test environment; swap the prefix to rehearse before going live.