Trust But Verify

A small local model that stops an AI agent from making up tool arguments.

2026. Built with TypeScript, Strands Agents, Amazon Bedrock, Python.

Source

AI agents often make up arguments for tool calls. Ask “What’s the weather?” without naming a city and many will call get_weather("Paris"). With tools that send payments or delete files, that’s a real problem.

For a hackathon, I put a small local model (2B parameters) in front of every tool call an Amazon Bedrock agent makes. If the arguments don’t come from the conversation, the call is blocked and the agent asks the user instead.

  • The guardrail is a reusable piece that drops into any TypeScript Strands agent.
  • It runs locally and offline, so each check costs nothing.
  • An evaluation script runs both agents side by side: the unguarded one guesses, the guarded one asks.

All projects