Skip to main content

Sakshi SDK — register AI agents, witness their decisions, enforce their autonomy envelopes

Project description

sakshi-sdk

Register your AI agents and witness their decisions. Python SDK for the Sakshi governance platform.

pip install sakshi-sdk   # imports as `sakshi`
from sakshi import SakshiClient

sakshi = SakshiClient("https://console.example.bank", api_key="...")

agent_id = sakshi.register(
    "loan-decision-agent",
    owner_name="Priya Sharma",
    owner_email="priya@example.bank",
    autonomy_tier="L2",
    blast_radius={"customer_facing": True, "spend_limit_inr": 500_000},
)

with sakshi.witness(
    agent_id,
    context={"application_id": "4471", "retrieved": chunks},
    model={"provider": "openai", "model": "gpt-5.2", "version": "2026-05"},
    client_ref="app-4471",  # idempotency key
) as w:
    w.step("plan", goal="assess repayment capacity")
    w.tool("bureau_pull", output=bureau_response)
    w.human("async_review", "arun@example.bank", verdict="approved")
    w.action(decision="approve", limit_inr=200_000)

Properties you can rely on:

  • Fail-open by default — if the platform is unreachable, your agent keeps running; records are buffered, retried, and dropped with a warning as the last resort. Governance must never take production down. Use fail_open=False for synchronous capture that raises.
  • Failures are evidence — an exception inside a witness block is captured as the decision outcome and re-raised.
  • PII-safe by design — Aadhaar/PAN/mobile and other Indian identifiers are detected and tokenized server-side at ingest, before storage or hashing.
  • register() is always synchronous: an unregistered agent should not run (RBI draft MRM guidance, para 21).

Call sakshi.flush() before shutdown in batch jobs; long-running services can rely on the atexit hook.

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

sakshi_sdk-0.1.1.tar.gz (17.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sakshi_sdk-0.1.1-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file sakshi_sdk-0.1.1.tar.gz.

File metadata

  • Download URL: sakshi_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for sakshi_sdk-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d27274ca14ae59935f0de5038a03f98b633cca6ce5f8d79f5aa2318be54b9720
MD5 3aa60af3ceb04c84882ef2d0a8fd52e8
BLAKE2b-256 b3b0ed2e32ec4e8f565eca0f11847fb1ebf7b36adcee8eff1a2a2b28e3047828

See more details on using hashes here.

File details

Details for the file sakshi_sdk-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sakshi_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for sakshi_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aaf69154b65265f13a1ed1ca3f5221a447b2e7532e633360b93c418e44a5cf67
MD5 a617bbe9a17273d39d33e9f3a773af42
BLAKE2b-256 4077c1dfcc4f286577929c0dffdccb0ff72881e989fe478c3472d7b8f71ec49b

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