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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sovigl-0.1.3.tar.gz
  • Upload date:
  • Size: 3.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.3.tar.gz
Algorithm Hash digest
SHA256 0887f4d5f91785be7731b1ce4aa29d87f99dcf8591ad1e0a8454aac338dbbcd4
MD5 563f3153361a55c11d6d7cada6e15cef
BLAKE2b-256 434c665364e37c0488743d2173c459b9bb7c84600d3e9b95a66496e06719b3cd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sovigl-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 3.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 847407b813e4df9ab1d3fa55e0c73c3603877c350f83aea3d7f7df48fdfb946a
MD5 6616a4528f8bd48ab75ed29556623438
BLAKE2b-256 696a1a7b33c9f3d3ce11978fc0eb1c62daec9aa128d37cc13dea754efcde48de

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