Built a zero-latency AST bouncer for local agent tool-calling A developer has released btp-guard, an open-source Python package that performs in-memory AST-based safety checks on code blocks generated by local LLM agents before execution. The tool parses Python, SQL, and Bash code to block dangerous operations like file deletion, database drops, and privilege escalation in under 40 microseconds, eliminating the need for remote moderation endpoints. Hey everyone, Like many of you, we got frustrated with the current state of safety guardrails for autonomous agents. When you're running local LLMs via Ollama, vLLM, or LM Studio to execute bash scripts or database queries, calling a remote cloud moderation endpoint Bedrock, OpenAI Moderation defeats the entire purpose of running locally: Instead of asking another model if a proposed command is safe, we built an in-process Abstract Syntax Tree AST evaluator that parses Python, SQL, and Bash code blocks directly in caller memory before execution. If an agent attempts: rm -rf , mkfs , raw device writes DROP TABLE , TRUNCATE . class . base . subclasses /etc/shadow , .env , id rsa The tool execution is aborted in under 40 microseconds <0.00004s directly inside Python memory, with zero OS syscalls spawned. It's published on PyPI as btp-guard : bash pip install btp-guard