A human approval step for your CrewAI crew
Guard the tools your CrewAI agents call. The routine runs through; a refund.create or a content.publish that's out of the ordinary waits for a named person, and every verdict gets sealed.
The problem
CrewAI is good at letting a crew run flat out. Agents grab tasks, call tools, hand off to each other, and nobody stops to ask permission. Then one agent in the chain fires something with teeth: a refund.create for £3,800, a content.publish to the live brand account, a code.deploy on a Friday. Your code runs it the moment the model emits the call. Reaching for human_input=True doesn't fix this. It prompts a person on every single run of that task, so you've thrown away the throughput you picked CrewAI for, and you're still trusting whoever's at the keyboard to actually read the args before they type yes.
What you want is narrower than that. Let nearly everything through, and stop only the handful of calls that are unusual by amount, by target, or because they break a rule you set. CrewAI won't draw that line for you. And building the rest yourself, a queue, a notifier, a signed record, a credential check the agent can't talk its way past, is a side project, not a callback you bolt into a crew.
How ClearedBy handles it
-
01
Guard the tool, not the task
Pass a CrewAI tool through guard(), or have an agent call request_clearance before it acts. Now the gate sits on that one call instead of nagging a human every run.
-
02
Policy decides in milliseconds
A £4 refund to a known order, a post to the staging channel, anything inside your rules: cleared instantly, and the crew never pauses. The unusual calls are the ones that get held.
-
03
A named person picks it up
Held calls land in a fast queue, in Slack, or on someone's phone with the action and its arguments in plain sight. They clear it, reject it, or send it back. The tool only receives a short-lived credential once the verdict is clear, so nothing slips through while the reviewer is at lunch.
-
04
The verdict gets sealed
Cleared, auto-cleared, or rejected, each call is written to a hash-linked record tied to the person who signed it. When someone asks what your crew did and who said it was fine, you have the answer.
import os, httpx
from crewai.tools import tool
GATE = "https://app.clearedby.com/v1/gate"
AUTH = {"Authorization": f"Bearer {os.environ['CLEAREDBY_API_KEY']}"}
@tool("issue_refund")
def issue_refund(order: str, amount: float) -> str:
"""Refund an order — cleared by policy or held for a person."""
r = httpx.post(GATE, headers=AUTH, json={
"action": "refund.create",
"params": {"order": order, "amount": amount},
}).json()
if r["status"] != "cleared": # "pending" => a human is deciding
return f"Refund {r['status']} — not run."
return payments.refund(order, amount)
FAQ
Isn't this just CrewAI's human_input=True?
No. human_input pauses that task on every run and leans on the person to read carefully. The crewai-human-approval-step pattern lets policy clear the routine on its own and only holds the calls that are actually unusual, each one signed.
Do I have to rewrite my crew or tasks?
No. You wrap the tools the agents already use, or drop in a single request_clearance call. The crew, the task graph and every other tool stay exactly as they are.
When a task is held, what happens to the agent waiting downstream?
The guarded call simply doesn't return until there's a verdict, so the next agent waits rather than acting on a result nobody approved. Nothing executes quietly and the gate never fails open.
Can an agent dodge the gate by calling the raw function?
No. The real side effect needs a short-lived credential that's only issued after approval, so calling the unwrapped function gets it nowhere. There's no reasoning around it.
How do I start without freezing the crew?
Run it in shadow mode, no card. ClearedBy logs what it would have held against your real traffic so you can tune the policy, then you flip on enforcement when the numbers look right.
Related use cases
Let your agents run. Inside the rules you set.
Guard the tools your CrewAI agents call. The routine runs through; a refund.create or a content.publish that's out of the ordinary waits for a named person, and every verdict gets sealed.