Catalog PyPI
PACKAGE EXPLORERView in registry

agr-sdk

PyPI

AGR Python SDK — governance layer for AI agents

Versions collected1
Direct dependencies3From release 0.1.0
Last observed21 Oct, 09:28 UTC

README

Version 0.1.0 documentation

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-detects BaseTool instances.
  • CrewAI / LangGraph — see agr.plugins.crewai / agr.plugins.langgraph.

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.027 Jul 20263

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:28 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:80f9f5834a257099b127366bb0a23742bb36135bc3a2b6545e34b966788daa5f