Skip to main content

agentguard-tech

Python compatibility SDK 0.15.0 for AgentGuard HTTP policy evaluation. This distribution is maintained for truthful compatibility and security fixes; it is not the normative v1 runtime contract and does not claim equivalent TypeScript feature scope, executor-owned capability separation, or a compliance outcome.

PyPI Python license homepage

The distribution name is agentguard-tech; Python imports use agentguard. The TypeScript package is an independent release named @the-bot-club/agentguard.

Install

pip install agentguard-tech

Quick start

from agentguard import AgentGuard

guard = AgentGuard(api_key="ag_live_...")
decision = guard.evaluate(tool="shell_exec", params={"cmd": "rm -rf /"})
# → {"result": "block", "riskScore": 95, "reason": "...", "durationMs": 1.2}

evaluate() returns the camelCase keys that POST /api/v1/evaluate returns:

Key Value
result "allow", "block", "monitor" or "require_approval"
riskScore int, 0–1000
reason str
durationMs float
matchedRuleId str, present only when a rule matched

A kill-switch block additionally carries killSwitchActive: True. Other optional fields the API may add on a block or require_approval include agentId, approvalId, approvalUrl, suggestion, docs, alternatives, notice, warnings and pii — treat anything beyond the five keys above as optional.

With local_eval=True and a cached policy bundle, evaluate() runs in process and returns those same keys, so callers never have to branch on which path produced a decision.

Policy templates

list_templates() returns the template ids this deployment actually serves; get_template(name) and apply_template(name) take an id from that list. The set of ids is a property of the deployment, not of this package.

OpenClaw compatibility hook

OpenClawGuard is a Python-side HTTP adapter for a structural before_tool_call hook. Strict mode is required and returns a block decision on HTTP failure. strict=False is a hard startup error. The hook can be disabled or bypassed and owns no raw capability under a separate identity, so it is compatibility telemetry only.

from agentguard.integrations.openclaw import openclaw_guard

guard = openclaw_guard(
    api_key=os.environ["AGENTGUARD_API_KEY"],
    agent_id="ops-dispatch-1",
    strict=True,
)

OpenClaw-provided session, run, and tool-call IDs are correlation data only. Other integration modules in this distribution are compatibility adapters; their presence is not evidence of runtime coverage or equivalent v1 feature scope.

Telemetry

Telemetry is opt-in and off by default. Nothing is sent unless you construct the client with telemetry=True:

guard = AgentGuard(api_key=key, telemetry=True)   # opt in
guard = AgentGuard(api_key=key)                   # default: nothing sent

When you opt in, the SDK sends one anonymous ping to POST {base_url}/api/v1/telemetry per client instance, on the first evaluate() call. The payload is exactly four fields:

Field Value
sdk_version this distribution's version, e.g. 0.15.0
language python
node_version the Python version, e.g. python/3.12.14
os_platform platform.system().lower(), e.g. linux

No API key, tool name, parameters, policy, decision, hostname, or IP-derived identifier is included, and the ping is fire-and-forget on a daemon thread — it never raises and never delays an evaluation.

Setting the environment variable AGENTGUARD_NO_TELEMETRY=1 force-disables the ping even when telemetry=True is passed.

This is separate from your own audit trail: in local_eval=True mode the client batches decision records to POST /api/v1/audit under your API key. That is your tenant's data, not usage telemetry, and it is not controlled by this setting.

Documentation

Licence

Business Source License 1.1. The LICENSE file shipped in this distribution is authoritative. © 2026 The Bot Club Pty Ltd (ABN 99 695 980 226).

Metadata

Release files for agentguard-tech 0.15.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agentguard-tech 0.15.0
File Size Uploaded Provenance
agentguard_tech-0.15.0.tar.gz 63.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for agentguard-tech 0.15.0
File Interpreter ABI Platform
agentguard_tech-0.15.0-py3-none-any.whl Python 3 none any Details

Total release size: 119.8 kB

Release files / agentguard_tech-0.15.0.tar.gz

Download URL agentguard_tech-0.15.0.tar.gz
Size 63.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2d27100cc2002c048939be961be11381d9c8325a745f55f39bf276cb0a0439b9
BLAKE2b-256 checksum
How to use checksums
6ddace7054fbaef843e2c4b4bd12c4840beda8f847402be6d52bcd56e1a1ec6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Release files / agentguard_tech-0.15.0-py3-none-any.whl

Download URL agentguard_tech-0.15.0-py3-none-any.whl
Size 56.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f62f449a543a78a5b0e8f556030aa2c95ca2ce79128fd8de740afae68d1cac0d
BLAKE2b-256 checksum
How to use checksums
75e6a674352d25beba70debc7716b9e062afb05b8fa3fe67a536b1c7051d5f54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

Security for agentguard-tech 0.15.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for agentguard_tech-0.15.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page