Catalog PyPI
PACKAGE EXPLORERView in registry

agent-gatekeeper

PyPI

Identity and permission layer for AI agents — Auth0 for agents

agentsaiauthgatekeeperidentityllmpermissionssecurity
Versions collected1
Direct dependencies4From release 1.0.0
Last observed20 Oct, 22:01 UTC

README

Version 1.0.0 documentation

AgentGate

PyPI Python License: MIT

Auth0 for AI agents — verifiable identity, scoped permissions, human-approval escalation.

AgentGate gives every AI agent a cryptographic identity, enforces deny-by-default permissions through YAML-defined policies, and escalates high-risk actions to a human before they execute.

Quick Start

pip install agent-gatekeeper
from agentgate import AgentIdentity, PermissionPolicy, GateKeeper, Action
from agentgate.policy import ActionRule

# 1. Create an agent identity
agent = AgentIdentity.create("research-bot", capabilities=["search", "summarize"])

# 2. Define a permission policy
policy = PermissionPolicy(
    name="research-policy",
    rules=[
        ActionRule(action=Action.TOOL_USE, allowed=True, allowed_targets=["search"]),
        ActionRule(action=Action.LLM_CALL, allowed=True, max_per_minute=10),
        ActionRule(action=Action.SHELL, allowed=False),
    ],
)

# 3. Enforce at runtime
gate = GateKeeper(identity=agent, policy=policy)

decision = gate.check("tool_use", target="search")
print(decision.type)  # DecisionType.ALLOW

decision = gate.check("shell")
print(decision.type)  # DecisionType.DENY

Features

  • HMAC-signed identity — every agent gets a unique key pair for message signing and verification
  • Deny-by-default policies — nothing is allowed unless explicitly permitted
  • YAML round-trip — define policies as code, load and save from YAML files
  • Target-level scoping — allow specific tools, files, or endpoints while denying others
  • Usage thresholds — escalate or hard-deny after N uses of an action
  • Rate limiting — cap actions per minute to prevent runaway agents
  • Human-approval escalation — plug in your own approval handler (Slack bot, CLI prompt, webhook)
  • Decision audit log — full history of every gate check for observability

API Reference

AgentIdentity

Verifiable identity for an AI agent, backed by HMAC-SHA256.

MethodDescription
AgentIdentity.create(name, capabilities=None)Create a new agent with a generated UUID and secret key
agent.sign(message) -> strSign a message string, returns hex digest
agent.verify(message, signature) -> boolVerify a signature against this agent's key

Fields: id, name, capabilities, created_at, secret_key, metadata

PermissionPolicy

Deny-by-default permission policy with YAML serialization.

MethodDescription
policy.check(action, target=None) -> strReturns "allow", "deny", or "escalate"
policy.get_rule(action) -> ActionRuleGet the rule for a specific action type
PermissionPolicy.from_yaml(path)Load a policy from a YAML file
policy.to_yaml(path)Save a policy to a YAML file

Actions: tool_use, llm_call, file_read, file_write, network, shell, data_access

GateKeeper

Runtime enforcement engine that combines identity, policy, thresholds, and escalation.

MethodDescription
gate.check(action, target=None) -> DecisionCheck permission; returns a Decision object
gate.is_allowed(action, target=None) -> boolConvenience boolean check
gate.require(action, target=None) -> DecisionCheck and raise PermissionError if denied
gate.decisions -> list[Decision]Full audit history of all gate checks

Decision fields: type (ALLOW/DENY/ESCALATE), agent_id, action, target, reason, timestamp, approved_by

Architecture

┌─────────────────────────────────────────────────────┐
│                    Your Agent                       │
│                                                     │
│   action request                                    │
│        │                                            │
│        v                                            │
│   ┌──────────┐    ┌──────────────────┐              │
│   │GateKeeper│───>│PermissionPolicy  │              │
│   │          │    │  (YAML rules)    │              │
│   │          │    └──────────────────┘              │
│   │          │                                      │
│   │          │──> threshold / rate-limit check      │
│   │          │                                      │
│   │          │──> escalation ──> approval_handler() │
│   │          │                     (human / webhook)│
│   └──────────┘                                      │
│        │                                            │
│        v                                            │
│   Decision(ALLOW / DENY / ESCALATE)                 │
│   + full audit log                                  │
└─────────────────────────────────────────────────────┘
         │
         v
   AgentIdentity
   (HMAC-signed, UUID-backed)

Comparison

FeatureAgentGateRaw LLM APIsLangChain ToolsCustom middleware
Agent identity with crypto signingYesNoNoManual
Deny-by-default policiesYesNoNoManual
YAML policy definitionYesNoNoNo
Per-action rate limitingYesNoNoManual
Human-approval escalationYesNoNoManual
Decision audit logYesNoNoManual
Zero dependencies beyond pydanticYesN/AHeavyVaries

License

MIT License. See LICENSE for details.

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
1.0.04 Apr 20264

Package advisories

0
No matching advisories collected

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

Repository

PENDING
jblacketter/agent-gate

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:01 UTC

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

Record identity

package:642baab57069ce3fc73e5e8bfa81706b9ee01533dfd4100b77572661dc11676e