averment
v0.1.4
Published
Safety and execution control infrastructure for AI automated systems.
Readme
Averment
Safety and execution control infrastructure for AI automated systems.
Beta — This SDK is under active development. APIs may change between releases.
Install
npm install avermentQuick Start
import Averment from "averment";
const averment = new Averment({
apiKey: process.env.AVERMENT_API_KEY,
engine: "dde-test",
});
// Safe execution — only runs if allowed
await averment.decide(
{ summary: "AI agent deleting production records" },
async () => executeAction(),
);What It Does
Averment sits between intent and execution. It evaluates proposed actions in real-time using hybrid (both LLM and deterministic) reasoning, behavioral pattern detection and compiled policy evaluation.
Every decision returns an enforcement action:
| Action | Meaning |
| --------- | ------------------------------------- |
| allow | Safe to execute |
| caution | Moderate risk; proceed with awareness |
| review | High risk; requires active attention |
| block | Must not execute |
Usage Patterns
With handlers
await averment.decide({
summary: "User initiating payment",
context: { amount: 50000, device_new: true },
handlers: {
allow: async () => processPayment(),
review: async () => requireOTP(),
caution: async () => queueForReview(),
block: async () => denyAction(),
},
});With strategies
await averment.decide(
{ summary: "User login from new device", context: { device_new: true } },
async () => createSession(),
{
strategy: "confirm_review",
confirmReview: async () => await verifyOTP(),
},
);BYOLLM
const averment = new Averment({
apiKey: process.env.AVERMENT_API_KEY,
engine: "dde-test",
llm: {
provider: "openai",
model: "gpt-4o",
apiKey: process.env.OPENAI_API_KEY,
},
});Your LLM credentials are never stored or logged.
License
MIT
