← All guides · Published November 14, 2026 · Reviewed November 14, 2026 · Ingenious AI team
Custom Rules for Agent Log Monitoring: When the Nine Patterns Are Not Enough
The short answer
A custom rule is a rule you declare yourself — matched against a log entry's tool and arguments — for the boundary concerns specific to your operation that the nine built-in patterns do not name. In BoundaryVault it is the ninth pattern, severity medium, and a Pro capability. Its value is precision: a rule written for your estate, your tool names and your prohibited destinations catches your risks in your vocabulary, so findings arrive pre-triaged by the team that wrote them. Check your own log with the free log scan.
What is a custom rule for agent logs?
Custom-rule is one of BoundaryVault's nine patterns: operator-declared rules (Pro) matched against tool and arguments in each logged action. Like every pattern it produces findings with rule id, pattern, severity, timestamp, action index, agent, tool and a redacted excerpt of at most 240 characters.
What custom rules are for
The built-in patterns encode general boundaries: credentials, minting, scope, wallets, egress, privilege, handoffs, chains. Every operation also has local boundaries no vendor can guess — a legacy system the agent must never touch, a test environment that must stop appearing in production logs, a specific internal tool whose use after hours means something went wrong. Custom rules are where those live. A good test for a candidate rule: you can finish the sentence 'if this ever appears in a log, a human should look the same day because…' If the because is vague, the rule will be noise.
Writing rules that age well
Anchor rules to stable facts: exact tool names, argument names, named destinations — not to wording that a framework update will rephrase. Write one rule per concern so findings stay attributable; a compound rule that fires for three reasons teaches reviewers to shrug. And date your rules: each carries the decision that created it, so a future reviewer can tell a live control from an archaeological leftover. Review the rule set quarterly with the same discipline as the scope config, because a rule set nobody maintains quietly turns into either a blindfold (rules deleted in frustration) or a boy-who-cried-wolf machine (rules ignored in practice).
Severity and response are yours to set
Custom-rule findings arrive at medium severity, but the response protocol is your declaration too. For each rule, write the first step: who looks, what 'confirmed' means, what the fix looks like. A rule without a response is an observation, and observations pile up unread. Keep the protocol beside the rule, in the same review cycle as your scope declarations, so the day a rule fires for the first time is not the day the team invents its meaning under pressure.
What custom rules cannot replace
They do not extend the detector's understanding: a custom rule matches what you declared, against tool and arguments; it does not create new decodings, new secret shapes, or judgement about undeclared scope. Novel exfiltration techniques remain out of scope, as the platform states. Treat custom rules as the sharpening of a declared-rule system, not a substitute for declaring scope, egress and privilege properly — most teams that reach for custom rules first discover, in the writing, the declarations they actually needed to make.
A worked example: Rowan Veterinary Group
Example — fictional operator, illustrative numbers. Rowan Veterinary Group, a fictional clinic chain, wrote 3 custom rules: never touch the legacy billing tool, never call the records exporter outside the nightly job's window, and flag any action naming their test clinic in a production log. In the first month — 141,000 actions scanned — the rules fired 5 times: 3 test-clinic mentions traced to a stale prompt template, 2 exporter calls traced to a misconfigured retry, and 0 billing-tool touches. Each rule's written response protocol meant every firing closed within 1 working day, and the quarterly review retired none and reworded one.
| Measure | Figure | What it showed |
|---|---|---|
| Custom rules declared | 3 | Billing tool, exporter window, test clinic |
| Actions scanned in month one | 141,000 | 5 custom-rule findings |
| Causes | 3 stale prompts, 2 misconfigured retries | 0 billing-tool touches |
| Closure time | Within 1 working day each | Response protocol written in advance |
See how the plans differ on log size and batch work on the pricing page, and how the detector reads a log in the detector docs.
The checklist: five actions
- Apply the same-day test. Only write rules where a human should look the same day, for a reason you can state in one sentence.
- Anchor to stable facts. Match exact tool names, argument names and named destinations — not fragile wording.
- Write one rule per concern. Keep findings attributable; compound rules train reviewers to ignore them.
- Attach a response protocol. For each rule, record who looks, what confirmed means, and what the fix is, beside the rule itself.
- Review quarterly. Prune or reword stale rules on the same cycle as your scope declarations.
Run the free log scan · More agent-security tools from Ingenious AI
Related guides
How to Read a BoundaryVault Report, Finding by Finding
A Weekly Agent Log Review Routine That Actually Happens
Free vs Pro Agent Log Scans: What the Limits Actually Mean
How Long Should You Keep AI Agent Logs? An Audit-Trail Retention Guide
Agent Log Forensics: Finding Credential Grabs After the Fact
Dry runs are where custom rules earn trust
BoundaryVault lets you dry-run a rule before it joins the saved policy, and that step is the whole discipline. Run the draft against a period you have already reviewed by hand. Every hit should be a case you recognise; every miss you expected is a rule written narrower than your intent. A rule that fires on nothing in a known-bad window is not conservative — it is broken, and the dry run is the only cheap place to learn that.
Keep the dry-run results with the policy version. When a custom rule later fires in an incident, the first question is whether the rule means what its author meant. The dry-run record answers it: here is what it caught when tested, here is what it deliberately ignored. Rules without that record get argued about during incidents, which is the most expensive possible time to discover a rule was ambiguous.
Sources
Retiring rules is part of the craft
Custom rules accumulate the way permissions do — added in a moment of concern, never revisited. A rule written for a vendor integration you dropped last year still fires, still gets triaged, still costs attention, and slowly trains reviewers to treat custom findings as noise. Give every rule a review date when you write it, and retire rules whose boundary no longer exists with the same ceremony as adding them: a note in the policy history, a final dry run, done. A small rule set that everyone believes beats a museum of good intentions.
Frequently asked questions
What is a custom rule in BoundaryVault?
Your own declared rule, matched against a logged action's tool and arguments. It is one of the nine patterns, severity medium, and a Pro capability.
What makes a good custom rule?
A specific local boundary with a clear reason: a tool that must never be touched, a destination that must never appear, a system that belongs to another environment. If you cannot say why a human should look the same day, do not write it.
Do custom rules replace declaring scope?
No. They sharpen a declared-rule system; scope, egress, auth-flow and privilege declarations remain the foundation the built-in patterns judge against.
Can custom rules catch novel attack techniques?
No. They match what you declared. Novel exfiltration techniques and encodings beyond the named set are out of scope, as with the detector generally.
How many rules should a team have?
Few and live beats many and stale. Start with the two or three local boundaries that would genuinely worry you, each with a written response, and grow only through the quarterly review.