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

All 19 Verbs

Every verb in @openverb/stdlib, with its inputs and outputs. Fields marked * are required. This table is generated from the package itself, so it always matches what you install.

VerbWhat it doesInputsReturns
ui.theme.getGet the current application theme (light, dark, or system)none
mode: light | dark | system
resolved: light | dark
ui.theme.setSet the application theme (light, dark, or system)
mode*: light | dark | system
success: boolean
mode: string
previousMode: string
ui.nav.list_pagesList all navigable pages/routes in the app. Use this so the AI knows what pages exist and can propose navigation.none
routes: array
ui.nav.goNavigate to a page. Pass routeId (from list_pages) or path. Client applies navigation when verb succeeds.
routeId: string
path: string
success: boolean
path: string
ui.nav.backNavigate back in browser historynone
success: boolean
ui.search.querySearch the app's content. Returns a list of results the AI can present or act on.
query*: string
scope: string
limit: number
results: array
total: number
ui.search.open_resultOpen a search result by id. Navigates the user to the result.
resultId*: string
success: boolean
url: string
ui.toast.showShow a toast notification to the user. Use for confirmations, warnings, or transient messages.
message*: string
variant: info | success | warning | error
duration: number
success: boolean
toastId: string
ui.toast.dismissDismiss a toast notification by id, or dismiss all toasts.
toastId: string
success: boolean
ui.modal.openOpen a modal by id. The app registers named modals; the AI triggers them by id.
modalId*: string
data: object
success: boolean
modalId: string
ui.modal.closeClose the currently open modal, or a specific modal by id.
modalId: string
success: boolean
ui.modal.listList all registered modals the AI can open.none
modals: array
ui.form.listList all registered forms on the current page or view.none
forms: array
ui.form.fillFill form fields with values. Does not submit — use ui.form.submit after filling.
formId*: string
values*: object
success: boolean
filled: array
ui.form.submitSubmit a form by id. Returns validation errors if the form is invalid.
formId*: string
success: boolean
errors: array
ui.form.resetReset a form to its default values.
formId*: string
success: boolean
user.session.getGet the current user's session info. Returns auth status, display name, and role. Never exposes tokens or passwords.none
authenticated: boolean
user: object
user.session.logoutLog the user out. Requires explicit user confirmation before the AI calls this.
confirmed*: boolean
success: boolean
user.session.get_preferencesGet the current user's preferences (language, timezone, notification settings, etc.).none
preferences: object

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 JS — reference/vanilla/verbs.js
  • React — reference/react/useOpenVerb.ts
  • Next.js — reference/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)
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...