Identity and permission layer for AI agents — Auth0 for agents
Project description
AgentGate
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.
| Method | Description |
|---|---|
AgentIdentity.create(name, capabilities=None) |
Create a new agent with a generated UUID and secret key |
agent.sign(message) -> str |
Sign a message string, returns hex digest |
agent.verify(message, signature) -> bool |
Verify 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.
| Method | Description |
|---|---|
policy.check(action, target=None) -> str |
Returns "allow", "deny", or "escalate" |
policy.get_rule(action) -> ActionRule |
Get 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.
| Method | Description |
|---|---|
gate.check(action, target=None) -> Decision |
Check permission; returns a Decision object |
gate.is_allowed(action, target=None) -> bool |
Convenience boolean check |
gate.require(action, target=None) -> Decision |
Check 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
| Feature | AgentGate | Raw LLM APIs | LangChain Tools | Custom middleware |
|---|---|---|---|---|
| Agent identity with crypto signing | Yes | No | No | Manual |
| Deny-by-default policies | Yes | No | No | Manual |
| YAML policy definition | Yes | No | No | No |
| Per-action rate limiting | Yes | No | No | Manual |
| Human-approval escalation | Yes | No | No | Manual |
| Decision audit log | Yes | No | No | Manual |
| Zero dependencies beyond pydantic | Yes | N/A | Heavy | Varies |
License
MIT License. See LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_gatekeeper-1.0.0.tar.gz.
File metadata
- Download URL: agent_gatekeeper-1.0.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
767aba356d657f589ba80ad96e834f7a20416d5b44b6a89b9b4a12587666ee9f
|
|
| MD5 |
2b44dedb2655c3ca561be55290bc5cc7
|
|
| BLAKE2b-256 |
57e0e368a494384fee5671d04914511755d2dfbe434a2fc73dff3d288172bcc9
|
Provenance
The following attestation bundles were made for agent_gatekeeper-1.0.0.tar.gz:
Publisher:
publish.yml on jblacketter/agent-gate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_gatekeeper-1.0.0.tar.gz -
Subject digest:
767aba356d657f589ba80ad96e834f7a20416d5b44b6a89b9b4a12587666ee9f - Sigstore transparency entry: 1236507844
- Sigstore integration time:
-
Permalink:
jblacketter/agent-gate@9a23d0b936f0dee7c45f0f23ee6d1b8bc3b94652 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/jblacketter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9a23d0b936f0dee7c45f0f23ee6d1b8bc3b94652 -
Trigger Event:
release
-
Statement type:
File details
Details for the file agent_gatekeeper-1.0.0-py3-none-any.whl.
File metadata
- Download URL: agent_gatekeeper-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05119d332a17682b2586eeedd8614f4c4856c3a2942ac3e0af1dc13494386904
|
|
| MD5 |
6d1ba6410c8f16b9f513a7e5614dc7d5
|
|
| BLAKE2b-256 |
47aacb6c4087f847b12bcd3ef03182ab99ee8a6aa4f17d7072265303b119e050
|
Provenance
The following attestation bundles were made for agent_gatekeeper-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on jblacketter/agent-gate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agent_gatekeeper-1.0.0-py3-none-any.whl -
Subject digest:
05119d332a17682b2586eeedd8614f4c4856c3a2942ac3e0af1dc13494386904 - Sigstore transparency entry: 1236507848
- Sigstore integration time:
-
Permalink:
jblacketter/agent-gate@9a23d0b936f0dee7c45f0f23ee6d1b8bc3b94652 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/jblacketter
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@9a23d0b936f0dee7c45f0f23ee6d1b8bc3b94652 -
Trigger Event:
release
-
Statement type: