Python SDK for Praxius — instrument AI agent decisions for governance, compliance, and audit
Project description
praxius-sdk
Python SDK for Praxius — instrument AI agent decisions for governance, compliance, and audit.
pip install praxius-sdk
Quick start
from praxius import Praxius
px = Praxius(
api_key="prx_your_key",
endpoint="https://app.praxius.ai",
)
result = px.record_decision(
event_type="loan_decision",
outcome="APPROVED",
confidence=0.94,
runtime_ms=1200,
policy_id="LENDING-POLICY-2024",
gates=[
{
"gate_key": "credit_score_check",
"title": "Credit Score Threshold",
"passed": True,
"reason": "Score 742 exceeds minimum of 680",
"category": "creditworthiness",
},
],
gaps=[],
context={"loan_type": "personal", "amount": 25000},
)
print(result.event_id)
Trace context manager
Wrap your agent with automatic timing:
with px.trace("fraud_check") as ctx:
decision = my_agent.run(transaction)
ctx.record(
outcome=decision.label,
confidence=decision.score,
gates=decision.gate_results,
gaps=decision.missing_fields,
)
# Decision is sent when the with-block exits.
# If an exception is raised, an ERROR event is recorded automatically.
Human review events
px.record_review(
trace_id=original_decision_trace_id,
action="override", # "accept" | "override" | "modify" | "escalate"
original_outcome="DENIED",
final_outcome="APPROVED",
rationale="Client provided supplemental income documentation.",
reviewer_role="senior_underwriter",
assigned_at="2026-05-12T14:00:00Z",
completed_at="2026-05-12T14:22:00Z",
)
Typed gate evaluations
Use the GateEvaluation dataclass for full IDE completion:
from praxius import GateEvaluation
gates = [
GateEvaluation(
gate_key="aml_screening",
title="AML Counterparty Screening",
passed=False,
reason="Destination account matched OFAC watchlist",
category="compliance",
policy_id="AML-POLICY-2024",
policy_version="v3",
),
]
Async support
pip install praxius-sdk[async]
from praxius import AsyncPraxius
px = AsyncPraxius(api_key="prx_...")
async def handle():
result = await px.record_decision(
event_type="fraud_check",
outcome="FLAGGED",
confidence=0.87,
runtime_ms=230,
)
Configuration
| Parameter | Env var | Default | Description |
|---|---|---|---|
api_key |
PRAXIUS_API_KEY |
— | Your API key from Settings → API Keys |
endpoint |
PRAXIUS_API_URL |
https://app.praxius.ai |
Your Praxius instance URL |
timeout |
— | 10 |
Request timeout in seconds |
retries |
— | 2 |
Retry attempts on 5xx errors (exponential backoff) |
debug |
— | False |
Print all requests and responses |
Docs
Full documentation at docs.praxius.ai.
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 praxius_sdk-0.1.0.tar.gz.
File metadata
- Download URL: praxius_sdk-0.1.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffd08fd812701041633c61fdb519028c6c834bd3eeebcedefb3f43c1bae17afb
|
|
| MD5 |
811210635a87dd7354692fd8f766d765
|
|
| BLAKE2b-256 |
986700a3d6279aa6380b1bdf229b9171e2c09f7609f14e65c03c2130f764d33c
|
File details
Details for the file praxius_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: praxius_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.4 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 |
f1545bab554b3ff04b9c659f3403c45aab7377562a7760ecbbe76cca2930eebb
|
|
| MD5 |
56c28f0b2ab9f66e842d74d61bdedbe8
|
|
| BLAKE2b-256 |
408d0c8d03ce9cba92177d1a3b6a6b3690d129efbf0526eca0b32968cab803df
|