vesanor
v1.0.18
Published
LLM function calling reliability platform. Validate, monitor, and gate tool-call behavior.
Maintainers
Readme
Vesanor
Vesanor is an LLM function-calling reliability platform. It validates, monitors, and gates tool-call behavior across providers using a runtime SDK, deterministic contracts, replay evidence, and Governance Studio.
The main public path is:
- wrap your OpenAI or Anthropic client with
replay() - run real traffic through the wrapped client
- review inferred behavior in Governance Studio
- approve the runtime artifact when ready
- let Vesanor monitor, advise, or enforce based on environment
No local YAML contracts are required for the default workflow.
Install
Install Vesanor with the provider SDK you use:
npm install vesanor openaior:
npm install vesanor @anthropic-ai/sdkRequires Node.js 18 or newer.
Quick Start
import OpenAI from "openai";
import { replay } from "vesanor";
const client = new OpenAI();
const session = replay(client, {
apiKey: process.env.VESANOR_API_KEY,
agent: "orders-bot",
});
const response = await session.client.chat.completions.create({
model: "gpt-4o-mini",
messages: [{ role: "user", content: "Process this order" }],
tools: myToolDefinitions,
});That is enough to start zero-config governance. Vesanor captures runtime evidence, builds review state for Governance Studio, and attaches approved runtime behavior after you approve.
What It Does
- Runtime governance:
replay()wraps provider clients and observes tool-call behavior in real traffic. - Studio review: Governance Studio shows inferred drafts, open judgments, impact preview, approval preview, and conformance findings.
- Provider-agnostic contracts: the same contract model applies across OpenAI, Anthropic, Gemini, and local providers.
- Fail-closed enforcement: production governance fails closed when approved authority is unavailable or invalid.
- Failure classification: failures get stable categories and fingerprints for repeatable investigation.
- Replay evidence: requests, responses, tool definitions, and decisions can be replayed and compared.
Runtime Behavior
After approval, zero-config governance uses the runtime environment to choose behavior:
| Environment | Behavior |
| --- | --- |
| development | non-blocking monitor behavior |
| staging | advisory compatibility evaluation |
| production | protective fail-closed enforcement |
Set the environment explicitly or let the SDK derive it:
const session = replay(client, {
apiKey: process.env.VESANOR_API_KEY,
agent: "orders-bot",
environment: "production",
});Configuration
Common SDK settings:
| Option | Purpose |
| --- | --- |
| apiKey | Vesanor API key. Usually process.env.VESANOR_API_KEY. |
| agent | Stable name for the wrapped agent or workflow. |
| environment | Runtime target such as development, staging, or production. |
| runtimeUrl | Optional override for the hosted runtime base URL. |
Provider credentials are separate from Vesanor credentials. Configure your provider SDK the way you normally would:
export VESANOR_API_KEY="vsn_..."
export OPENAI_API_KEY="sk-..."
# or
export ANTHROPIC_API_KEY="sk-ant-..."Exports
The public package exports the runtime SDK from the package root:
import {
replay,
observe,
validate,
MemoryStore,
ReplayContractError,
ReplayKillError,
ReplayConfigError,
} from "vesanor";CommonJS works too:
const { replay } = require("vesanor");CLI
The same package also includes the vesanor CLI for local packs, recorded-provider tests, sync, doctor checks, and replay workflows.
npx vesanor init
npx vesanorTo run a local contract pack against a live provider:
VESANOR_PROVIDER_KEY="sk-..." npx vesanor --provider openai --model gpt-4o-miniThe CLI/local-pack lane is useful for deterministic contract testing and CI. The default hosted product flow starts with replay() and Governance Studio.
Documentation
License
ISC
