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.5.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.5-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sovigl-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 dfe0079121f68fa70a53999c21b3cc564a9d29df6497c41d8c373b2690955b75
MD5 dd641628436307baf13c4bf5ce09d09d
BLAKE2b-256 f081891baf21b1fafa85d08d29cf7ffaf65c90be9aa7a52c83e576dc80cdb2a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sovigl-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0417c34a34a9ab15a4d63e6fb562a6e5f1a813aaa9083dfe580a9900dff996c3
MD5 7e5edfdedd62dbcad2eeccc612680c55
BLAKE2b-256 56af75c84642dde33072c8b81b2b5c8b55e8a9baa5b78e2116583f64719be03a

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