# Installation

## Install

To use this library in your own project pull it in from npm:

```sh
npm i @sage-app/sdk
```

The SDK is written with TypeScript and exposes all the types needed for integration.

## Usage

The Sage SDK is expected to run within one of two different contexts: either in a [server](/getting-started/server.md) or [frontend](/getting-started/frontend.md) environment.

Depending on your use case, the following imports are available:

```typescript
import { SageClient } from '@sage-app/sdk/client';

import {
  SageProvider,
  useChannel,
  usePost,
  useUser
} from '@sage-app/sdk/react';
```


---

# 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:

```
GET https://sdk.sageapp.xyz/getting-started/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.
