Part of the OpenVerb Ecosystem

OpenVerb Standard Library

The starter verbs every app should have

Theme, navigation, search, modals, toasts, forms, and sessions. A common baseline so your AI agent can immediately operate any site — without DOM hacks or brittle selectors.

npm versionMIT License19 verbs7 families

What This Is

The Standard Library is not a complete list of all possible verbs. OpenVerb is designed so developers create their own verb libraries for their own domains. This stdlib gives you the starter verbs that virtually every app needs, so an AI agent can immediately:

  • Switch themes (light/dark/system)
  • Navigate pages and discover routes
  • Search on-site content
  • Show toast notifications
  • Open and close modals
  • Fill and submit forms
  • Check session and preferences

7 families, 19 verbs. Your app adds its own verb libraries on top of these for domain-specific actions.

Verb Families (Level 0)

FamilyVerbsPurpose
ui.themeget, setTheme (light/dark/system)
ui.navlist_pages, go, backNavigation & route discovery
ui.searchquery, open_resultOn-site search
ui.toastshow, dismissNotifications & feedback
ui.modalopen, close, listModal dialogs
ui.formlist, fill, submit, resetForm interaction
user.sessionget, logout, get_preferencesUser session & preferences

Quick Start

1. Install

# npm
npm install openverb @openverb/stdlib

# Python (copy manifests from repo)
pip install openverb

2. Use the manifests

The JSON verb definitions live in manifests/. Import them or load from the package:

import { findVerb, getAllVerbs } from "@openverb/stdlib";

// Get a specific verb definition
const uiNavGo = findVerb("ui.nav.go");

// Get all 19 starter verbs
const verbs = getAllVerbs();

3. Implement handlers

Use one of the reference implementations or write your own. The stdlib includes:

  • Vanilla JSreference/vanilla/verbs.js
  • Reactreference/react/useOpenVerb.ts
  • Next.jsreference/nextjs/verbs.ts

4. Wire up your AI

When your AI receives a verb call, dispatch it to your handler. The client applies the effect (e.g. router.push(path) for navigation).

Example: The "Accounting Page" Flow

This is the canonical flow that makes AI navigation feel natural:

  1. User: "I want to know about the accounting stuff"
  2. AI calls ui.nav.list_pages
  3. AI sees a route with tags matching "accounting"
  4. AI: "There's an Accounting page. Do you want me to take you there?"
  5. User: "Yes"
  6. AI calls ui.nav.go({ routeId: "accounting" })
  7. Client navigates to /accounting

The key: maintain a route registry so the AI knows what pages exist. The AI uses id to navigate — it never guesses URLs.

Design Principles

Framework-agnostic core

Manifests are JSON. Handlers are framework-specific (vanilla, React, Next.js).

Deterministic

The AI uses registries (routes, modals, forms) — no guessing URLs or selectors.

Auditable

Every verb call has typed input/output. Log, replay, and review.

Composable

Verbs are small and independent. Combine them for complex flows.

Part of the OpenVerb Ecosystem

The Standard Library is the verb catalog layer. It works with the OpenVerb Framework packages:

PackagePurpose
@openverb/stdlibStandard verb definitions (this package)
@openverb/runtimeExecution runtime
@openverb/sdkClient SDK & React hooks
openverbCore framework (npm & PyPI)