Agents and tools
Agents
An agent is an Odoo user that your company sets up for Abstr.ax. It has its own rights in
Odoo, for example sales for orders and customers, or finance for invoices. An agent
sees only the models that your company allows for it, with the record rules of its Odoo
user.
You can use 1 or more agents. Your company decides which agents.
The argument agent
Each tool has the argument agent. Your assistant fills it in:
- With 1 agent, the argument is optional.
- With more agents, the assistant names the agent in each call. The instructions of the connection describe your agents, so the assistant can choose. You can also tell it: "Use the agent finance."
- A tool that changes data accepts only the agents that may change data.
What the assistant can do
- Find models and fields:
odoo_schema_search,odoo_models,odoo_fields. The assistant searches here first, so it does not guess field names. - Read data:
odoo_search,odoo_read,odoo_aggregate,odoo_report. - Calculate:
odoo_computeruns a short Python script on Odoo data and gives back only the result. - Change data:
odoo_create,odoo_write,odoo_call,odoo_post_message. Only an agent with write access has these tools, and your client asks you before each change.
The tool reference shows all arguments.
Recipes
A recipe is a fixed series of tool calls with its own name, for example "open invoices of
a customer". Your assistant proposes a recipe with the tool propose_recipe. After an
admin of your company approves it, each person with that agent can run it at once,
without a new connection: list_recipes gives the approved recipes with their parameters,
run_recipe runs a recipe that reads, and run_write_recipe runs a recipe that changes
data. The instructions of the connection also name the approved recipes.
A step can run odoo_compute: the recipe is then an approved script that gives back only
its result. That keeps the answers short. The script gets its values through inputs.
A step with foreach runs once for each item of a list, for example to reconcile every
line of a statement after 1 approval. When an item fails, the recipe stops and says which
item; the items before it are done.
Large answers
Abstr.ax gives every record that Odoo returns; it sets no maximum of its own. An answer that
is too large for the conversation stays whole for 1 hour as a resource: the assistant gets a
summary with the count and the first rows, and links to the whole answer as JSON and as CSV.
Your client can fetch these links. To calculate on a large set, the assistant uses
odoo_compute, which reads the data on the server and gives back only the result.
Excel and CSV files
odoo_export writes records to an Excel (XLSX) or CSV file with the export of Odoo. A field
path follows a relation, for example partner_id/name, and partner_id/id gives the
external id. The answer has a download link that opens the file in a browser for 1 hour,
without a login: anyone with the link can open the file in that hour. The file is also a
resource of the conversation.
odoo_import imports a CSV or Excel file with the import of Odoo: every row, or none when 1
row fails, with the row number of the file in the message. Row 1 is the header with the field
paths, or the assistant gives the field path of each column. A column id with an external id
makes a second import of the same file update the records instead of adding them again. The
assistant can import an earlier export through its resource, after a change.
Language
The tools, the errors and the Odoo data come in your language: English, Dutch or French. Abstr.ax takes the language from your login profile. Your company can change it.