> For the complete documentation index, see [llms.txt](https://docs.amigo.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amigo.ai/developer-guide/platform-api/platform-sdk/installation.md).

# Installation

The Platform SDK is a TypeScript-first package distributed via npm. It ships ESM and CJS builds with full type declarations and requires Node.js 20 or higher.

## Requirements

* Node.js 20 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
