The TypeScript SDK (Documentation Index
Fetch the complete documentation index at: https://docs.trulayer.ai/llms.txt
Use this file to discover all available pages before exploring further.
@trulayer/sdk on npm) has zero runtime dependencies and works in Node.js 18+, Vercel Edge, Cloudflare Workers, and Bun. A browser build is available but we recommend relaying through your server for API-key safety.
Install
Minimal usage
Next steps
Tutorial
End-to-end walkthrough — instrument a RAG pipeline with traces, spans, and evals.
Reference
Full type signatures for every exported symbol.
Testing helpers
In-memory sender and fluent assertions for unit tests.
Failure behavior
Default drop+warn semantics and the opt-in block mode.
Runtime support
| Runtime | Supported | Notes |
|---|---|---|
| Node.js 18+ | Yes | Uses native fetch |
| Vercel Edge | Yes | |
| Cloudflare Workers | Yes | |
| Bun | Yes | |
| Deno | Yes | Import from npm:@trulayer/sdk |
| Browser | Yes (not recommended) | Exposes your API key — relay via your server instead |
Build output
The package ships both ESM (index.mjs) and CJS (index.js) entry points, plus .d.ts types. Imports work identically in modern toolchains.