Skip to main content

Overview

The official Velatir SDK for TypeScript and JavaScript provides a simple decorator-based approach to add human-in-the-loop approval to your functions. Simply decorate any function with @reviewTask() and Velatir will:
  • Intercept function calls and create approval requests
  • Route requests through your configured agents
  • Wait for human approval before executing sensitive operations
  • Handle denials gracefully with detailed feedback

Quick Example

Installation & Documentation

Get the latest version and complete documentation from npm:

@velatir/sdk on npm

Install with npm install @velatir/sdk - includes full API reference, examples, and TypeScript support

Features

  • Decorator-based integration - Just add @reviewTask() to any function
  • Full TypeScript support - Complete type safety and IntelliSense
  • Async/sync support - Works with both synchronous and asynchronous functions
  • Configurable polling - Customise approval timeout and retry behaviour
  • Rich metadata - Add context for better approval routing
  • Error handling - Graceful handling of denials with feedback

Python SDK

Python integration with decorators

LangChain Integration

Native LangChain middleware