I Built a Kill Switch for AI Agent Tool Calls — and Used SigNoz to Prove It Worked
Summary
TRACEBACK is a system designed to implement a "kill switch" for AI agent tool calls, preventing syntactically valid but unsafe actions. It addresses the problem where an AI agent might propose a dangerous action, like refund_tool(order_id="1234", amount="free"), which is valid API-wise but violates business rules. TRACEBACK separates responsibilities: the agent proposes, a deterministic policy gate decides whether to allow the action, and OpenTelemetry with SigNoz records evidence. The system demonstrates two runs: an unsafe baseline where the tool is attempted, and a guarded replay where an in-process TypeScript policy gate blocks the action, evidenced by the absence of a tool.refund_tool span in SigNoz traces. It uses traces, logs, and metrics for comprehensive observability, including a traceback.policy.blocked_refunds metric.
Key takeaway
For AI Engineers building agentic systems, you must implement a robust, deterministic policy gate as the security boundary for tool calls. Do not rely solely on prompt engineering for safety; instead, let your model propose actions, but ensure deterministic code explicitly decides execution. Use comprehensive observability, like OpenTelemetry and SigNoz, to verify that unsafe actions are blocked before reaching any external tool, providing auditable proof of prevention.
Key insights
A deterministic policy gate, not the AI model, must serve as the security boundary for agent tool calls.
Principles
- Validate actions before side effects.
- A proposal is not permission.
- Observability proves prevention, not just logging.
Method
Implement a deterministic, in-process policy gate to evaluate agent proposals against business rules, emitting OpenTelemetry signals (traces, logs, metrics) to an observability platform like SigNoz to prove execution flow and blocking decisions.
In practice
- Use OpenTelemetry to trace agent proposals and policy gate decisions.
- Configure a policy gate to check instruction patterns and proposed amounts against stored data.
- Monitor policy.gate.evaluate error statuses and missing tool spans for proof of blocking.
Topics
- AI Agents
- Tool Calls
- Policy Gates
- OpenTelemetry
- SigNoz
- AI Safety
Best for: AI Engineer, MLOps Engineer, AI Security Engineer
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by Artificial Intelligence on Medium.