Research & Vision

The AI-Native Paywall Manifesto

A paradigm shift from imperative to declarative access control, powered by semantic verbs and artificial intelligence.

The Problem We're Solving

Traditional Paywalls Are Broken

Every SaaS company reinvents the wheel, writing thousands of lines of if/else logic to gate features behind subscription tiers.

// Traditional approach: Brittle, repetitive, unmaintainable
function handleExport() {
  if (!user.subscription) {
    showUpgradeModal("You need a subscription")
  } else if (user.plan === 'free') {
    showUpgradeModal("Upgrade to Pro")
  } else if (user.plan === 'pro' && usage >= limit) {
    showUpgradeModal("Usage limit exceeded")
  } else if (feature === 'advanced' && user.plan !== 'enterprise') {
    showUpgradeModal("Enterprise only")
  } else {
    // Finally do the thing
    exportData()
  }
}

With 100+ features, this becomes 10,000+ lines of unmaintainable spaghetti code.

The OpenVerb Paradigm Shift

Semantic, Declarative, AI-Native

Instead of writing logic, define what users can do in plain language. Let AI handle the how.

<!-- PaywallOS approach: Semantic, maintainable, AI-powered -->
<button verb="export_data">Export</button>

<!-- That's it. No logic needed. -->

The `verb=` attribute connects to your OpenVerb library. PaywallOS AI reads the library, checks user tier, enforces access automatically.

What Makes This AI-Native?
1

Semantic Verbs

Verbs are described in plain language, not code. AI can reason about them naturally.

2

AI Assistant

Describe your app in English → AI generates complete OpenVerb library with proper categorization and descriptions.

3

Automatic Enforcement

Provider component automatically intercepts verb= attributes. No manual wiring needed.

4

Future: Natural Language Policies

Write policies in plain English → AI enforces. "Free users get 10 exports/month, students get 50% off Pro."

The Research Spectrum: Structured → Unstructured

PaywallOS explores the spectrum from fully structured (JSON schemas) to fully unstructured (natural language manifestos), studying the tradeoffs at each point.

Structured
Current OpenVerb (v1.0)
Format:
{
  "verbs": [{
    "name": "export_csv",
    "category": "data"
  }]
}
Pros:
  • Fast (10ms checks)
  • Predictable
  • Easy to debug
  • No AI costs
Status:Production Ready
Semi-Structured
Hybrid approach
Format:
{
  "name": "export_csv",
  "policy": "Pro users 
   get 100/month,
   Enterprise unlimited"
}
Pros:
  • More flexible
  • Natural language policies
  • AI for edge cases
Status:Research Phase
Unstructured
Natural language manifesto
Format:
Free users can create 
10 tasks. Pro users 
get unlimited tasks 
and CSV exports.
Pros:
  • Most natural
  • Easy to write/update
  • Handles complexity
Status:Future Vision

Open Source AI Models

To enable true AI-native enforcement at scale, we're exploring open source language models that can be self-hosted for zero marginal cost per check.

Current: Database-Only (Fast & Free)
10ms checks, $0 AI costs, 100% reliable

The current implementation uses database queries for speed and reliability. Perfect for production use today.

Option: Hosted AI (OpenAI)
~$0.001 per check, contextual messages

Use OpenAI GPT-4 for intelligent upgrade messages. Fast to implement but costs scale with usage.

Future: Self-Hosted Open Source
$50-200/month server, unlimited checks

Models like Llama 3.1 8B, Mistral 7B, or Qwen 2.5 can run on a single GPU and provide excellent policy enforcement with zero marginal cost.

Llama 3.1 8B

Best for structured reasoning

Mistral 7B

Fast, efficient, good quality

Qwen 2.5 7B

State-of-the-art small model

Custom Fine-tuned

Trained on your policies

Open Research Questions

PaywallOS opens up an entirely new field of study. We invite researchers, developers, and companies to explore these questions with us.

1. Accuracy vs Structure Tradeoff

How does policy enforcement accuracy change as we move from structured JSON to unstructured natural language? What's the optimal balance?

2. Small Model Effectiveness

Can 7-8B parameter models match GPT-4 accuracy on access control tasks? What's the minimum model size for production use?

3. Developer Experience Impact

How much faster is semantic verb implementation compared to traditional if/else logic? What's the learning curve?

4. Context-Aware Policies

Can AI effectively handle time-based, user-behavior-based, or system-load-based access policies written in natural language?

5. Fine-Tuning for Policy Enforcement

How much better can small models perform when fine-tuned specifically on access control reasoning tasks?

Publishing Our Findings

We're committed to open research and plan to publish our findings in academic conferences and open-access journals. Stay tuned for papers on:

"From Imperative to Declarative: AI-Native Access Control"

Introducing OpenVerb and the semantic paywall paradigm

"Small Models for Policy Enforcement: A Benchmark Study"

Evaluating 7-8B models on real-world access control tasks

Join the Research

Contribute to OpenVerb, collaborate on research, or build on PaywallOS infrastructure.