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

# Introduction

> FlowsBuilt is a suite of developer SDKs for building retention-aware, growth-ready SaaS products.

## What is FlowsBuilt?

FlowsBuilt is a collection of focused SDKs that give your SaaS product the infrastructure it needs — churn prediction, consent tracking, referral programs, secure sharing, and AI spend controls — without building any of it yourself.

<CardGroup cols={2}>
  <Card title="ChurnKit" icon="chart-line-down" href="/churnkit/overview">
    Real-time churn prediction, risk scoring, and webhook alerts. Know who's about to cancel before they do.
  </Card>

  <Card title="AckKit — Coming Soon" icon="file-contract" href="/ackkit/overview">
    Policy acknowledgment and consent tracking. Cryptographic proof that users accepted your ToS — without DocuSign.
  </Card>

  <Card title="GrowthKit — Coming Soon" icon="rocket" href="/growthkit/overview">
    Referral program SDK. Unique codes, attribution, activation tracking, fraud detection — four function calls.
  </Card>

  <Card title="ShareKit — Coming Soon" icon="link" href="/sharekit/overview">
    Shareable link and guest access SDK. Password protection, expiry, view tracking, and analytics for any resource.
  </Card>

  <Card title="BudgetKit — Coming Soon" icon="gauge-high" href="/budgetkit/overview">
    Per-user AI spend limits. Stop runaway free users from generating \$300 Anthropic bills overnight.
  </Card>
</CardGroup>

## How it works

1. **Get an API key** from the [FlowsBuilt Console](https://console.flowsbuilt.com/signup)
2. **Install the SDK** for the product you need
3. **Start tracking** events and user behavior
4. **React to signals** via webhooks, risk scores, and compliance reports

## Quick examples

<CodeGroup>
  ```typescript ChurnKit — churn risk score theme={null}
  import ChurnKit from '@vgpprasad91/churnkit-sdk'

  const churn = new ChurnKit({ apiKey: 'ck_live_...' })

  await churn.identify('user_123', { plan: 'pro', mrr: 4900 })
  await churn.event('user_123', 'feature_used', { feature: 'export' })

  const risk = await churn.score('user_123')
  console.log(risk.tier)           // 'low' | 'medium' | 'high'
  console.log(risk.recommendation) // 'User is healthy — no action needed.'
  ```

  ```typescript AckKit — policy acknowledgment theme={null}
  import AckKit from 'ackkit'

  const ack = new AckKit({ apiKey: 'ak_live_...' })

  await ack.create({ name: 'terms_of_service', version: 'v3.1', required: true })
  await ack.record('user_123', 'terms_of_service', { version: 'v3.1', method: 'modal_accept' })

  const report = await ack.report('terms_of_service', 'v3.1')
  console.log(report.complianceRate) // 0.818
  ```

  ```typescript GrowthKit — referral program theme={null}
  import GrowthKit from 'growthkit'

  const growth = new GrowthKit({ apiKey: 'gk_live_...' })

  const link = await growth.link('user_123')
  console.log(link.url) // 'https://yourapp.com/signup?ref=abc123'

  await growth.referred(newUserId, { referralCode: 'abc123', email: 'new@user.com' })
  await growth.activated(newUserId) // auto-credits the referrer
  ```

  ```typescript ShareKit — shareable links theme={null}
  import ShareKit from 'sharekit'

  const share = new ShareKit({ apiKey: 'sk_live_...' })

  const link = await share.create('report_4821', { type: 'view', expiresIn: '30d' })
  console.log(link.url) // 'https://yourapp.com/share/shr_01hx...'

  const access = await share.verify(shareId)
  if (access.valid) { /* render content */ }
  ```

  ```typescript BudgetKit — AI spend limits theme={null}
  import BudgetKit from 'budgetkit'
  import Anthropic from '@anthropic-ai/sdk'

  const budget = new BudgetKit({ apiKey: 'bk_live_...' })
  const anthropic = new Anthropic()

  // One-line change — response is identical
  const response = await budget.track(userId, () =>
    anthropic.messages.create({ model: 'claude-sonnet-4-6', max_tokens: 1024, messages })
  )
  ```
</CodeGroup>
