Skip to main content

SOVIGL — AI agent payment governance SDK. Returns approved, pending, or blocked.

Project description

SOVIGL

Policy enforcement and audit layer for AI agents.

Every action your AI takes - governed before it executes. pip install sovigl

What it does

SOVIGL sits between your AI agent and the action it wants to take. Before anything executes - payment, approval, data operation

  • SOVIGL evaluates it against your policy and returns one of three outcomes:

  • APPROVED - executes immediately

  • PENDING - held for human approval

  • BLOCKED - stopped permanently

Every decision is permanently recorded with a unique ID, plain English explanation, risk score, and the exact policy version that triggered it.

Demo credentials & base URL

  • org_id: demo_fintech by default (the server can override via SOVIGL_DEMO_ORG_ID).
  • api_key: use demo_key_123 as the demo default. Keep it the same plaintext as Railway variable SOVIGL_DEMO_API_KEY so it matches the hash stored for the demo org (or replace both with your own value).
  • Base URL: set SOVIGL_BASE_URL and default to https://api.sovigl.com in SDK integrations. Use your own custom domain when not using the demo deployment.

Quick start

import sovigl

sovigl.configure(api_key="your-key", org_id="your-org")

decision = sovigl.evaluate(
    action="payment.create",
    context={
        "amount": 5000,
        "role": "employee",
        "user_id": "user_123",
        "agent_id": "invoice_bot"
    }
)

print(decision.status)               # approved
print(decision.decision_id)          # permanent audit ID
print(decision.reason)               # why it was approved
print(decision.risk_assessment)      # risk score 0.0-1.0
print(decision.explanation_registry) # full explainability
print(decision.policy_version)       # which policy version
print(decision.approved)             # True

Demo - no signup needed

Try it instantly with the demo org. Defaults use demo_fintech and the demo key demo_key_123 (set the same value in SOVIGL_DEMO_API_KEY):

import sovigl

# Optional: explicit configure if your Railway demo key differs
# sovigl.configure(api_key="demo_key_123", org_id="demo_fintech")

decision = sovigl.evaluate(
    action="payment.create",
    context={"amount": 5000}
)

print(decision.status)      # approved
print(decision.decision_id) # permanent ID
print(decision.reason)      # plain English reason

Live dashboard: https://api.sovigl.com/dashboard

decision_id, /check, and /evaluate

The Python SDK calls POST /check. The backend expects a decision_id on each request (idempotency key). The SDK generates a new UUID for every call unless you pass decision_id in context. Use a new id per new evaluation; reuse only when you intend a retry or idempotent replay of the same logical decision.

On the server, POST /evaluate uses the same action model and also requires decision_id in the body. For org_id == demo_fintech, /evaluate may allow no api-key (demo-only). Non-demo orgs still require a valid API key. The SDK still sends api-key by default for /check, which matches normal production use.

Full response object

evaluate() returns a Decision object:

Field Type Description
status string approved / pending / blocked
decision_id string permanent immutable audit ID
reason string why this decision was made
explanation_registry dict full explainability record
risk_assessment dict risk score 0.0-1.0 + factors
policy_version int which policy version was active
approval_id string human approval reference
summary string plain English summary
approved bool True if status == approved
pending bool True if status == pending
blocked bool True if status == blocked
raw dict complete backend response

What makes it different

  • Pre-execution gate - nothing executes without a decision. Not post-execution logging.

  • Policy versioning - auditors know exactly which rule was active at decision time.

  • Business policy engine - amount thresholds, role-based routing, mandate enforcement, fraud detection built in.

  • Compliance evidence - every decision automatically satisfies EU AI Act Art.12/13/14, MAS FEAT, NIST AI RMF, RBI FREE-AI.

  • Fully hosted - no self-hosting needed. Works in an afternoon.

Context fields

Field Type Description
amount number Transaction amount
role string employee / manager / admin
user_id string Who is performing the action
agent_id string AI agent identifier
description string Optional note
decision_id string Optional; idempotency key (new UUID per call if omitted)

Action types

Any string in dot notation:

  • payment.create
  • expense.submit
  • transfer.initiate
  • loan.approve
  • vendor.onboard
  • data.export

Pending workflow

decision = sovigl.evaluate(
    action="payment.create",
    context={"amount": 25000, "role": "employee"}
)

if decision.pending:
    # Route to human approver
    print(f"Approval required: {decision.approval_id}")
    print(f"Reason: {decision.reason}")

Node.js

const sovigl = require("./node/index.js");

const decision = await sovigl.evaluate({
    action: "payment.create",
    context: { amount: 5000, role: "employee" }
});

console.log(decision.status);      // approved
console.log(decision.decision_id); // permanent audit ID
console.log(decision.reason);      // why

Production access

Email sovigl100@gmail.com to get your org_id and api_key.

Free during beta. No credit card. No commitment.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sovigl-0.1.12.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sovigl-0.1.12-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file sovigl-0.1.12.tar.gz.

File metadata

  • Download URL: sovigl-0.1.12.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for sovigl-0.1.12.tar.gz
Algorithm Hash digest
SHA256 e325214156f2f124ce87c7a8af229425574b2a08cb12b01077b7dc5cdc5aa6f7
MD5 ac5c8051b839e35b6c83c7a226006b71
BLAKE2b-256 ac26b435975d8da2a84499f21fb09c9ab1fca42f0ea8ca0a53c7a65891415d3e

See more details on using hashes here.

File details

Details for the file sovigl-0.1.12-py3-none-any.whl.

File metadata

  • Download URL: sovigl-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for sovigl-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 8d51bc82d7a40c2df91d91b6b2be5b158594bd8269545afd8b84822dac9d17c9
MD5 abe8e729bd8904bfe946ce09c662ffec
BLAKE2b-256 57e833d09877d882a11897eb39b721e899ce8994063e9c3957c19f8e03dc445d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page