Put an AI agent to work on your records, on any trigger.
Run AI Agent is a server action of its own. An automation rule, a schedule or the Actions menu of a list hands it records, and it starts an AI chat with your prompt for all of them, or one for each.
Automation rules, scheduled actions and the Actions menu of a list all start the same action.
Each record gets a chat of its own, linked to it and listed in its chatter, or all of them share one.
Every chat runs as the user who runs the action, the user of its schedule, or the user set on its rule, with that user’s access rights and nothing more.
An agent, a prompt and the records
Pick the model and the agent, decide how the records are split into chats, and write the prompt. The trigger brings the records: those selected in a list, those of a rule, or those a schedule finds.
Double braces put in the record, the records of the run, the user, the company or today’s date, rendered for every chat.
A scheduled action takes its records from a domain built in the editor, or from Python code that is checked when you save.
Continue per Record hands each chat the last answer and the tool calls of the previous chat for the same record.
With one chat per record, a run starts no more chats than its record limit allows, however many records it gets.
The AI Chats button of an action lists every chat it started, with its state, its cost and its answer.
An action whose user is archived refuses to run, and a prompt that does not render fails its chat with the reason.
Every run, with its answer
A run starts real AI chats, named after the action and the record. Open one to read the prompt it was sent, the tools the agent called and the answer it gave.
The chats work in the background, so a run returns at once and tells you how many it started. They are listed under the action, and in the sessions report with every other chat.
On create, on change, on a schedule
Add a Run AI Agent action to an automation rule, and the rule hands the agent the records that set it off. A scheduled action runs the agent at an interval on the records of its domain, and Run Manually tries it at once.
Create Contextual Action puts an agent action in the Actions menu of a list, for the records you select.
Each record keeps its runs
With one chat per record, every chat belongs to its record. A note in the chatter links to it, and the AI Sessions button lists every run for that record, the moment it starts.
A chat has the access rights of the user it runs as, never of the superuser. When that user is archived, the action stops rather than run as someone else.
Help and support
What you get for free, and what has to be paid work.
Issues and merge requests are welcome on the public repository. They are read — but no response time is promised.
An agent action built for your process, or a fix on a deadline, is paid work — quoted up front. Write to sale@mukit.at.
LGPL-3. Use it, change it, ship it inside your own work — no licence key, no database count.
Want more?
MuK IT — Austrian Odoo partner, ViennaModules written for your process, on your Odoo version.
Odoo joined up with the systems you already run.
Hosting, deployment and upgrades you do not have to watch.
Your team taught the parts of Odoo they actually use.
An agreement, so an answer does not depend on who is free.
Documentation
The full text is on the Documentation tab, and in doc/ inside the download.Odoo.sh or on-premise, Community or Enterprise, with MuK AI Assistant and an AI provider set up. The chats run on the MuK AI session workers, so the server runs its cron workers.
Install MuK AI Automation from the Apps menu. Agent actions, automation rules and scheduled actions that run an agent are under MuK AI › Automation.
Depends on base_automation and muk_ai_chatter. Install it like any other module; it needs no extra Python packages.
Create an agent action with its agent and prompt, add it to the Actions menu of a list and run it on the records you select, or use an agent in a rule or a schedule. Read the answers under AI Chats.
Agent actions, rules, schedules and past chats are records, and an upgrade keeps them.
MuK IT GmbH, Vienna. Author and maintainer.
Which records would you hand to an agent first?
Tell us the checks your team does by hand, and we will tell you which agent action takes them over. MuK IT — Austrian Odoo partner, Vienna.
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Community Apps Dependencies | Show |
| Lines of code | 39234 |
| Technical Name |
muk_ai_automation |
| License | LGPL-3 |
| Website | http://www.mukit.at |
MuK AI Automation
Extends MuK AI with a server action of type Run AI Agent, so administrators can run an AI agent from any server action, automation rule or scheduled action. It starts one chat for all target records or one per record, selected by the trigger, a domain or Python code, and lets each chat recall the previous run for the same record.
Installation
To install this module, you need to:
Download the module and add it to your Odoo addons folder. Afterward, log on to your Odoo server and go to the Apps menu. Trigger the debug mode and update the list by clicking on the "Update Apps List" link. Now install the module by clicking on the install button.
Upgrade
To upgrade this module, you need to:
Download the module and add it to your Odoo addons folder. Restart the server and log on to your Odoo server. Select the Apps menu and upgrade the module by clicking on the upgrade button.
Configuration
Install the module from the Apps menu. MuK AI > Automation holds three lists, for administrators: Agent Actions, the Automation Rules and the Scheduled Actions that run an agent. Their forms show only what an agent needs, and what is created there runs an agent.
An agent action is a server action of type Run AI Agent:
- Agent: the agent that does the work, with its model, tools and approval mode.
- Dispatch: One Chat hands all target records to a single chat; One Chat per Record starts a chat for each record, linked to it.
- Memory: with one chat per record, Continue per Record hands each chat the previous chat of this action for the same record.
- Record Limit: with one chat per record, the most chats one run starts. Zero means no limit.
- Records: a scheduled action takes its records from a Domain built in the domain editor or from Python Code that assigns a recordset to records. The code is checked when the action is saved. An agent action runs on the records selected in a list, and an automation rule on the records that triggered it.
- Prompt: the message sent to the agent, an inline template. Write a value as {{ expression }} with record (one chat per record), records (one chat for all), previous_session.last_text and previous_session.tool_log (the last answer and the tool calls of the previous chat, when the action continues per record), user, company, env and today. The Help tab of the action lists them.
Chats run on the MuK AI session workers, so the server needs its cron workers running.
Usage
Create Contextual Action adds an agent action to the Actions menu of its model: select records in the list and run it from there; the notification says how many chats it started. In an automation rule, add an action of type Run AI Agent and it runs on the records that triggered the rule. A scheduled action of type Run AI Agent runs at its interval on the records of its domain or code, and Run Manually starts it at once.
The AI Chats button of an agent action lists the chats it started, with their state, cost and answer; MuK AI > Reports > Sessions lists them with all other chats. A chat started for one record is linked to it: a note in the record's chatter links to the chat, and its AI Sessions button lists every run for the record.
In the chat sidebar, the chats of agent actions and automation rules are listed under the Automation space, and those of scheduled actions under Scheduled. Set Space on an action to list its chats in a system space of your own instead.
Each chat runs with the access rights of a user: a run from the Actions menu or the Run button as the user who starts it, a scheduled action as its Scheduler User, and an automation rule as its Run Agents As user, whoever triggers it. A chat finished by an action stays out of the unread chats; one that stops with an error or waits for an answer is flagged. The superuser is replaced by the administrator, and an archived user makes the action refuse to run. A prompt that does not render fails its chat with the reason, and an action whose agent is archived refuses to run.
Credits
Contributors
- Mathias Markl <mathias.markl@mukit.at>
Author & Maintainer
This module is maintained by the MuK IT GmbH.
MuK IT is an Austrian company specialized in customizing and extending Odoo. We develop custom solutions for your individual needs to help you focus on your strength and expertise to grow your business.
If you want to get in touch please contact us via mail (sale@mukit.at) or visit our website (https://mukit.at).
Please log in to comment on this module