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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sovigl-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 efeef8fc19e6b73671e07224e3c385c552a5bdc2dc6ce0c6b93b99d102aa7586
MD5 7121770762b328e219b348ac75838a14
BLAKE2b-256 2eda7bf50d169ebc8d370214e02350efb61d531aaf14a8bc6a1a20a9eef641e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sovigl-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 3.2 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a8f4b011971cbcd0c33cdbde13fcd8c3c4487fa42001a39cbe979d62d98f24ac
MD5 aab4ed9cf38a1001659f4771ebbf331e
BLAKE2b-256 a5993a76dabd8745154c4e91be6c321b96b0e1f3f2834f35307ba6753aa394f2

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