Levered Docs

Quick Start

Go from zero to a live optimization in minutes — using the Managed Warehouse and the Levered plugin for Claude Code.

The fastest way to get started:

  • Managed Warehouse — let Levered host the warehouse, so there's nothing to connect.
  • Levered plugin for Claude Code — let Claude create the metric and the optimization for you from a plain-language prompt.

You'll be live in four steps. Each prompt below is a code block — hover it and click Copy, then paste into Claude Code.

Prerequisites

/plugin marketplace add levered-hq/claude-plugin
/plugin install levered@levered

Then authenticate the CLI — the plugin installs it for you, and this opens your browser to sign in:

levered login

1. Use the Managed Warehouse

In the dashboard, go to Settings > Warehouse and click Managed Warehouse ("Hosted by Levered"). That's the whole setup — no BigQuery/Snowflake/Postgres to connect.

See Managed Warehouse for details.

2. Create a metric

A metric is the reward you optimize for. Paste this into Claude (adjust the name to your conversion):

Prompt for Claude Code

Using Levered, create a boolean reward metric named "signup_completed" — I'll send a reward event with this name whenever a user finishes signing up. That's the conversion I want to optimize for.

Claude installs the CLI if needed and creates the metric on the platform.

3. Create an optimization

Now describe what you want to test. Paste this into Claude:

Prompt for Claude Code

Using Levered, set up an A/B test on my sign-up screen — try a few variations of the call-to-action button copy and the hero image, optimizing for the "signup_completed" metric. Analyze my code, create the optimization, and wire up the SDK.

Claude analyzes your code, proposes the variants, creates the optimization in Levered, and wires up the SDK — checking in with you before it makes changes.

4. Track exposures and rewards

With the Managed Warehouse you send events to the ingestion API, authenticated with an API key.

4a. Create an API key

  1. In the dashboard, go to Settings > API Keys.
  2. Create a new key and copy the secret — it's shown once. Store it safely (you can revoke it any time).

4b. Send events

Send an exposure when a user sees a variant, and a reward when they convert. Let Claude wire it into your app — paste:

Prompt for Claude Code

Using Levered, add event tracking to my app via the managed-warehouse ingestion API: POST an exposure to /api/v2/ingest/exposures when a user is shown a variant, and a "signup_completed" reward to /api/v2/ingest/rewards when they finish signing up. Authenticate with the LEVERED_API_KEY environment variable (Authorization: Bearer), use the same anonymous_id on both, and reference the optimization you just created.

Or send the requests directly — authenticate with Authorization: Bearer <api_key>:

# Exposure — which variant the user saw
curl -X POST https://api.levered.dev/api/v2/ingest/exposures \
  -H "Authorization: Bearer $LEVERED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "events": [{
    "anonymous_id": "user_123",
    "optimization_id": "<your-optimization-id>",
    "variant": { "cta": "sign_up_now", "hero": "shield" }
  }] }'

# Reward — the conversion you optimize for
curl -X POST https://api.levered.dev/api/v2/ingest/rewards \
  -H "Authorization: Bearer $LEVERED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "events": [{
    "anonymous_id": "user_123",
    "name": "signup_completed",
    "value": 1
  }] }'

Rewards attribute back to exposures by anonymous_id. See the Managed Warehouse reference for the full field list, batching limits, and response codes.

That's it — Levered starts learning which variant drives the most signup_completed rewards and shifts traffic toward the winners.

Next steps