Skip to main content

Python SDK for Gavrun — govern AI agents before risky actions execute

Project description

gavrun

Python SDK for Gavrun — govern AI agents before risky actions execute.

Gavrun intercepts agent tool calls, evaluates them against your policies, and requires human approval for high-risk actions before they run.

Install

pip install gavrun

Quick start

import gavrun

gavrun.configure(
    api_key="your-sdk-key",       # from agentmanager.gavrun.ai/api-keys
    agent_name="my-agent",
    agent_manager_url="https://api.gavrun.ai",
)

Tool calls are governed automatically for LangChain, LangGraph, CrewAI, and OpenAI Agents SDK via auto-patch. For manual guarding:

client = gavrun.get_client()

result = client.guard(
    action="delete_user",
    execute=lambda: delete_user(user_id),
    tools=["delete_user"],
    prompt=f"Delete user {user_id}",
)

if result.denied:
    raise PermissionError("Blocked by policy")
if result.requires_human_review:
    # poll for approval
    ...

Frameworks

Auto-patch wires governance into every tool call:

import gavrun
gavrun.configure(api_key="...", agent_manager_url="https://api.gavrun.ai")
# LangChain, LangGraph, CrewAI, OpenAI Agents SDK tools are now governed

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

gavrun-0.2.3.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

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

gavrun-0.2.3-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file gavrun-0.2.3.tar.gz.

File metadata

  • Download URL: gavrun-0.2.3.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for gavrun-0.2.3.tar.gz
Algorithm Hash digest
SHA256 753c68172fd9aef7bafd467cd8ace044f235435fd0a82b48e39c9f890bab6a91
MD5 fe9f879f9493fc76dc348a07875ba0a7
BLAKE2b-256 cd2d010ddebe68b2a347bd2355d82c8d2fbafa6085c29fc12201b75047d887a5

See more details on using hashes here.

File details

Details for the file gavrun-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: gavrun-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for gavrun-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b8417add3701ec2eae855e2bc0fb39fc3dfe4fddb395839f3a60352f3c3f71f2
MD5 fea4bff14c92155b1b1d18cdcea6fb4f
BLAKE2b-256 3156e14bced5fe1a3b929f63a3a84a5d4fc7933d406d6a83c595a3fc7c7e12d2

See more details on using hashes here.

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