agr-sdk
Python SDK for AGR (Agentic Governance Runtime) — a drop-in governance layer for AI agent tool calls. Every action your agent takes is evaluated against your org's policies before it runs.
Install
pip install agr-sdk
Quickstart — zero-touch guard
import agr
agr.configure(
base_url="https://api.agr.dev", # or your self-hosted AGR instance
api_key="agr_sk_xxx",
agent_id="my-agent",
)
@agr.guard(action="execute_sql", resource="prod_db")
def run_query(sql: str) -> str:
...
Calling run_query(...) now evaluates the action against your AGR policies first. If policy denies it, AGRDeniedError is raised instead of the query running. If policy requires human approval, the call blocks (or raises AGRApprovalTimeoutError) until a human decides.
Quickstart — wrap existing tools
import agr
agr.configure(base_url="https://api.agr.dev", api_key="agr_sk_xxx", agent_id="my-agent")
tools = agr.wrap_tools(my_langchain_tools) # LangChain BaseTool instances, plain callables, or async callables
Quickstart — raw client
from agr import AGRClient
client = AGRClient(api_key="agr_sk_xxx", base_url="https://api.agr.dev")
result = client.evaluate(agent="my-agent", action="deploy", resource="production")
if result.allowed:
...
elif result.denied:
...
elif result.requires_approval:
...
An AsyncAGRClient with the same shape is available for async code.
Framework integrations
- LangChain —
agr.wrap_tools()auto-detectsBaseToolinstances. - CrewAI / LangGraph — see
agr.plugins.crewai/agr.plugins.langgraph.
License
MIT
Metadata
Release files for agr-sdk 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agr_sdk-0.1.0.tar.gz | 17.4 kB | Without provenance | Details for agr_sdk-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agr_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agr_sdk-0.1.0-py3-none-any.whl |
Total release size: 32.6 kB
Release files / agr_sdk-0.1.0.tar.gz
| Download URL | agr_sdk-0.1.0.tar.gz |
|---|---|
| Size | 17.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f267700ac86ad799a0f5f4fa3408333e7095c30070aad556957d3f69047df07
|
|
BLAKE2b-256 checksum How to use checksums |
9f294b43a7c7a8e4b220564ea11a0963864d2e6fafd2d17f7c8df48cd14a724c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / agr_sdk-0.1.0-py3-none-any.whl
| Download URL | agr_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
748de1e1078baa59cd15a165ae50131511cda36833d7444cae8e0cfeb2e79945
|
|
BLAKE2b-256 checksum How to use checksums |
391b3a8a90dd7229bf95e9903b922798e1be1670138d92fff73c86bd75919c16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for agr-sdk 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.