crewai-agentgate
Gate any CrewAI tool behind human approval in Slack or Microsoft Teams — one wrapper, no rewrite.
pip install crewai-agentgate
Usage
from agentgate import AgentGate
from crewai_agentgate import ApprovalRequiredTool
gate = AgentGate(api_key="ag_your_key")
gated_publish = ApprovalRequiredTool(
wrapped_tool=publish_content_tool, # any existing CrewAI BaseTool
gate=gate,
risk_tier="high",
timeout_minutes=15,
)
Give gated_publish to an Agent anywhere publish_content_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.
publisher = Agent(
role="Content Publisher",
goal="Publish approved content to the appropriate platforms",
tools=[gated_publish],
)
If rejected, the tool call returns the rejection reason as its output instead of raising — so the agent sees "the action was rejected because X" and can react to it, rather than crashing the crew.
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.
Parameters
| Parameter | What it does |
|---|---|
wrapped_tool |
The existing BaseTool to gate. Required. |
gate |
An AgentGate (async) or AgentGateSync instance. Required. |
risk_tier |
low / medium / high / critical. Defaults to medium. |
timeout_minutes |
Auto-rejects if nobody responds in time. Defaults to 30. |
approver |
Optional Slack handle to @mention directly, e.g. "@sarah". |
slack_channel |
Optional override of the default connected channel. |
Requires
An AgentGate server — self-hosted or hosted at useagentgate.com — connected to Slack and/or Teams. See the AgentGate docs.
License
MIT
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 crewai_agentgate-0.1.0.tar.gz.
File metadata
- Download URL: crewai_agentgate-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed109f013f4fc59fa9321d30754c1923fd202e3616f5cbeac792850d5e304742
|
|
| MD5 |
3676494a8a6853cbdb25a8f716aabeaf
|
|
| BLAKE2b-256 |
6066d2fc61fbe0e0caecc89a0b40835eecb5fa03b121942c92e5d048f8e426f5
|
File details
Details for the file crewai_agentgate-0.1.0-py3-none-any.whl.
File metadata
- Download URL: crewai_agentgate-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13c71c72bcb4a3c0596b758d80c3bb80c23c4669e41d036e8a2bf139a5184e64
|
|
| MD5 |
025713d70076e3e60e6f9f83d5eb276e
|
|
| BLAKE2b-256 |
c61650b76bffd6589fdd150f34804dde224bb8a1950ccb5e3efdda7dc27193a2
|