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

# Solute SDK

> Event tracking and A/B testing SDK for Solute - AI-powered product analytics platform

## Welcome to Solute SDK

Solute SDK is a lightweight, TypeScript-first analytics SDK that tracks user events and enables A/B testing. Similar to PostHog or Amplitude, but designed specifically for the Solute platform.

<CardGroup cols={2}>
  <Card title="Get Started" icon="rocket" href="/getting-started/installation">
    Install and set up the SDK in minutes
  </Card>

  <Card title="Quick Start" icon="bolt" href="/getting-started/quickstart">
    Start tracking events and using feature flags
  </Card>

  <Card title="Next.js Integration" icon="react" href="/guides/nextjs-integration">
    First-class Next.js App Router support
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/solute-client">
    Complete API documentation
  </Card>
</CardGroup>

## Features

<AccordionGroup>
  <Accordion title="Event Tracking" icon="chart-line">
    Track custom events, page views, and user actions with automatic context enrichment. Queue events when offline and sync when back online.
  </Accordion>

  <Accordion title="A/B Testing" icon="flask">
    Run experiments with feature flags and variants. Consistent user assignment and percentage-based rollouts.
  </Accordion>

  <Accordion title="User Identification" icon="user">
    Identify and track users across sessions with support for anonymous and identified users.
  </Accordion>

  <Accordion title="Type-Safe" icon="shield-check">
    Full TypeScript support with comprehensive type definitions for all SDK methods.
  </Accordion>

  <Accordion title="Lightweight" icon="gauge">
    Less than 20KB gzipped. Optimized for performance with minimal bundle size impact.
  </Accordion>

  <Accordion title="Framework Support" icon="puzzle-piece">
    Works with vanilla JS, React, Next.js, and more. First-class Next.js App Router integration.
  </Accordion>
</AccordionGroup>

## Quick Example

```typescript theme={null}
import { SoluteClient } from '@solute-ai/sdk';

const solute = new SoluteClient({
  apiKey: 'your_api_key',
  host: 'https://api.solute.dev',
});

// Track events
solute.track('Button Clicked', {
  button_id: 'signup-cta',
  page: '/homepage',
});

// Check feature flags
if (solute.isFeatureEnabled('new-checkout')) {
  // Show new checkout flow
}
```

## Installation

```bash theme={null}
npm install @solute-ai/sdk
# or
yarn add @solute-ai/sdk
# or
pnpm add @solute-ai/sdk
```

<Card title="Ready to get started?" icon="arrow-right" href="/getting-started/installation">
  Follow our installation guide to set up the SDK in your project.
</Card>
