CrewAI uses LangChain’s callback protocol under the hood, so the LangChain integration applies directly. PassDocumentation Index
Fetch the complete documentation index at: https://docs.benchspan.com/llms.txt
Use this file to discover all available pages before exploring further.
BenchGuard as a callback on the Crew and every tool output flowing through any agent gets scanned.
Python only. CrewAI doesn’t publish an official TypeScript SDK.
Install
Usage
crew.py
What gets scanned
Every tool result returned to the LLM inside any agent of the crew. System prompts and agent-to-agent messages (theassistant role) are not scanned; they’re inside your trust boundary.
Common pitfalls
My tool returns a dict / structured object, not a string
My tool returns a dict / structured object, not a string
BenchGuard only scans string content. If your tool returns a dict, convert to JSON before returning, or scan the relevant string field(s) manually with
guard.scan(text, role="tool").I want different modes per agent
I want different modes per agent
Construct one
BenchGuard per agent and attach each crew-by-crew. You can have some crews in warn mode for evaluation and others in block for production.