Hippocortex — Billing & Pricing
Version: 1.0.0
Date: 2026-03-12
Status: Design
1. Pricing Tiers
| Free | Pro | Team | Enterprise | |
|---|---|---|---|---|
| Price | $0/mo | $49/mo | $299/mo | Custom |
| Events/month | 50,000 | 2,000,000 | 10,000,000 | Custom |
| Overage | Hard cap | $0.03/1k events | $0.02/1k events | Negotiated |
| API rate limit | 60 req/min | 1,200 req/min | 3,000 req/min | Custom |
| Compilations | 10/day | 200/day | Unlimited | Unlimited |
| Syntheses | 100/day | 20,000/day | 100,000/day | Unlimited |
| Storage retention | 30 days | 1 year | 3 years | Custom |
| API keys | 2 | Unlimited | Unlimited | Unlimited |
| Seats | 1 | 1 | Up to 10 (+$10/seat) | Unlimited |
| Support | Community | Priority (24h) | Priority (12h) | Dedicated (4h) |
| Organizations & RBAC | — | — | ✓ | ✓ |
| Dashboard | Basic | Full | Full + analytics | Custom |
| Webhooks | — | ✓ | ✓ | ✓ |
| SSO/SAML | — | — | — | ✓ |
| SOC 2 readiness | — | — | — | ✓ (certification planned) |
| Data residency | EU | EU | EU | EU (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 /artifactsorGET /metricscalls (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:
| Resource | Limit | Enforcement |
|---|---|---|
| Events | 50,000/mo | Hard cap (429 after) |
| API rate | 60 req/min | Hard cap |
| Compilations | 10/day | Hard cap |
| Syntheses | 1,000/day | Hard cap |
| API keys | 2 | Hard cap |
| Storage | 30-day retention | Auto-purge |
| Dashboard | Basic metrics only | Feature 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:
| Factor | Range |
|---|---|
| Monthly event volume | 10M–1B+ |
| Data retention | 1–10 years |
| Compliance requirements | SOC 2 readiness, GDPR |
| Support SLA | 24/7, dedicated CSM |
| Deployment model | Shared cloud, dedicated, on-premise |
| Data residency | EU (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
);