Skip to main content

Root Zero Vault — Constitutional AI Governance SDK

Project description

rootzerovault

Constitutional AI Governance SDK for Python — connects your AI agents and tools to the Root Zero Vault constitutional gateway.

Install

pip install rootzerovault

Quick start (live gateway)

from rootzerovault import RzvClient

rzv = RzvClient(gateway="http://localhost:8443")
result = rzv.validate(specimen)
print(result.outcome)  # 'ACCEPT' | 'REJECT'

Quick start (offline / demo mode)

For tests, demos, or offline development without a gateway, use demo_mode=True:

from rootzerovault import RzvClient

rzv = RzvClient(demo_mode=True)
# Governance calls return simulated outcomes instead of raising RzvNotConfiguredError.
# All adapters propagate this through their internal GovernanceClient.

Important: demo_mode is for tests and demos only — never use in production. Without gateway and without demo_mode=True, calls that need governance fail closed with RzvNotConfiguredError.

Framework adapters

Out-of-the-box wrappers for common AI/agent frameworks. Each adapter constructs a GovernanceClient that propagates the demo_mode flag from the RzvClient you pass in.

  • LangChain — from rootzerovault.adapters import governed_langchain_tool, GovernedTool
  • CrewAI — from rootzerovault.adapters import governed_crewai_tool, GovernedCrew
  • OpenAI Agents — from rootzerovault.adapters import governed_openai_agents_tool
  • Anthropic — from rootzerovault.adapters import GovernedAnthropic
  • AWS Bedrock — from rootzerovault.adapters import GovernedBedrockClient
  • Google Vertex / Gemini — from rootzerovault.adapters import governed_vertex_tool
  • Azure OpenAI — from rootzerovault.adapters import governed_azure_openai
  • Cohere — from rootzerovault.adapters import governed_cohere
  • MCP (Model Context Protocol) — from rootzerovault.adapters import GovernedMCPServer, governed_tool
  • A2A (Agent-to-Agent) — from rootzerovault.adapters import GovernedA2AAgent
  • ANP (Agent Network Protocol) — from rootzerovault.adapters import governed_anp
  • ACP — from rootzerovault.adapters import GovernedACPAgent
  • Agno — from rootzerovault.adapters import GovernedAgnoAgent
  • Semantic Kernel — from rootzerovault.adapters import governed_semantic_kernel
  • Smolagents — from rootzerovault.adapters import GovernedSmolTool
  • PydanticAI — from rootzerovault.adapters import governed_pydantic_ai
  • HTTP — from rootzerovault.adapters import HttpAdapter
  • Database / SQL — from rootzerovault.adapters import governed_database
  • gRPC — from rootzerovault.adapters import governed_grpc

Optional dependencies are listed under pyproject.toml [project.optional-dependencies]. Install with the framework you need:

pip install rootzerovault[langchain]
pip install rootzerovault[crewai]
pip install rootzerovault[mcp]
# or all at once:
pip install rootzerovault[all]

Genesis

Constitutional anchor — frozen since March 14, 2026. Cannot be backdated. Cannot be altered.

cvid:blake3:1544ff7dd978d911083bd60a7a4e6ba9647996bfdefb62aa8a045ccb63158867

Testing

pip install -e ".[dev]"
python -m pytest tests/

Tests fall into three implicit categories: unit tests (no optional deps required), adapter tests (each requires its framework's optional dep installed; skipped otherwise), and live-gateway tests (require a running gateway at http://localhost:8443).

License

Dual MIT OR Apache-2.0.

Links

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

rootzerovault-4.0.0.tar.gz (94.1 kB view details)

Uploaded Source

Built Distribution

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

rootzerovault-4.0.0-py3-none-any.whl (89.6 kB view details)

Uploaded Python 3

File details

Details for the file rootzerovault-4.0.0.tar.gz.

File metadata

  • Download URL: rootzerovault-4.0.0.tar.gz
  • Upload date:
  • Size: 94.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rootzerovault-4.0.0.tar.gz
Algorithm Hash digest
SHA256 31fcb6bba7e5fe8b2eecc5616b874b79c9806f99a280ece96a75311cc6515960
MD5 c43e61756fcb148da3cc5fd67469b305
BLAKE2b-256 8f596c341caf8842792bce79ee93b8b2f60f7760b923751b0915f7b84330e249

See more details on using hashes here.

Provenance

The following attestation bundles were made for rootzerovault-4.0.0.tar.gz:

Publisher: publish_python_sdk.yml on deensaleh/rsbis-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rootzerovault-4.0.0-py3-none-any.whl.

File metadata

  • Download URL: rootzerovault-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 89.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for rootzerovault-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 53e9c21687e1c68a4065c81de342e87b5625a2d7ef6f15c030bb1682947ec13d
MD5 7ebcafa09fae772e492725fe6e03b537
BLAKE2b-256 d680c425f36810a2e4fa104deb30316d814f13b549ca9c8db7e688f708b43928

See more details on using hashes here.

Provenance

The following attestation bundles were made for rootzerovault-4.0.0-py3-none-any.whl:

Publisher: publish_python_sdk.yml on deensaleh/rsbis-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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