AI Agent Guardrails
Cap and record what an AI agent does in Odoo over MCP: a write limit per hour, models it may never touch, and a log of every change with the old value
The video below shows AI Agent Guardrails running on a real Odoo 19 database. Want it driven against your own data, or a question answered first? Ask and we will set up a session.
An MCP server connects a language model to Odoo as some user, and from that moment the database cannot tell the agent's writes apart from a person's. That matters because the failure modes are not the same. A person who misreads a screen edits one record. An agent in a loop edits four thousand, and it does it faster than anybody can notice and stop it.
One login, an hourly ceiling, and the models it may never touch at all.
Every change, with the value that was there before it.
What it does
A limit that counts records, not calls
Creates, writes and deletes in a rolling hour. An agent rarely writes one at a time, so a limit counting calls would let a single create of five thousand straight through. Past the ceiling it is refused until the hour rolls on.
The log keeps what it overwrote
Field by field, the value before and the value after. Knowing an agent touched a field is not something anybody can act on; knowing what it wrote over is what lets somebody put it back. Deletions keep the names, because the ids stop resolving the moment they are gone.
Models it may never change
Refused outright, whatever the access rights say - for the handful where a mistake is expensive and rare enough to be worth typing out. A second lock, on top of the ones the agent's groups already give it.
Any MCP server, or none
It guards a login rather than a protocol, so it applies whichever MCP or REST bridge you run, and to anything else authenticating as that user. Nothing here talks to the model or to the server, so there is no version of either to keep up with.
People are not logged
Only the logins you register as agents. Recording everybody would bury the agent's changes in everyone else's, which is the opposite of the point - and the check costs a cached lookup, so the rest of the database pays almost nothing for it.
Screenshots


Requirements
- Odoo 19.0, Community or Enterprise.
- Odoo.sh or On-Premise only. Third-party apps cannot be installed on Odoo Online (SaaS) databases — check your hosting before buying.
- Odoo 19 Community or Enterprise, no other module needed. It does not undo changes for you - it tells you exactly what to undo. It does not restrict what the agent may read; that is Record Rule Preview and Field Access Rules . The superuser cannot be an agent - it bypasses access rules by design.
- Module
mh_ai_agent_guardrails, version 19.0.1.0.12, licensed OPL-1.
Related apps
Move Odoo attachments out of the filestore into a Google Drive folder, using Odoo 19 own cloud storage migration - Drive is the provider Odoo does not ship
Hide or lock any field for the groups you choose, on any model, enforced by the server and not just hidden in the form view
Write a record rule and see how many records it actually leaves a chosen user, counted for real before you save it