Agents

/docs/agents/install

Install

The @obscura-app/sdk package wraps fetch() and handles the x402 payment handshake on 402 responses. Your agent code stays a normal HTTP client — Obscura signs the confidential on-chain transfer on your behalf when a paid API asks for payment.

Requirements

  • Node 18 or later. The SDK uses the native fetch API. On older runtimes, inject a polyfill via the fetch constructor option.
  • An Obscura account. Sign in with your Solana wallet (Sign-In-With-Solana). The signup flow gives you a custodied agent balance and a deposit address — see Quickstart.

Install the SDK

terminalbash
npm install @obscura-app/sdk

# or pnpm:
pnpm add @obscura-app/sdk

# or yarn:
yarn add @obscura-app/sdk

Verify

A minimal sanity check — this should print the installed version:

terminalbash
node -e "console.log(require('@obscura-app/sdk/package.json').version)"

You're ready. The Quickstart gets you to a first paid call in about three minutes.