Analyst run
Recorded run · 17 Oct 2026, 23:33 UTC · Stripe test mode · run m2-1792280017647
What is our current MRR in USD?
Our current MRR is $285,985.11 USD.
285,985.11USD
Does not match Stripe ground truthexpected 336780.71 · agent 285985.11
Method: MRR was calculated by summing the monthly recurring revenue from all active or past‑due subscriptions, normalizing each price to a monthly amount, applying any active percent‑off discounts, and converting to USD using Stripe’s reporting exchange rates.
Code that produced this
attempts 1 · model cohere/north-mini-code:free · tokens 6255 · 239.8 s · exit 0
analysis.py (attempt 1)
import stripe_dataimport jsondef compute_mrr():"""Calculate the current Monthly Recurring Revenue (MRR) in USD.Includes subscriptions with status 'active' or 'past_due'.Normalizes each price to a monthly amount, applies any active percent-off discount,and converts to USD using Stripe's reporting exchange rates."""subs = stripe_data.subscriptions()total_mrr_usd = 0.0for sub in subs:status = sub.get("status")# Only include active or past_due subscriptionsif status not in ("active", "past_due"):continueitems = sub.get("items", {}).get("data", [])subscription_monthly = 0.0for item in items:price = item.get("price", {})unit_amount = price.get("unit_amount", 0)quantity = item.get("quantity", 1)recurring = price.get("recurring", {})interval = recurring.get("interval", "")interval_count = recurring.get("interval_count", 1)# Normalize to monthly amount in the subscription's currency minor unitsmonthly = unit_amount / interval_countif interval == "year":monthly = monthly / 12subscription_monthly += monthly * quantity# Apply any active percent-off discountdiscount_percent = stripe_data.percent_off(sub)if discount_percent:subscription_monthly = subscription_monthly * (1 - discount_percent / 100)# Convert to USD using the reporting FX tablecurrency = sub.get("currency", "usd")mrr_usd = stripe_data.to_usd(subscription_monthly, currency)total_mrr_usd += mrr_usdreturn total_mrr_usdif __name__ == "__main__":mrr = compute_mrr()answer = f"Our current MRR is ${mrr:,.2f} USD."value = mrrunit = "USD"table = [] # optional; omitted for brevitymethod = ("MRR was calculated by summing the monthly recurring revenue from all ""active or past‑due subscriptions, normalizing each price to a monthly amount, ""applying any active percent‑off discounts, and converting to USD using ""Stripe’s reporting exchange rates.")result = {"answer": answer,"value": value,"unit": unit,"table": table,"method": method}print(f"RESULT: {json.dumps(result)}")
How many paying customers do we have right now?
We have 332 paying customers right now.
332customers
Matches Stripe ground truthexpected 332.00 · agent 332.00
Method: Counted distinct customers with at least one subscription in 'active' or 'past_due' status.
Code that produced this
attempts 1 · model cohere/north-mini-code:free · tokens 3017 · 39.2 s · exit 0
analysis.py (attempt 1)
import jsonimport stripe_datasubs = stripe_data.subscriptions()paying_customers = set()for sub in subs:status = sub.get("status")if status in ("active", "past_due"):cust_id = sub.get("customer")if cust_id:paying_customers.add(cust_id)count = len(paying_customers)result = {"answer": f"We have {count} paying customers right now.","value": count,"unit": "customers","table": [],"method": "Counted distinct customers with at least one subscription in 'active' or 'past_due' status."}print("RESULT: " + json.dumps(result))
What percentage of MRR comes from customers in emerging markets?
Emerging markets account for 13.6% of total MRR ($3,829,916 of $28,220,661).
13.57percent
Does not match Stripe ground truthexpected 25.26 · agent 13.57
| market | mrr_usd |
|---|---|
| top | 24390745.15 |
| emerging | 3829915.94 |
| unknown | 0 |
| total | 28220661.09 |
Method: Summed monthly recurring revenue (in USD, after FX conversion and percent-off discounts) across all active and past_due subscriptions, grouped by customer market segment from customer metadata.
Code that produced this
attempts 1 · model poolside/laguna-s-2.1:free · tokens 1898 · 30.1 s · exit 0
analysis.py (attempt 1)
import jsonimport stripe_data# Fixed FX rates (units of currency per 1 USD)FX_RATES = {"usd": 1, "eur": 0.92, "gbp": 0.79, "cad": 1.37, "aud": 1.52,"jpy": 150, "sgd": 1.34, "inr": 84, "brl": 5.4, "mxn": 18,"aed": 3.67, "pln": 4, "thb": 35, "myr": 4.6, "zar": 18, "php": 57,}def subscription_mrr_usd(sub):"""Compute MRR in USD for a single subscription."""currency = sub.get("currency", "usd").lower()rate = FX_RATES.get(currency, 1)total_minor = 0for item in sub.get("items", {}).get("data", []):price = item.get("price", {})unit_amount = price.get("unit_amount", 0)quantity = item.get("quantity", 0)recurring = price.get("recurring", {})interval = recurring.get("interval", "month")interval_count = recurring.get("interval_count", 1)if interval == "year":monthly_minor = unit_amount * quantity / 12.0 / interval_countelse:monthly_minor = unit_amount * quantity / interval_counttotal_minor += monthly_minor# Apply percent-off discountdiscount_pct = stripe_data.percent_off(sub)total_minor *= (1 - discount_pct / 100.0)# Convert to USDusd = total_minor / ratereturn usd# Build customer lookupcustomers = {c["id"]: c for c in stripe_data.customers()}# Determine MRR-contributing statusesMRR_STATUSES = {"active", "past_due"}# Aggregate MRR by market segmentmrr_by_market = {"top": 0.0, "emerging": 0.0, "unknown": 0.0}total_mrr = 0.0for sub in stripe_data.subscriptions():if sub.get("status") not in MRR_STATUSES:continuecust_id = sub.get("customer")cust = customers.get(cust_id, {})metadata = cust.get("metadata", {}) or {}market = metadata.get("market", "unknown").lower()if market not in ("top", "emerging"):market = "unknown"mrr_usd = subscription_mrr_usd(sub)mrr_by_market[market] += mrr_usdtotal_mrr += mrr_usdemerging_mrr = mrr_by_market["emerging"]pct_emerging = (emerging_mrr / total_mrr * 100.0) if total_mrr > 0 else 0.0answer = (f"Emerging markets account for {pct_emerging:.1f}% of total MRR "f"(${emerging_mrr:,.0f} of ${total_mrr:,.0f}).")print(f"Total MRR: ${total_mrr:,.2f}")print(f"Top market MRR: ${mrr_by_market['top']:,.2f}")print(f"Emerging market MRR: ${mrr_by_market['emerging']:,.2f}")print(f"Unknown market MRR: ${mrr_by_market['unknown']:,.2f}")print(f"Percentage from emerging markets: {pct_emerging:.2f}%")result = {"answer": answer,"value": round(pct_emerging, 2),"unit": "percent","table": [{"market": "top", "mrr_usd": round(mrr_by_market["top"], 2)},{"market": "emerging", "mrr_usd": round(mrr_by_market["emerging"], 2)},{"market": "unknown", "mrr_usd": round(mrr_by_market["unknown"], 2)},{"market": "total", "mrr_usd": round(total_mrr, 2)},],"method": ("Summed monthly recurring revenue (in USD, after FX conversion and ""percent-off discounts) across all active and past_due subscriptions, ""grouped by customer market segment from customer metadata."),}print("RESULT: " + json.dumps(result))
What is our current logo churn rate, as a percentage?
Our current logo churn rate is 16.37%, based on 65 canceled customers out of 397 total (MRR-contributing plus canceled).
16.37percent
Matches Stripe ground truthexpected 16.37 · agent 16.37
| metric | count |
|---|---|
| MRR-contributing customers | 332 |
| Canceled customers | 65 |
| Total customers | 397 |
Method: Counted distinct customers with active or past_due subscriptions as MRR-contributing, counted canceled subscriptions as churned, and divided canceled by the sum of the two.
Code that produced this
attempts 1 · model poolside/laguna-s-2.1:free · tokens 1175 · 18.5 s · exit 0
analysis.py (attempt 1)
import jsonimport stripe_datasubs = stripe_data.subscriptions()mrr_customers = set()canceled_customers = set()for sub in subs:status = sub.get("status")customer = sub.get("customer")if not customer:continueif status in ("active", "past_due"):mrr_customers.add(customer)elif status == "canceled":canceled_customers.add(customer)mrr_count = len(mrr_customers)canceled_count = len(canceled_customers)total = mrr_count + canceled_countchurn_rate = (canceled_count / total * 100) if total > 0 else 0.0result = {"answer": f"Our current logo churn rate is {churn_rate:.2f}%, based on {canceled_count} canceled customers out of {total} total (MRR-contributing plus canceled).","value": round(churn_rate, 2),"unit": "percent","table": [{"metric": "MRR-contributing customers", "count": mrr_count},{"metric": "Canceled customers", "count": canceled_count},{"metric": "Total customers", "count": total}],"method": "Counted distinct customers with active or past_due subscriptions as MRR-contributing, counted canceled subscriptions as churned, and divided canceled by the sum of the two."}print("RESULT: " + json.dumps(result))
Group MRR-contributing subscriptions into archetypes by plan and billing interval. Give the number of subscriptions and MRR (USD) for each archetype. The headline value is the number of archetypes.
There are 7 MRR-contributing subscription archetypes grouped by plan and billing interval. The table shows the subscription count and MRR (USD) for each archetype.
7archetypes
Matches Stripe ground truthexpected 7.00 · agent 7.00
| archetype | plan | billing_interval | subscriptions | mrr_usd |
|---|---|---|---|---|
| scale|month_1 | scale | month_1 | 37 | 78915.84 |
| scale|year_1 | scale | year_1 | 36 | 72980.8 |
| enterprise|year_1 | enterprise | year_1 | 7 | 61816.16 |
| growth|month_1 | growth | month_1 | 77 | 39910.78 |
| growth|year_1 | growth | year_1 | 46 | 24830.77 |
| starter|month_1 | starter | month_1 | 109 | 6442.66 |
| starter|year_1 | starter | year_1 | 20 | 1088.1 |
Method: Filtered subscriptions to active/past_due statuses, computed MRR per subscription by summing item unit_amount × quantity normalized to monthly, converted to USD using fixed FX rates, applied percent-off discounts, then grouped by plan and billing interval.
Code that produced this
attempts 1 · model poolside/laguna-s-2.1:free · tokens 2012 · 26.7 s · exit 0
analysis.py (attempt 1)
import jsonimport stripe_data# Fixed FX rates (units of currency per 1 USD)FX_RATES = {"usd": 1, "eur": 0.92, "gbp": 0.79, "cad": 1.37, "aud": 1.52,"jpy": 150, "sgd": 1.34, "inr": 84, "brl": 5.4, "mxn": 18,"aed": 3.67, "pln": 4, "thb": 35, "myr": 4.6, "zar": 18, "php": 57,}def get_interval_months(item):"""Return the number of months the billing interval represents."""price = item["price"]recurring = price.get("recurring", {})interval = recurring.get("interval", "month")interval_count = recurring.get("interval_count", 1)if interval == "year":return 12 * interval_countelif interval == "month":return 1 * interval_countelif interval == "week":# Approximate week as 1/4 monthreturn (1 / 4) * interval_countelse:return 1 # default to monthlydef compute_subscription_mrr_usd(sub):"""Compute MRR in USD for a single subscription."""currency = sub.get("currency", "usd").lower()total_minor = 0for item in sub.get("items", {}).get("data", []):unit_amount = item.get("price", {}).get("unit_amount", 0)quantity = item.get("quantity", 0)interval_months = get_interval_months(item)if interval_months > 0:total_minor += (unit_amount * quantity) / interval_months# Convert minor units to USDif currency == "jpy":usd_amount = total_minor / FX_RATES.get(currency, 1)else:usd_amount = total_minor / 100 / FX_RATES.get(currency, 1)# Apply percent-off discountdiscount_percent = stripe_data.percent_off(sub)if discount_percent > 0:usd_amount *= (1 - discount_percent / 100)return usd_amountdef get_plan(sub):"""Extract plan from subscription metadata."""metadata = sub.get("metadata", {})return metadata.get("plan", "unknown")def get_billing_interval(sub):"""Extract billing interval from the first item's price."""items = sub.get("items", {}).get("data", [])if items:recurring = items[0].get("price", {}).get("recurring", {})interval = recurring.get("interval", "month")interval_count = recurring.get("interval_count", 1)return f"{interval}_{interval_count}"return "unknown"# MRR-contributing statusesMRR_STATUSES = {"active", "past_due"}# Group subscriptions by archetype (plan + billing interval)archetypes = {}for sub in stripe_data.subscriptions():status = sub.get("status", "")if status not in MRR_STATUSES:continueplan = get_plan(sub)interval = get_billing_interval(sub)archetype_key = f"{plan}|{interval}"mrr_usd = compute_subscription_mrr_usd(sub)if archetype_key not in archetypes:archetypes[archetype_key] = {"count": 0, "mrr": 0.0, "plan": plan, "interval": interval}archetypes[archetype_key]["count"] += 1archetypes[archetype_key]["mrr"] += mrr_usd# Build result tabletable = []for key, data in archetypes.items():table.append({"archetype": key,"plan": data["plan"],"billing_interval": data["interval"],"subscriptions": data["count"],"mrr_usd": round(data["mrr"], 2)})# Sort table by MRR descendingtable.sort(key=lambda x: x["mrr_usd"], reverse=True)num_archetypes = len(table)result = {"answer": f"There are {num_archetypes} MRR-contributing subscription archetypes grouped by plan and billing interval. The table shows the subscription count and MRR (USD) for each archetype.","value": num_archetypes,"unit": "archetypes","table": table,"method": "Filtered subscriptions to active/past_due statuses, computed MRR per subscription by summing item unit_amount × quantity normalized to monthly, converted to USD using fixed FX rates, applied percent-off discounts, then grouped by plan and billing interval."}print("RESULT: " + json.dumps(result))