Norviq
Runtime policy enforcement for LLM agent tool calls.
Norviq is a policy enforcement point (PEP) that sits between an agent's reasoning loop and the tools
it can call. Every tool call is evaluated against OPA/Rego policy and then allowed, blocked,
escalated, or audited — before the tool function runs. It turns "the model decided to call
execute_sql" from implicit trust into an enforced, auditable decision.
This package is the Python SDK: it wraps your existing tools so enforcement happens in-process. The full platform (control plane, console, Kubernetes admission webhook, sidecar injection) is installed with the Helm chart — see the documentation.
Install
pip install "norviq[langchain]" # LangChain / LangGraph
pip install "norviq[crewai]" # CrewAI
pip install "norviq[autogen]" # AutoGen
pip install "norviq[semantic-kernel]" # Semantic Kernel
pip install "norviq[frameworks]" # all of the above
Use
from norviq.sdk import PolicyEngineClient, ToolInterceptor
from norviq.sdk.langchain.adapter import protect
engine = PolicyEngineClient() # NRVQ_POLICY_ENGINE_URL + NRVQ_API_TOKEN
interceptor = ToolInterceptor(evaluator=engine)
# Every tool is wrapped: policy runs before the tool body, on every call the model makes.
tools = protect([search_kb, execute_sql, delete_record], interceptor, session_id="session-1")
A blocked call raises NorviqBlockError, which carries the full PolicyDecision — including the
rule_id that fired and a human-readable reason — so you can surface a refusal instead of
performing the action:
from norviq.sdk import NorviqBlockError
try:
result = agent.invoke({"messages": [("user", "delete all customer records")]})
except NorviqBlockError as exc:
print(f"blocked by {exc.decision.rule_id}: {exc.decision.reason}")
Two things to know before your first run, because either one makes a correct setup look broken:
-
A scope with no policy is ALLOWED, not denied. With nothing loaded for the namespace/agent-class you evaluate against, the decision is
allowwithrule_id: default_allow— so a typo inagent_class, or an agent pointed at a namespace you never wrote a policy for, looks like a clean pass rather than an error. If your first calls all come back allowed, check that the scope you are sending matches the scope you wrote the policy for.This is deliberate: Norviq sits in the request path of production agents, so an unconfigured scope must not take the customer's traffic down. Set
config.noPolicyDecision: deny(chart) orNRVQ_NO_POLICY_DECISION=denyto lock a namespace down once you have written its policies — deny-by-default is then an explicit choice you make per deployment, not a surprise on day one. -
POST /api/v1/evaluaterequires a bearer token. Without one the client fails closed.
Links
- Documentation — https://docs.norviq.dev
- Integration guide (all supported frameworks) — https://github.com/norviq-dev/norviq/blob/main/docs/guides/integrating-agents.md
- Runnable examples — https://github.com/norviq-dev/norviq/blob/main/examples/README.md
- Source — https://github.com/norviq-dev/norviq
- Security policy — https://github.com/norviq-dev/norviq/blob/main/SECURITY.md
Apache 2.0 licensed.
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 norviq-0.2.1.tar.gz.
File metadata
- Download URL: norviq-0.2.1.tar.gz
- Upload date:
- Size: 732.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f154657cdc6b1870911b9e38d5b418bcb38b70322ae10b279942dc3eda01a512
|
|
| MD5 |
b35225092506ce18228b240a391c902b
|
|
| BLAKE2b-256 |
ff25a06a8b49b756c17b11a175b6ebd3b06ffb7f31e38e44856f2c2858db3873
|
Provenance
The following attestation bundles were made for norviq-0.2.1.tar.gz:
Publisher:
release.yml on norviq-dev/norviq
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
norviq-0.2.1.tar.gz -
Subject digest:
f154657cdc6b1870911b9e38d5b418bcb38b70322ae10b279942dc3eda01a512 - Sigstore transparency entry: 2512551489
- Sigstore integration time:
-
Permalink:
norviq-dev/norviq@5e2977cd0f5e7171ec5bb7ba81ca4365bdbbd7a2 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/norviq-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5e2977cd0f5e7171ec5bb7ba81ca4365bdbbd7a2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file norviq-0.2.1-py3-none-any.whl.
File metadata
- Download URL: norviq-0.2.1-py3-none-any.whl
- Upload date:
- Size: 824.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
80043721b784b5abdc9b5db11f4fb4fe4d8c6f73a7c47a2d8c3ea26671dc5f7b
|
|
| MD5 |
b8d9a745ee909fea36b0366da9ef46dc
|
|
| BLAKE2b-256 |
764a15423557bf49e9dc23008bed4730b15b084d9d89cf56598ed5d249e981e0
|
Provenance
The following attestation bundles were made for norviq-0.2.1-py3-none-any.whl:
Publisher:
release.yml on norviq-dev/norviq
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
norviq-0.2.1-py3-none-any.whl -
Subject digest:
80043721b784b5abdc9b5db11f4fb4fe4d8c6f73a7c47a2d8c3ea26671dc5f7b - Sigstore transparency entry: 2512551727
- Sigstore integration time:
-
Permalink:
norviq-dev/norviq@5e2977cd0f5e7171ec5bb7ba81ca4365bdbbd7a2 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/norviq-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5e2977cd0f5e7171ec5bb7ba81ca4365bdbbd7a2 -
Trigger Event:
push
-
Statement type: