langchain-agentgate
Gate any LangChain tool behind human approval in Slack or Microsoft Teams — one wrapper, no rewrite.
pip install langchain-agentgate
Usage
from agentgate import AgentGate
from langchain_agentgate import ApprovalRequiredTool
gate = AgentGate(api_key="ag_your_key", base_url="https://your-agentgate-instance")
gated_send_email = ApprovalRequiredTool(
wrapped_tool=send_email_tool, # any existing BaseTool
gate=gate,
risk_tier="high",
timeout_minutes=15,
)
Use gated_send_email anywhere send_email_tool would have gone — same name, same
input schema, same output type. The only difference: before it actually runs, it posts
a request to Slack/Teams and blocks until a human clicks Approve or Reject.
result = await agent_executor.ainvoke({"input": "email the Q4 proposal to john@acme.com"})
If rejected, the tool call returns the rejection reason as its output instead of raising — so the agent sees "the email was rejected because X" and can react to it, rather than crashing.
Why wrap instead of rewrite
Most human-in-the-loop patterns require restructuring how you build the tool. This
doesn't — it wraps a BaseTool you already have. Your tool's logic, its args schema,
and its name are all unchanged; approval is a layer around it, not a rewrite of it.
Requires
An AgentGate server — self-hosted or hosted — connected to Slack and/or Teams. See the AgentGate onboarding guide.
License
MIT
Metadata
Release files for langchain-agentgate 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 |
|---|---|---|---|---|
| langchain_agentgate-0.1.0.tar.gz | 7.3 kB | Without provenance | Details for langchain_agentgate-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_agentgate-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for langchain_agentgate-0.1.0-py3-none-any.whl |
Total release size: 11.1 kB
Release files / langchain_agentgate-0.1.0.tar.gz
| Download URL | langchain_agentgate-0.1.0.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c0d1b4d59ee134904f9789c0bfb1f88749ac6db337afc94cec061263882577a
|
|
BLAKE2b-256 checksum How to use checksums |
7895ece1c991ff5d338966b8ad69bbcc4d1a70699df62488e4c6f36e1e82d672
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / langchain_agentgate-0.1.0-py3-none-any.whl
| Download URL | langchain_agentgate-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1fff60035d2f9b0e5ce91a9697077317fc2c55c37cb2491c710db35d03c26c69
|
|
BLAKE2b-256 checksum How to use checksums |
9f136f035507f952d9a387bbf4b17fe39c0289ded9a012891d8fe6f946b27b3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for langchain-agentgate 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.