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 presentcdt: backend metadata object when presentapproved: 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfe0079121f68fa70a53999c21b3cc564a9d29df6497c41d8c373b2690955b75
|
|
| MD5 |
dd641628436307baf13c4bf5ce09d09d
|
|
| BLAKE2b-256 |
f081891baf21b1fafa85d08d29cf7ffaf65c90be9aa7a52c83e576dc80cdb2a9
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0417c34a34a9ab15a4d63e6fb562a6e5f1a813aaa9083dfe580a9900dff996c3
|
|
| MD5 |
7e5edfdedd62dbcad2eeccc612680c55
|
|
| BLAKE2b-256 |
56af75c84642dde33072c8b81b2b5c8b55e8a9baa5b78e2116583f64719be03a
|