agentgate
The security gateway for AI agents. Enforce authentication, rate limiting, and policy controls between users and AI agents — in one line of code.
Install
pip install agentgate
With LangChain:
pip install "agentgate[langchain]"
With OpenAI Agents SDK:
pip install "agentgate[openai]"
Everything:
pip install "agentgate[all]"
Quickstart
Get your free API key at https://agent-gate-rho.vercel.app/
Any agent (generic)
from agentgate import with_agent_gate, AgentGateOptions
secured = with_agent_gate(my_agent, AgentGateOptions(
api_key="ag_your_key_here"
))
result = secured.run("delete_file", {"path": "/etc/passwd"})
LangChain
from agentgate import AgentGateLangChainCallback, AgentGateOptions
from langchain.agents import AgentExecutor
callback = AgentGateLangChainCallback(
AgentGateOptions(api_key="ag_your_key_here")
)
agent_executor = AgentExecutor(
agent=agent,
tools=tools,
callbacks=[callback],
)
OpenAI Agents SDK
from agentgate import wrap_openai_agent, AgentGateOptions
from agents import Agent, Runner
secured = wrap_openai_agent(agent, AgentGateOptions(
api_key="ag_your_key_here"
))
result = await Runner.run(secured, "Send email to all users")
MCP middleware
from agentgate import AgentGateMiddleware, AgentGateOptions
gate = AgentGateMiddleware(AgentGateOptions(api_key="ag_your_key_here"))
# Inline check
result = gate.check("send_email", args, lambda: send_email(args))
# As a decorator
@gate.guard()
def delete_user(user_id: str):
...
Fail-open vs Fail-closed
# Development (default)
AgentGateOptions(api_key="ag_xxx", on_network_error="fail-open")
# Production (recommended)
AgentGateOptions(api_key="ag_xxx", on_network_error="fail-closed")
Policy decisions
| Decision | Behaviour |
|---|---|
| ALLOW | Tool executes normally |
| DENY | Tool blocked, error string returned |
| REQUIRE_APPROVAL | Tool paused, human approves in dashboard |
Links
Dashboard: https://agent-gate-rho.vercel.app/ GitHub: https://github.com/wiserautomation/agentgate Issues: https://github.com/wiserautomation/agentgate/issues
Metadata
Release files for agentgate-sdk 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agentgate_sdk-0.1.0.tar.gz | 7.1 kB | Without provenance | Details for agentgate_sdk-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentgate_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agentgate_sdk-0.1.0-py3-none-any.whl |
Total release size: 14.7 kB
Release files / agentgate_sdk-0.1.0.tar.gz
| Download URL | agentgate_sdk-0.1.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79da5cc8f73420ba61192a54932d76c41c860cd588c4b0db1ee92b0d134f87f2
|
|
BLAKE2b-256 checksum How to use checksums |
bbea4edfe7a9b111b1f35a8fe0de73a09e56c658a618c34b3ba134398f39c9e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Release files / agentgate_sdk-0.1.0-py3-none-any.whl
| Download URL | agentgate_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d97478aba3933b4117424c38f4326ec2393ec466abc5c38c1e1a7dc8ae9afa3
|
|
BLAKE2b-256 checksum How to use checksums |
861a6e409e2b77da1aa3cd50c1ff3d3ece5e5ff6b2c3b0b5fffd72d54e128d08
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.3
|
Security for agentgate-sdk 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.