Back to feed
Dev.to
Dev.to
6/24/2026
I gave my AI agent database access. Then I built a firewall so it couldn't wipe prod.

I gave my AI agent database access. Then I built a firewall so it couldn't wipe prod.

Short summary

Author describes building agentx-security-sdk, an open-source Python SDK that intercepts destructive agent actions (DROP TABLE, SSRF, bulk secret reads) using offline deterministic rules at the decorator level—no API key needed, no LLM in execution. Unlike input-side LLM security tools, this guards what agents actually do. Includes working code, PyPI package, and quickstart. Author seeks feedback on missing patterns.

  • Autonomous agents don't distinguish destructive SQL (DROP TABLE) from safe queries—one miscalculation during task execution can wipe production
  • Existing LLM security tools guard against prompt injection on the input side; this guards dangerous agent tool outputs before execution
  • agentx-security-sdk uses Python decorators and offline deterministic rules to block destructive patterns with zero latency, no API key required

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Explore more