Recipes
Guard deployments
For an agent that ships code, in 15 frameworks.
Last reviewed 2026-10-02
Staging deploys run on their own; production waits for a person.
The rule
{
"name": "deploy-guard",
"effect": "require_approval",
"priority": 10,
"match_path": "/tools/deploy_service",
"conditions": [
{
"field": "environment",
"op": "eq",
"value": "production"
}
]
}Measured on production (2026-10-02, rule tester): the risky call below matches this rule and the safe one does not.
| Risky | {"service": "billing", "environment": "production"} |
|---|---|
| Safe | {"service": "billing", "environment": "staging"} |
Pick your framework
| Framework | Tool name CAIN sees | Plugs into |
|---|---|---|
| Python (any function) | deploy_service | the function that acts |
| LangChain | deploy_service | your agent's tool list |
| LangGraph | deploy_service | the tools your graph's nodes call |
| OpenAI Agents SDK | deploy_service | function tools |
| CrewAI | deploy_service | CrewAI's before-tool-call hooks |
| LlamaIndex | deploy_service | FunctionTool |
| Pydantic AI | deploy_service | an agent capability |
| AutoGen (agentchat) | deploy_service | the callables you give AssistantAgent |
| Google ADK | deploy_service | the functions in an agent's tools |
| Claude Agent SDK | mcp__ops__deploy_service | PreToolUse hooks |
| MCP client (Python) | deploy_service | any MCP client session |
| OpenTelemetry | deploy_service | your existing tracing |
| Any other framework | deploy_service | any Python callable |
| TypeScript / JavaScript | deploy_service | any async function |
| HTTP (any language) | deploy_service | your own call site |
Try CAIN-42 on your own agents
Create a free account and every new account starts with a 7-day trial of the full platform. Or try the sandbox first, with no account at all.
Create a free account → · Try the sandbox · See the whole ecosystem