Hippocortex — Billing & Pricing

Version: 1.0.0
Date: 2026-03-12
Status: Design


1. Pricing Tiers

FreeProTeamEnterprise
Price$0/mo$49/mo$299/moCustom
Events/month50,0002,000,00010,000,000Custom
OverageHard cap$0.03/1k events$0.02/1k eventsNegotiated
API rate limit60 req/min1,200 req/min3,000 req/minCustom
Compilations10/day200/dayUnlimitedUnlimited
Syntheses100/day20,000/day100,000/dayUnlimited
Storage retention30 days1 year3 yearsCustom
API keys2UnlimitedUnlimitedUnlimited
Seats11Up to 10 (+$10/seat)Unlimited
SupportCommunityPriority (24h)Priority (12h)Dedicated (4h)
Organizations & RBAC
DashboardBasicFullFull + analyticsCustom
Webhooks
SSO/SAML
SOC 2 readiness✓ (certification planned)
Data residencyEUEUEUEU (more regions planned)

2. Billing Unit: Events

An event is a single capture() call that passes the dedup guard and is ingested into the memory pipeline.

Counted as events:

  • Messages, tool calls, tool results, file edits, test runs, command executions, browser actions, API results
  • Each event in a batch counts individually

NOT counted:

  • Duplicate events (rejected by dedup guard)
  • Failed ingestion attempts
  • learn() calls (counted separately, included in plan)
  • synthesize() calls (counted separately, included in plan)
  • GET /artifacts or GET /metrics calls (read-only)

3. Metering Architecture

┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│   Capture    │────▶│   Redis      │────▶│   Billing    │
│   Service    │     │   Counter    │     │   Service    │
│              │     │   (atomic)   │     │   (hourly    │
│  increment   │     │              │     │    flush)    │
│  on ingest   │     │  per-tenant  │     │              │
└──────────────┘     └──────────────┘     └──────┬───────┘
                                                  │
                                           ┌──────▼───────┐
                                           │   Postgres   │
                                           │   usage_     │
                                           │   counters   │
                                           └──────┬───────┘
                                                  │
                                           ┌──────▼───────┐
                                           │   Stripe     │
                                           │   (monthly   │
                                           │    invoice)  │
                                           └──────────────┘

3.1 Real-Time Counting

# Redis key pattern
hippocortex:usage:{tenant_id}:{yyyy-mm}:events → INCR on each ingest
hippocortex:usage:{tenant_id}:{yyyy-mm}:syntheses → INCR on each synthesis
hippocortex:usage:{tenant_id}:{yyyy-mm}:compilations → INCR on each learn
hippocortex:usage:{tenant_id}:daily:{yyyy-mm-dd}:events → INCR (for daily caps)

3.2 Hourly Flush

A billing worker flushes Redis counters to PostgreSQL hourly:

INSERT INTO usage_records (tenant_id, period_hour, events, syntheses, compilations)
VALUES ($1, date_trunc('hour', now()), $2, $3, $4)
ON CONFLICT (tenant_id, period_hour)
DO UPDATE SET
    events = usage_records.events + EXCLUDED.events,
    syntheses = usage_records.syntheses + EXCLUDED.syntheses,
    compilations = usage_records.compilations + EXCLUDED.compilations;

3.3 Quota Enforcement

On each capture request:
1. INCR Redis counter → get current count
2. If count > plan.eventsLimit:
   - Free tier: Return 429 quota_exceeded
   - Dev/Pro tier: Allow (overage billing)
   - If count == 80% of limit: Queue webhook "quota.warning"
   - If count == 100% of limit: Queue webhook "quota.exceeded"

4. Stripe Integration

4.1 Products & Prices

Products:
  hippocortex_pro:
    price: $49/mo (recurring)
    metadata: { events_limit: 2000000, tier: "pro" }

  hippocortex_team:
    price: $299/mo (recurring)
    metadata: { events_limit: 10000000, tier: "team" }

  hippocortex_events_overage:
    price: metered (usage-based)
    tiers:
      - Pro: $0.03 per 1,000 events
      - Team: $0.02 per 1,000 events

4.2 Billing Cycle

Monthly cycle (subscription anniversary date):
1. Day 1: Reset event counters
2. Day 1: Charge base subscription ($49 or $299)
3. End of month: Calculate overage events
4. End of month + 1 day: Charge overage (if any)
5. Invoice sent via Stripe

4.3 Upgrade/Downgrade

  • Upgrade: Immediate. Prorated charge for remaining days. New limits apply instantly.
  • Downgrade: End of current billing period. Existing data retained per new tier's retention policy.
  • Cancel: End of current billing period. Data retained for 30 days, then purged.

5. Free Tier Limits

The free tier is designed for evaluation and prototyping:

ResourceLimitEnforcement
Events50,000/moHard cap (429 after)
API rate60 req/minHard cap
Compilations10/dayHard cap
Syntheses1,000/dayHard cap
API keys2Hard cap
Storage30-day retentionAuto-purge
DashboardBasic metrics onlyFeature gate

Free tier purpose: Get developers to experience the capture → learn → synthesize loop. Convert to Pro when they need production volume.


6. Enterprise Pricing

Enterprise pricing is negotiated based on:

FactorRange
Monthly event volume10M–1B+
Data retention1–10 years
Compliance requirementsSOC 2 readiness, GDPR
Support SLA24/7, dedicated CSM
Deployment modelShared cloud, dedicated, on-premise
Data residencyEU (additional regions planned)

Minimum annual commitment: $25,000/year
Typical range: $50,000–$500,000/year


7. Usage Dashboard

The billing section of the developer dashboard shows:

┌────────────────────────────────────────────────────────┐
  Current Period: Mar 1  Mar 31, 2026                  
  Plan: Pro ($49/mo)                                    
                                                        
  Events:    ████████░░░░░░░░░░░░  423,000 / 1,000,000 
  Syntheses: ████░░░░░░░░░░░░░░░░   8,200 / 50,000/day 
  Compiles:  ██░░░░░░░░░░░░░░░░░░      12 / 100/day    
                                                        
  Projected monthly cost: $49.00 (no overage)           
  Next billing date: Apr 1, 2026                        
                                                        
  [View detailed usage] [Download invoice] [Upgrade]    
└────────────────────────────────────────────────────────┘

8. Billing Data Model

CREATE TABLE subscriptions (
    id              UUID PRIMARY KEY,
    tenant_id       UUID NOT NULL REFERENCES tenants(id),
    stripe_sub_id   TEXT NOT NULL,
    plan            TEXT NOT NULL,           -- free, pro, team, enterprise
    status          TEXT NOT NULL,           -- active, past_due, canceled
    current_period_start TIMESTAMPTZ NOT NULL,
    current_period_end   TIMESTAMPTZ NOT NULL,
    created_at      TIMESTAMPTZ NOT NULL,
    canceled_at     TIMESTAMPTZ
);

CREATE TABLE usage_records (
    tenant_id       UUID NOT NULL,
    period_hour     TIMESTAMPTZ NOT NULL,
    events          BIGINT DEFAULT 0,
    syntheses       BIGINT DEFAULT 0,
    compilations    BIGINT DEFAULT 0,
    PRIMARY KEY (tenant_id, period_hour)
);

CREATE TABLE invoices (
    id              UUID PRIMARY KEY,
    tenant_id       UUID NOT NULL,
    stripe_inv_id   TEXT NOT NULL,
    period_start    TIMESTAMPTZ NOT NULL,
    period_end      TIMESTAMPTZ NOT NULL,
    base_amount     INTEGER NOT NULL,       -- cents
    overage_amount  INTEGER DEFAULT 0,      -- cents
    total_amount    INTEGER NOT NULL,       -- cents
    status          TEXT NOT NULL,           -- draft, open, paid, void
    created_at      TIMESTAMPTZ NOT NULL
);