Skip to main content

agentgate Python SDK

Install and get human approval before your AI agent takes a risky action.

Install

pip install useagentgate

Quick Start

from agentgate import AgentGate

gate = AgentGate(
    api_key="ag_test_xxx",
    default_channel="#agent-approvals"
)

result = await gate.request_approval(
    action="send_email",
    description="Send pricing proposal to client@acme.com",
    context={"deal_value": "$50,000", "recipient": "john@acme.com"},
    risk_tier="high",
    timeout_minutes=30,
)

if result.approved:
    print(f"Approved by {result.approved_by}")
elif result.rejected:
    print(f"Rejected: {result.reason}")
elif result.timed_out:
    print("No response")

Sync Usage

from agentgate import AgentGateSync

gate = AgentGateSync(api_key="ag_test_xxx")
result = gate.request_approval(action="send_email", description="...")

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

useagentgate-1.0.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

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

useagentgate-1.0.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file useagentgate-1.0.0.tar.gz.

File metadata

  • Download URL: useagentgate-1.0.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for useagentgate-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a369e21d0e233e47a20741aeb283c5044b5e28277eea87e04a09b4ccf96ddbec
MD5 2e0494befc94bf087de6670c88bf1047
BLAKE2b-256 297f022228a9b5a854b1e8f7b72b2b77c55cf00b33a67a824779bee35b9df9a0

See more details on using hashes here.

File details

Details for the file useagentgate-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: useagentgate-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for useagentgate-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5b7392fce612a929676487121fd3bca54897dada769c025133a80e339684ee83
MD5 fe8760dc7897af19ac35300c681719df
BLAKE2b-256 bd45de11290f6a1daf5df6ff979cc8195b4227da4a80c01e1d259d0a32db633f

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