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

# JavaScript SDK

> Official JavaScript/TypeScript SDK for Truedy

## Installation

Install the Truedy Node.js SDK using npm, yarn, or pnpm.

<CodeGroup>
  ```bash npm theme={null}
  npm install trudy-sdk
  ```

  ```bash yarn theme={null}
  yarn add trudy-sdk
  ```

  ```bash pnpm theme={null}
  pnpm add trudy-sdk
  ```
</CodeGroup>

## Initialization

Initialize the client with your API key. You can find your API key in the [Dashboard](https://app.truedy.ai/settings/api-keys).

```typescript theme={null}
import { Trudy } from 'trudy-sdk';

const trudy = new Trudy({
  apiKey: 'your_api_key_here',
});
```

## Usage Example

### List Agents

```typescript theme={null}
const { data: agents } = await trudy.agents.list();

console.log(agents);
```

### Make a Call

```typescript theme={null}
const call = await trudy.calls.create({
  agentId: 'agent_123',
  phoneNumber: '+15550001234',
});

console.log('Call started:', call.id);
```
