> ## Documentation Index
> Fetch the complete documentation index at: https://docs.struct.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# TypeScript SDK

> Capture supported AI calls in Node.js applications.

Capture supported AI calls in Node.js applications.

Start with [ingest key setup](https://docs.struct.ai/observability/instrumentation.md#create-an-ingest-key). Keep credentials in your deployment secret store.

## Configure instrumentation

> [!NOTE]
>
> The Node SDK sends **AI agent calls only**, including prompt, answer and tool content by default
> (set `captureContent: false` in `struct.init()` to leave content out). It instruments Anthropic,
> LangChain and LangGraph, the Vercel AI SDK (`ai` 7 with `@ai-sdk/otel`; SDK 0.4.16 or newer), and
> OpenAI's Responses API without streaming; direct OpenAI `chat.completions` calls and streaming
> OpenAI Responses calls get no automatic spans. It does not send HTTP or database spans, your app's
> own logs, or metrics. For those, also follow [Any OpenTelemetry
> SDK](https://docs.struct.ai/observability/instrumentation/opentelemetry.md) or [Your own
> collector](https://docs.struct.ai/observability/instrumentation/opentelemetry.md#your-own-opentelemetry-collector).

```bash theme={null}
npm install @struct-ai/sdk
```

```ts theme={null}
import { struct } from '@struct-ai/sdk';

struct.init({
  ingestKey: process.env.STRUCT_INGEST_KEY!,
  serviceName: 'checkout-agent',
});

// Before the first model call:
await struct.ready;
```

## Verify the result

Exercise a real operation and follow [signal verification](https://docs.struct.ai/observability/instrumentation.md#verify-instrumentation). Report which signals arrived and which were not configured.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.