A paradigm shift from imperative to declarative access control, powered by semantic verbs and artificial intelligence.
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.
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.
Verbs are described in plain language, not code. AI can reason about them naturally.
Describe your app in English → AI generates complete OpenVerb library with proper categorization and descriptions.
Provider component automatically intercepts verb= attributes. No manual wiring needed.
Write policies in plain English → AI enforces. "Free users get 10 exports/month, students get 50% off Pro."
PaywallOS explores the spectrum from fully structured (JSON schemas) to fully unstructured (natural language manifestos), studying the tradeoffs at each point.
{
"verbs": [{
"name": "export_csv",
"category": "data"
}]
}{
"name": "export_csv",
"policy": "Pro users
get 100/month,
Enterprise unlimited"
}Free users can create 10 tasks. Pro users get unlimited tasks and CSV exports.
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.
The current implementation uses database queries for speed and reliability. Perfect for production use today.
Use OpenAI GPT-4 for intelligent upgrade messages. Fast to implement but costs scale with usage.
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.
Best for structured reasoning
Fast, efficient, good quality
State-of-the-art small model
Trained on your policies
PaywallOS opens up an entirely new field of study. We invite researchers, developers, and companies to explore these questions with us.
How does policy enforcement accuracy change as we move from structured JSON to unstructured natural language? What's the optimal balance?
Can 7-8B parameter models match GPT-4 accuracy on access control tasks? What's the minimum model size for production use?
How much faster is semantic verb implementation compared to traditional if/else logic? What's the learning curve?
Can AI effectively handle time-based, user-behavior-based, or system-load-based access policies written in natural language?
How much better can small models perform when fine-tuned specifically on access control reasoning tasks?
We're committed to open research and plan to publish our findings in academic conferences and open-access journals. Stay tuned for papers on:
Introducing OpenVerb and the semantic paywall paradigm
Evaluating 7-8B models on real-world access control tasks