Guardrails for AI apps and agents
Everything your AI sends and receives, checked first.
in/guard/out sits between your app and its model. Private data is masked before it reaches the model, wrong numbers are caught before they reach a person, and risky agent actions are stopped before they run.
Setup is two lines of code.
Every request & response is checked on the way through
What goes wrong when AI does real work
Newer models cost more, and even the best of them still make these mistakes – cheaper ones more often.
- 01
Customer data goes to a third party
Every prompt that mentions a customer sends their name, email or account number to the model provider.
- 02
Answers quietly change the numbers
A figure drifts from the source, or a total doesn’t add up – and it reads just as confidently as the right one.
- 03
Agents follow instructions they shouldn’t
A line hidden in an email or a web page can steer an agent into sending data out, or paying the wrong account.
- 04
Nobody sees what the agent did
Dozens of steps, tool calls and model calls per task – with no record of what ran, what it touched, or what it cost.
How a request becomes a safe answer
in/guard/out checks traffic in both directions: what your app sends to the model, and what comes back.
- 1Your app
Your AI agent sends a request
Same SDK, same prompts – it just calls in/guard/out instead of the model.
- 2in/guard/out
Checked on the way in
Private data becomes placeholders, and the request is scanned before a token is spent.
mask private datainjectionbudget - 3Your model
LLM model answers
OpenAI, Claude, OpenRouter or a local model – it receives the masked request, not the real data.
- 4in/guard/out
Checked on the way out
Figures are checked against the source and every tool call against your rules – then the real data is put back.
fact-checktool rulesformat & safetyrestore data - 5Your app
Delivered and recorded
Your app gets the answer – fixed, or blocked with the reason. Every step is on record, with its cost.
What it does
Private data stays private
Names, emails, cards and IDs are masked before anything reaches the model provider, and restored on the way back. They can’t slip out through a tool call either.
Data protection →Wrong numbers get caught
Every answer is checked against its source: the maths is recomputed, figures are matched, unsupported claims are flagged. Safe fixes are applied automatically.
Fact-checking →Risky actions don’t run
An agent’s tool call has to pass your rules first: which tools, how risky, within what budget. A payment to an account the agent never read about doesn’t go out.
Agent security →Try it: see what gets caught.
Pick a case – a prompt carrying private data, an answer with wrong numbers, or an agent action – and see every check’s verdict.
In Block mode anything that fails is stopped. In Fix & log mode what has one safe fix is repaired, and the rest is recorded and let through.
July–August revenue was $4.5M, with August alone at $1.9M – up 14% on the prior quarter.
- blockgrounding · arithmetic2.4 + 1.8 = 4.2, not 4.5
- blockgrounding · figuresAugust is $1.8M in the source
- blockgrounding · direction“up 14%”, but $4.6M → $4.2M is a decrease – no single safe rewrite
Block stops anything that fails a check and returns the reason, so the caller can’t miss it. Private data is masked in both modes.
See what your agent actually did.
Every step is recorded: the model calls, the tool calls and how risky each one was, what was stopped, and what the run cost.
Agents resend their whole history on every step, so in/guard/out can rebuild the full run as it happens – and enforce limits on the run as a whole, like budgets and loops.
How agent security works →- #1openai/gpt-4ookreadsearch_orders{"order_id":"4471"}↻2
- #2openai/gpt-4ookinjection
- #3openai/gpt-4ooknetworksend_email{"to":"<EMAIL_ADDRESS_1>"}taint
- #4checkpointblockedpaymentpay_via_bank{"iban":"DE89…"}ungrounded
- injection
poisoned tool result, step 2 - taint
screened email leaving via send_email - ungrounded
IBAN absent from the run’s sources - ↻ repeat
same call fingerprint as step 1
Live in three steps
Change two lines
Point your SDK’s base URL at in/guard/out and use your in/guard/out key.
client = OpenAI(
− base_url="https://openrouter.ai/api/v1",
− api_key="sk-or-…",
+ base_url="https://api.inguardout.com/v1",
+ api_key="gr-…",
)Watch first
Checks start in Fix & log: safe fixes are applied, everything else is recorded, nothing is blocked.
Block when ready
Switch the checks that matter to Block – per key, per user, or per request.
See it on your own traffic
Put in/guard/out between your AI and its model.
Start in Fix & log, see what gets caught, then decide what to block.