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

# Quickstart

> A high-level guide to getting started with the Moss SDK, from installation to integrating the core components into your React application.

# Quickstart Guide

Get up and running with the Moss SDK in just a few minutes. This guide will walk you through the essential steps to install the SDK and render the assistant in your application.

## 1. Install the SDK

Choose your preferred installation method:

### Option A: CDN Installation (Recommended for Non-React Apps)

```html theme={null}
<!-- Replace YOUR_APP_ID with your actual Application ID -->
<script src="https://cdn.moss.ai/moss-sdk@latest?applicationId=YOUR_APP_ID"></script>
```

See the [**CDN Installation Guide**](/en/cdn-installation) for complete setup instructions.

### Option B: NPM Installation (For React Apps)

```bash theme={null}
npm install @viamoss/moss-sdk
```

See the [**NPM Installation Guide**](/en/installation) for full details.

## 2. Setup (NPM Installation Only)

<Note>
  If you used CDN installation, skip this step. The SDK is automatically configured and ready to use.
</Note>

The `AgentProvider` is the heart of the SDK. It manages state, provides context to all other components, and renders the assistant UI. Wrap it around your application at a high level.

```tsx /src/App.tsx theme={null}
import React from 'react';
import { AgentProvider, MossSDKConfig } from '@viamoss/moss-sdk';

// Define your SDK configuration
const sdkConfig: MossSDKConfig = {
  apiUrl: 'YOUR_BACKEND_API_URL',
  applicationName: 'YOUR_APP_NAME',
  userId: 'CURRENT_USER_ID',
};

function App() {
  return (
    // Wrap your application with AgentProvider
    <AgentProvider config={sdkConfig}>
      {/* Your application components */}
      <h1>My Application</h1>
      <p>Welcome! The Moss assistant is now available.</p>
    </AgentProvider>
  );
}

export default App;
```

## 3. Configuration

You must provide the `apiUrl`, `applicationName`, and `userId` in the `config` prop.

* **`apiUrl`**: The URL of your Moss backend service.
* **`applicationName`**: The unique name you registered for your application.
* **`userId`**: A unique identifier for the current user.

That's it! With these steps, the Moss SDK is now integrated. The floating action button will appear automatically, and users can begin interacting with the AI assistant. For more advanced customization and features, refer to the full [SDK Reference](/en/sdk-reference/sdk).
