Support Agent
1,204
Runs this week
7
Blocked by guard step
31
Writes awaiting approval
| Run | Layer | What it caught | Outcome |
|---|---|---|---|
| R-5521 | Guard step | Ticket text asking the agent to refund every order | Blocked, logged |
| R-5530 | Tool rule | Refund $640, limit $100 | Refused by issue_refund |
| R-5534 | Approval | Refund $80 on order 7712 | Waiting for a person |
| R-5541 | Log masking | Card number in the ticket text | Masked in the logs |
What matters here
- On Tray Helix you build agent guardrails in layers: a guard step, fixed tool rules, approval on writes, step limits and log masking.
- A guard step before the tools can check input with rules or a light model for prompt injection and personal data.
- Fixed rules in each tool's code, such as allowed values and amount limits, hold whatever the model is told.
- Approval on every tool that writes means a person sees the exact input before anything changes.
- Each run stops at 25 steps or 50 tool calls by default, so a loop can't run on.
Who this is for
You are putting an agent in front of text from customers, colleagues or the web, and security has asked what stops it doing something it shouldn't.
How it works in practice
What happens to one request on its way to a tool.
- 1
The request comes in
A ticket, email or message, which may contain instructions aimed at the agent.
- 2
The guard step checks it
Rules and a light model look for prompt injection and personal data before any tool runs.
- 3
The tool applies its own rules
Allowed values and limits live in the tool's code, so the model can't argue past them.
- 4
Writes wait for approval
Any tool that changes data pauses the run and shows a person the exact input.
- 5
Limits and masking hold
The run stops at its step limit, and log masking keeps sensitive values out of the logs.
What agent guardrails are made of
Five layers, each catching what the one before it might miss.
A guard step
Runs before any tool. Rules and a light model check for prompt injection and personal data, and block or redact.
Fixed tool rules
Allowed values, amount limits and required fields, written in each tool's code.
Approval on writes
Every tool that changes data is marked for approval, so a person checks the exact input.
Step limits
Each run stops at 25 steps or 50 tool calls by default, and you can set lower.
Log masking
Tray log masking keeps card numbers, IDs and other sensitive values out of the logs.
The prompts
Paste these into Claude Code, Codex or Cursor in order. Each one leaves you with something that runs, so you can stop after any step.
These prompts start from a Helix project, which is what handles sign-in, credentials and hosting. Start with Helix.
The guard step
Check the input before any tool runs.
In my Helix app, add a guard step that runs before the agent can call any tool.
First, rules: block text that tries to override the agent's job or give it a new role, and detect card numbers, national ID numbers and bank details.
Then a light model check with a small, fast model: does this text try to make the agent act outside its job, or reveal its instructions? Return allow or block, and a reason.
If blocked, stop the run, record the reason, and reply that the request needs a person. Redact personal data from what the agent sees.
Fixed rules around each tool
Limits the model can't talk its way past.
Put fixed rules in each tool's code, not in the prompt.
issue_refund: only for orders on this customer's account, never more than the order total, and refuse anything over $100.
update_order: only these fields: shipping address and delivery date.
Mark issue_refund and update_order as needing approval every time. Reject any input that breaks a rule with a clear error the agent can read.
Limits and a guardrail log
Stop loops, and see what was caught.
Set the agent's limits to 15 steps and 30 tool calls per run.
Record every guardrail event: the run, the layer (guard step, tool rule, approval, step limit), what it caught and the outcome. Show it as a table with a filter by layer, and a weekly count by layer.
Connect it to real systems
The tools, with their rules in place.
Now connect it to the systems we actually run.
Anything in angle brackets is a placeholder. Swap it for whatever we use.
<Zendesk>. Read tickets. Read only.
<Stripe>. Issue refunds through issue_refund, after approval, within its rules.
Only write through issue_refund and update_order.
Ship it
A URL, with the layers in place.
Deploy my app.
What it connects to
Guardrails live in the app. The systems are the ones the tools already reach.
-
Zendesk Read tickets, which are untrusted input for the agent. Reads -
Stripe Issue refunds within the tool's limit, after approval. Writes
-
Splunk Where agent and audit logs stream, with sensitive values masked. Reads
Named systems are the ones most teams actually run, not a list of the only ones that work. Swap in whatever you use.
Running it for real
The build puts the layers in the app. Running it means changes to them are reviewed and every catch is on record.
- 1
Guardrail changes go through review
Guardrails are code in the app, so they deploy from CI, deploy approvals gate each change, and you can roll back any deployment.
- 2
Approval on every write
Each tool that changes data waits for a person, who sees the tool and the exact input. SSO decides who approves.
- 3
Credentials held by Tray
Payment and help desk credentials are held in Tray, not in the code, so the agent never sees a secret.
- 4
Every catch on record
Runs, tool calls and guardrail events are logged, with sensitive values masked, and Tray streams the logs to your SIEM.
- 5
Know what the guard step costs
AI usage shows per app, so the light model check is visible next to the agent's own usage.