Skip to main content

SOVIGL returns approved, pending, or blocked for any action.

Project description

sovigl

Sovigl evaluates approval decisions for actions like payments and returns one of three states: approved, pending, or blocked.

Install

pip install sovigl

Access

Demo: works instantly, no key needed. pip install sovigl and call evaluate().

Production: email sovigl100@gmail.com to get org_id and api_key.

Python Usage

import sovigl

for amount in [500, 5000, 100000]:
    decision = sovigl.evaluate(
        action="payment.create",
        context={"amount": amount}
    )

    print(f"amount={amount} status={decision.status} reason={decision.reason}")

    if decision.approved:
        print("Execute payment")
    elif decision.pending:
        print("Human approval required")
    elif decision.blocked:
        print("Do not execute payment")

Full Response Object (Python)

evaluate() returns a Decision object with these fields/properties:

  • status: final mapped status (approved, pending, blocked)
  • reason: backend reason string when present
  • cdt: backend metadata object when present
  • approved: boolean helper (status == "approved")
  • pending: boolean helper (status == "pending")
  • blocked: boolean helper (status == "blocked")

Example:

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

print(decision.status)
print(decision.reason)
print(decision.cdt)
print(decision.__dict__)

Pending Workflow

When decision.status == "pending", treat it as a hard stop for automatic execution and route to manual approval.

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

if decision.pending:
    approval_id = getattr(decision, "approval_id", None)
    print("Human approval required", approval_id, decision.reason)

Context Fields

Field Type Description
amount number Transaction amount evaluated against policy
user_id string Who is performing the action
role string Caller role - employee, manager, or admin
agent_id string AI agent identifier if action is automated

Action Types

Sovigl accepts any action string in . format.

  • payment.create
  • expense.submit
  • transfer.initiate
  • loan.approve

Node.js Usage

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

(async () => {
  for (const amount of [500, 5000, 100000]) {
    const decision = await sovigl.evaluate({
      action: "payment.create",
      context: { amount }
    });

    console.log({ amount, status: decision.status, reason: decision.reason });
  }
})();

Backend: https://github.com/riteshkumar10000/sovigl-sdk | PyPI: https://pypi.org/project/sovigl/

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.6.tar.gz (3.2 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.6-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sovigl-0.1.6.tar.gz
  • Upload date:
  • Size: 3.2 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.6.tar.gz
Algorithm Hash digest
SHA256 59b10927b977598218dd9af5f61eef7ebfd965bd0a4d9d3ff0523d0369569e09
MD5 05f1981e2c2f89ae852100fd40ff99d7
BLAKE2b-256 b18e2906a3164660024f43ddda0babbde9cd145ff40c5ec7a5514b51659973cc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sovigl-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 3.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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c470a52161feed607160c9de318f0cdb168f3fd4ce213cf66655a9b9cf136a5a
MD5 5d7fbe942c77081462e9fa8d9480f802
BLAKE2b-256 916d5f843d627dacc7f3a3d8e4866afff4d12e62f61f2dc51f1c7a48fa333caf

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