# Installation

The Platform SDK is a TypeScript-only package distributed via npm. It requires Node.js 18 or higher.

## Requirements

* Node.js 18 or higher
* npm, yarn, or pnpm
* TypeScript 5+ (recommended)

## Install from npm

```bash
npm install @amigo-ai/platform-sdk
```

Or with yarn or pnpm:

```bash
yarn add @amigo-ai/platform-sdk
pnpm add @amigo-ai/platform-sdk
```

## TypeScript Configuration

If you are using TypeScript, ensure your `tsconfig.json` targets ES2022 or later:

```json
{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true
  }
}
```

The SDK ships both ESM and CJS bundles with full `.d.ts` declaration files, so no additional type packages are required.

## Verify Installation

```typescript
import { AmigoClient } from '@amigo-ai/platform-sdk'
console.log('Platform SDK installed successfully!')
```

## Environment Variables

Create a `.env` file in your project root with your credentials:

```env
AMIGO_API_KEY=your-api-key
AMIGO_WORKSPACE_ID=your-workspace-id
```

Install `dotenv` to load them automatically:

```bash
npm install dotenv
```

Then in your application:

```typescript
import 'dotenv/config'
import { AmigoClient } from '@amigo-ai/platform-sdk'

const client = new AmigoClient({
  apiKey: process.env.AMIGO_API_KEY!,
  workspaceId: process.env.AMIGO_WORKSPACE_ID!,
})
```

## Next Steps

* [**Configuration**](/developer-guide/platform-api/platform-sdk/configuration.md)**.** Full configuration reference and credential setup.
* [**Quickstart**](/developer-guide/platform-api/platform-sdk/quickstart.md)**.** Make your first API call.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.amigo.ai/developer-guide/platform-api/platform-sdk/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
