r/AIToolCompare • • 14d ago

beyond model level protection

Fairly new to agents. Model guardrails seem to catch the obvious stuff, but once the agent calls a tool the request goes straight to the API and no layer checks it on the way. I'm trying to understand what people put in that gap before letting agents near prod, and budget for extra tooling is close to zero right now.

13 Upvotes

12 comments sorted by

1

u/TerranceEatsFlowers 14d ago

which framework are you on? some have tool allow lists built in that cover the basics for free

1

u/CommissionBorn4257 13d ago

A simple Python setup, no framework yet.

2

u/ResolveAvailable9412 14d ago

i've used a simple proxy layer with request validation and rate limiting, cheap, runs on a small vps, and catches 90% of risky tool calls before they hit the api.

2

u/Plastic-Guilty 14d ago

Whats your stack. There are various methods and layers to add and it depends on stack, goal & hardware capabilities. (Some mitigation) 

A simple answer: 

  1. Claude/qwen/chatgpt ->
  2. Lora(250mb files, trained via huggingface and heavy compute)->
  3. Skills.md(written files that agents read and use as instruction and guidence)->
  4. Routing layer (checks request before it touches any LLM can be coded in or use another system for defining user intent) 

As for a routing layer something clever and cheaper. JEV or googles new classfication system asks 1000 Yes no questions to classify a user request £0 input tokens 0.10p per million output. Is this a sales, customer service, marketing, admin request before any input tokens. 

Are you adding .md files as layers on a frontier model hosted where? Local, open AI/Anthropic 

Are you fine tuning a open source model like qwen 7b-14b-26b. Creating training data points to fine tune - tools, policy, language. 

Purely adding LoRa adapters - personas, skills. Small 250- 500mb files that attatch a model like qwen, claude, gemini. This could be a Marketing director, Ui specilist, Compliance officer. 

Then calls would define which Lora is chosen for the request. 

Then you can go further: distallation, webspace programming its crazy. 

Its all new so experiment and keep documentation. Sign up for google dev program $230 free credits. 

1

u/Deep-Ostrich9298 14d ago

Least privilege on the APIs the tools call comes first, because if a tool can delete, assume the agent eventually will.

1

u/HotVacation2526 14d ago

used a local middleware with json schema validation, caught malformed requests and unauthorized actions before they hit the api. simple, cheap, and caught a few weird edge cases during testing.

1

u/Signal-Scientist-899 13d ago

Human confirmation for destructive tools is the cheapest control there is, and it covers a surprising amount.

1

u/ExpertAd1567 13d ago

What if the agent does something wrong? Can we stop it in time?

1

u/No-Pool9398 13d ago

Prod can wait until you've watched the agent run on a copy of your data for a while.