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.2.tar.gz (15.7 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.2-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gavrun-0.2.2.tar.gz
  • Upload date:
  • Size: 15.7 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.2.tar.gz
Algorithm Hash digest
SHA256 cd75f6f009758d46b7bfe9e254f0e09a952452d528b81eb937acd2d25954505a
MD5 a1d0fd99908ce290ba828be7c0039a00
BLAKE2b-256 8c2f64366309d90e18a1ccdb7bb7206daa18a29f408e6325766ba6bd0288bd04

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gavrun-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 12.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0bd682e2157ea91f61dc4e96f8910c90037d6f90e2ad252049cc83e29492954b
MD5 edc19d016db3a0256ca674f365142cb3
BLAKE2b-256 9d3e5527fae36d2f008b87eaba7aff7b3bdc812412b274e50941de1a366ccc90

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