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

# TypeScript SDK

> Typed Node.js and browser client in @attexra/sdk.

The `@attexra/sdk` package in `packages/sdk-ts` wraps all Attexra v1 endpoints with typed request/response contracts, trimmed credential handling, explicit `AttexraError` envelopes, and cursor pagination helpers.

## Build & test locally

```bash theme={null}
npm run build:sdk
npm run test:sdk
```

## Client initialization

```ts theme={null}
import { AttexraClient, AttexraError } from "@attexra/sdk";

const client = new AttexraClient({
  apiKey: process.env.ATTEXRA_API_KEY!,
  baseUrl: process.env.ATTEXRA_API_URL ?? "http://localhost:8080/v1",
});

try {
  const { items, nextCursor } = await client.listAgents({ limit: 25 });
  console.log("Agents:", items.length, "Next:", nextCursor);
} catch (err) {
  if (err instanceof AttexraError) {
    console.error(err.status, err.code, err.message);
  }
}
```


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