Catalog PyPI
PACKAGE EXPLORERView in registry

agentguard-tech

PyPI

AgentGuard Python compatibility SDK for HTTP policy evaluation and integration adapters.

agent-securityai-agentsmcpopenclawpolicy-engineruntime-security
Versions collected1
Direct dependencies0From release 0.15.0
Last observed20 Oct, 22:07 UTC

README

Version 0.15.0 documentation

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:

KeyValue
result"allow", "block", "monitor" or "require_approval"
riskScoreint, 0–1000
reasonstr
durationMsfloat
matchedRuleIdstr, 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:

FieldValue
sdk_versionthis distribution's version, e.g. 0.15.0
languagepython
node_versionthe Python version, e.g. python/3.12.14
os_platformplatform.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).

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.15.020 Sept 20260

Package advisories

0
No matching advisories collected

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

Repository

PENDING
thebotclub/agentguard-core

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:07 UTC

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

Record identity

package:ad62fda098f39c350d47eacee5eb67a465185774ea728f86e80fddc7ef07e492