Install
Set the API key
Get an API key from the Boundary dashboard. The SDK readsBOUNDARY_API_KEY from the environment by default.
Wire a logger to your contract
Run a contract
accept() produces a terminal event. Runs with failed intermediate attempts also produce non-terminal failure events with repair context. Events are queued, batched, and shipped to Boundary’s ingest endpoint.
What gets sent
The SDK’s default capture policy is conservative. On a successful run you’ll see roughly:final: false event for the same runId — the dashboard stitches them together for you.
Raw LLM input and output are not included unless you opt in — see Capture policy.
Dev-safe by default
IfBOUNDARY_API_KEY is not set and you don’t pass a custom write, createBoundaryLogger returns null. Passing null to defineContract is a no-op — the contract runs normally, no events sent, no errors.
Next steps
Capture policy
Turn raw inputs/outputs on or off
Redaction
Scrub PII before events leave the process
Shutdown
Drain the queue on serverless / edge / workers
createBoundaryLogger
Every option, with defaults