{
  "id": 5042320,
  "title": "Built a zero-latency AST bouncer for local agent tool-calling",
  "url": "https://urgent.news/2026/09/02/built-a-zero-latency-ast-bouncer-for-local-agent-tool-calling",
  "topic": "ai",
  "section": "AI",
  "published": "2026-09-02T07:27:27.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ivegotahunnitonit/built-a-zero-latency-ast-bouncer-for-local-agent-tool-calling-3lk6"
  },
  "original_language": "en",
  "account": "Developers have created a zero-latency tool to prevent unsafe tool-calling in local agent systems. This innovation addresses the frustration many feel with current safety guardrails for autonomous agents. When running local LLMs to execute bash scripts or database queries, calling a remote cloud moderation service adds significant latency and breaks the local privacy guarantee. Furthermore, LLM-as-a-judge evaluators can still be vulnerable to jailbreak attempts.\n\nThe solution involves a deterministic compiler AST (Abstract Syntax Tree) evaluator. This in-process evaluator parses Python, SQL, and Bash code blocks directly in the caller's memory before execution. If an agent attempts to perform catastrophic filesystem deletes, database DDL purges, dynamic Python sandbox breakouts, unauthorized reads of sensitive paths, or high-entropy credential exfiltration, the tool execution is aborted within 40 microseconds (0.00004s) within Python memory, with zero OS syscalls spawned.\n\nThis powerful tool, named btp-guard, has been released on PyPI and can be installed using the command bash pip install btp-guard.",
  "summary": "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: It adds 1,500ms–2,500ms of cloud latency to every…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}