Documentation/SDK (JS/TS)/JavaScript/TypeScript SDK
1 min read

JavaScript/TypeScript SDK

This section documents the JS/TS SDK patterns you should use across services and applications.

How the SDK fits the Boson platform

The JS/TS SDK is open source, but it is meant to be used with Boson’s proprietary platform: traces, evals, and prompts are stored and viewed in Boson’s backend and web app (Boson Cloud by default, or a Boson-managed self-hosted deployment your organization runs). Do not configure the SDK to send data to arbitrary or self-built backends that are not part of Boson’s product.

What you’ll do here

  • install the SDK
  • configure keys and host
  • create traces and spans
  • record input/output events safely
  • handle errors, retries, and streaming output
  • API edge: create one trace per request
  • Worker jobs: one trace per job execution
  • Agent loop: one trace per run/turn, with one tool span per tool call

Next steps