New Sakshi sandboxes are live. Try agent governance on synthetic data, in your browser. Get a sandboxarrow_forward
witnessDeveloper docs

Govern your agents in an afternoon

Sakshi meets your code where it is: a few lines with the SDK, framework middleware for the stack you already use, or zero code through the MCP server and interception proxy. It never sees a raw identifier: PII is tokenized at ingest.

pip install sakshi-sdk pip install sakshi-mcp Apache-2.0 Python 3.11+

Read the full documentation

Quickstart

Register an agent, then witness a decision. Every call rides your deployment's tamper-evident chain; the raw Aadhaar below is tokenized before it is stored.

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

sakshi = SakshiClient("https://sakshi.yourbank.internal", api_key="sks_…")

agent_id = sakshi.register(
  "loan-decision-agent",
  owner_name="Priya Sharma", owner_email="priya@yourbank.internal")

with sakshi.witness(agent_id, context={"application_id": "4471"},
                model={"provider": "openai", "model": "gpt-5.2"}) as w:
  w.disclosure(channel="app", method="banner")  # told the customer it's AI
  # … your existing decision logic …
  w.action(outcome="approved")

Install & keys

The SDK talks to your Sakshi deployment. Mint an ingest key in the console (Admin → Ingest keys, shown once, stored only as a SHA-256, optionally scoped to an org-unit) and pass it as api_key, or set SAKSHI_API_KEY.

No deployment yet? Request a sandbox for a private, synthetic-data instance you can sign into and mint a key in, no install required.

pip install sakshi-sdk  # the SDK (imports as `sakshi`)
pip install sakshi-mcp  # the MCP server + interception proxy

Delivery semantics: witness is idempotent by client_ref and retried; register is idempotent by name; enforce is fail-closed and never auto-retried.

The SDK

One client, a handful of primitives. Everything produces evidence on the chain.

CallWhat it does
register(name, owner_name, owner_email, …)Put an agent in the inventory (KYA). Idempotent by name; returns the agent id.
witness(agent_id, …)Context manager for one decision. Inside it: w.disclosure(…), w.action(outcome=…), w.step(…).
enforce(agent_id, action, stakes, …)Check the autonomy envelope before a consequential action → auto / async_review / sync_review / block. Fail-closed.
request_human_handoff(…)Synchronously park a decision for a human. A lost handoff is a compliance failure, so it raises.
record.extraction(…) / record.access(…)Govern document/KYC extraction and reads of stored values, by category and reference key, never the value (DPDP).

Framework middleware

Wrap the client you already call. Inside an active witness block, every LLM or tool call becomes a step automatically. Duck-typed; no provider SDK is imported.

from sakshi.middleware import (
  watch_openai_compatible, watch_anthropic, watch_gemini,
  watch_bedrock, watch_langgraph, witness_node, watch_mcp,
  SakshiAdkPlugin)

llm = watch_openai_compatible(openai_client)  # OpenAI, vLLM, Ollama…
session = watch_mcp(mcp_client_session)     # tool calls + poisoning detection

Covers OpenAI-compatible, Anthropic, Gemini, Bedrock, LangGraph (per-node + per-run), Google ADK (one Runner plugin), and MCP client sessions.

Sakshi MCP server

Add Sakshi to any MCP host (Claude Desktop, Cursor, an agent framework) and gain three governance tools with no SDK integration. It is a client of your Sakshi API, so calls ride the same auth, tokenization and chain path.

enforce_actionwitness_decisioncheck_readiness
# add it to an MCP host
{
  "mcpServers": {
    "sakshi": {
      "command": "sakshi-mcp",
      "env": { "SAKSHI_API_URL": "https://sakshi.yourbank.internal",
              "SAKSHI_MCP_API_KEY": "sks_…" }
    } } }

Interception proxy

The zero-code enforcement path: put the proxy between an un-instrumentable agent and its real MCP server. It relays every message verbatim and taps the ones it governs.

ModeBehaviour
P1 transparentObserve + witness every tool call and manifest; no blocking.
P2 enforceSAKSHI_MCP_ENFORCE=on, route each call through the envelope before it runs; non-auto is parked, never reaches the tool.
P3 poison-detectBlock a tool whose description/schema changes mid-session (tool poisoning, OWASP MCP Top 10).
# local stdio downstream
sakshi-mcp-proxy --agent-id <id> -- npx @modelcontextprotocol/server-filesystem /data

# or a remote streamable-http downstream
sakshi-mcp-proxy --agent-id <id> --http https://tools.example/mcp

HTTP API

Everything the SDK does is a plain HTTP call to your deployment. Every /api/v1 route enforces auth (Authorization: Bearer <key>). The interactive reference lives on your own instance:

EndpointWhat
/api/docsSwagger UI, every route, try-it-out against your deployment.
/api/redocReDoc, the same spec, offline-friendly reading view.
/api/openapi.jsonThe machine-readable contract, generate a typed client in any language.
/statusPublic liveness + version (no chain state without a principal).
curl -H "Authorization: Bearer $SAKSHI_KEY" \
  https://sakshi.yourbank.internal/api/v1/vidhi/readiness

The full reference, generated from the OpenAPI spec, is also published at docs.rotavision.com, alongside the concepts and step-by-step guides.

Concepts

Five modules over one tamper-evident spine:

ModuleRole
RegisterKnow Your Agent, inventory, ownership, provenance, verified identity.
WitnessThe flight recorder, a per-tenant hash chain, independently verifiable.
BoundAutonomy envelopes, review/escalation queues, oversight telemetry, kill switch.
VidhiRegulator-mapped evidence packs (RBI MRM, DPDP, SEBI, IRDAI) + readiness score.
VishwasIndia-calibrated, declared-first fairness screens.

Data handling & residency

Sakshi tokenizes PII (Aadhaar, PAN, IFSC, mobile, and more, plus an NER layer) before anything is hashed or stored, it never holds a raw identifier. It is single-tenant and installs in your environment, so evidence never leaves it. The chain recomputes every hash: an auditor can verify your records without trusting Rotavision at all.

Get a sandbox to try it Explore the live demo