I built a Safety Kernel for Crews - blocks dangerous file ops automatically

Hey CrewAI community! :waving_hand:

I’ve been working on kernel-level safety for AI agents and wanted to share a demo specifically for CrewAI.

The Problem: Agents can hallucinate dangerous operations like rm -rf or DROP TABLE. Prompt engineering alone can’t reliably prevent this.

The Solution: Agent OS intercepts these at the kernel level - before they execute.

Demo

I just submitted a PR to crewAI-examples: feat: Add Agent OS safety governance example by imran-siddique · Pull Request #300 · crewAIInc/crewAI-examples · GitHub

Run it yourself:

git clone https://github.com/imran-siddique/agent-os
cd agent-os/examples/crewai-safe-mode
python crewai_safe_mode.py

What it does:

  • :white_check_mark: Wraps your CrewAI agents in a safety kernel
  • :white_check_mark: Blocks operations like rm -rf, sudo, chmod 777
  • :white_check_mark: Maintains full audit log of all agent actions
  • :white_check_mark: Zero code changes to your existing crews

Screenshot

Image: Agent OS Demo →
agent-os/examples/crewai-safe-mode/demo.svg at master · imran-siddique/agent-os

Would love feedback on:

  1. What other operations should we block by default?
  2. Would this be useful as a native CrewAI integration?

Happy to contribute upstream if there’s interest! :shield: