OpenVerb Framework

A capability-driven application framework for building AI-native apps

Build your application as capabilities (verbs), not pages or routes. Everything else—UI, AI, paywalls, analytics—attaches automatically.

npm versionMIT LicenseGitHub stars

The Problem

Modern apps are built in silos:

❌ Traditional Architecture:
├── UI (React components)
├── API (REST/GraphQL endpoints)
├── AI (separate tool implementations)
├── Paywalls (middleware + custom logic)
└── Analytics (manual tracking)

Each layer duplicates logic and stays disconnected.

The OpenVerb Solution

✅ OpenVerb Architecture:
├── Verb Library (single source of truth)
│   ↓
├── Execution Runtime (one pipeline)
│   ↓
└── Controllers (UI | AI | API | PaywallOS)

Define capabilities once. Everything else just works.

Quick Start

Installation

npm install @openverb/runtime @openverb/policy @openverb/sdk

Define a Verb

{
  "id": "todo.create",
  "version": "1.0.0",
  "summary": "Create a todo item",
  "inputSchema": {
    "type": "object",
    "required": ["title"],
    "properties": {
      "title": { "type": "string" }
    }
  },
  "effects": ["db.write"],
  "handler": "handlers/todo/create"
}

Execute from Anywhere

// UI, AI, API - all use the same execution path
const result = await execute({
  verbId: "todo.create",
  args: { title: "Build amazing apps" },
  actor: currentUser,
  context: { tenantId, planId }
})

Features

🎯 Verb-Driven

Define capabilities once as JSON, execute from anywhere

🔐 Policy Engine

Built-in tier-based authorization and quotas

📊 Observability

Automatic events, receipts, and audit trails

⚡ Type-Safe

Full TypeScript support with strict schemas

🎨 React Ready

Hooks for easy frontend integration

🤖 AI Native

AI controllers use same verbs as UI

Packages

The OpenVerb Framework is published as 4 npm packages:

@openverb/runtime

Core execution engine with validation, policy enforcement, and event emission.

npm install @openverb/runtime

Documentation | npm

@openverb/policy

Policy engine for tier-based authorization, quotas, and access control.

npm install @openverb/policy

Documentation | npm

@openverb/sdk

Client SDK with React hooks for building frontends.

npm install @openverb/sdk

Documentation | npm

@openverb/cli

Developer tools for generating, validating, and managing verbs.

npm install -g @openverb/cli

Documentation | npm

Examples

Todo App

Complete CRUD application demonstrating create, list, and toggle operations.

View Code

Starter App

Minimal setup to get started with OpenVerb.

View Code

Why OpenVerb?

For AI-Native Apps

  • ✅ AI gets verb library introspection automatically
  • ✅ No "tool definition" duplication
  • ✅ AI calls gated by same policy as UI
  • ✅ One source of truth for capabilities

For SaaS Builders

  • ✅ Paywalls enforce at capability level
  • ✅ Tier changes apply instantly
  • ✅ Usage metering built-in
  • ✅ Audit logs for compliance

For Development Teams

  • ✅ Backend changes don't break UI or AI
  • ✅ Capabilities are self-documenting
  • ✅ One execution path to test
  • ✅ Semantic observability

Architecture

┌─────────────────────────────────────────┐
│         Verb Library (JSON)             │
│  - Schemas                              │
│  - Effects                              │
│  - Metadata                             │
└─────────────────┬───────────────────────┘
                  │
                  ▼
┌─────────────────────────────────────────┐
│      Execution Runtime                  │
│  validate → authorize → execute → emit  │
└─────────────────┬───────────────────────┘
                  │
         ┌────────┼────────┐
         ▼        ▼        ▼
      ┌────┐  ┌────┐  ┌────┐
      │ UI │  │ AI │  │API │
      └────┘  └────┘  └────┘

Relationship to OpenVerb Protocol

The OpenVerb Framework builds on the OpenVerb Protocol:

  • Protocol (openverb): Defines verb schema format
  • Framework (@openverb/*): Full-featured runtime, policy, SDK, and tools

Use the protocol for lightweight implementations, or the framework for production applications.

Status

  • Version: 2.0.0-alpha.6
  • Status: Alpha (APIs may change)
  • License: MIT
  • Published: December 2024

Get Started

# Install the framework
npm install @openverb/runtime @openverb/policy @openverb/sdk

# Initialize in your project
npx @openverb/cli init --typescript

# Generate your first verb
npx @openverb/cli generate verb todo.create

# Start building!

View Full Documentation →

Ready to build verb-driven apps?

"Build your app as capabilities. Everything else attaches automatically."

OpenVerb Sandbox

Paste a Verb Library JSON schema here to define what actions the AI can perform.

Ask the AI to perform a task. It will use the vocabulary defined in your library.

The AI proposes a structured action based on your library vocabulary.

Waiting for prompt...

OpenVerb Core intercepts the AI's action and validates it before execution.

Verb exists in library
Payload matches JSON Schema
Policy requirements passed
Inputs valid and sanitized

The validated action is routed to the application backend for execution.

Waiting...

OpenVerb Core generates an execution receipt for full auditability.

Waiting for execution...