Abstr.axDocumentation

Tool reference

Each tool except connection_info also takes the argument agent: the agent that runs the call. With 1 agent, the argument is optional. A tool that changes data accepts only the agents that may change data. A recipe runs through run_recipe or run_write_recipe; list_recipes gives the approved recipes.

Your connection

connection_info Reads data

Show the companies of this connection, with their Odoo and your agents in each.

Find models and fields

odoo_models Reads data

List the models that the agent can use, per app.

ArgumentTypeRequiredDescription
app string no Only the models of this app.
query string no Only the models that match.
limit integer no Maximum number of models.
offset integer no Number of items to skip.

odoo_fields Reads data

List the fields of a model that the agent can use.

ArgumentTypeRequiredDescription
model string yes Technical name of the model.
names string[] no Only these fields.
detail "compact" | "full" no Full adds values, relations and notes.
include_technical boolean no Also return technical fields.
limit integer no Maximum number of fields.
offset integer no Number of items to skip.

Read data

odoo_read Reads data

Read records by their ids.

ArgumentTypeRequiredDescription
model string yes Technical name of the model.
ids integer[] yes Ids of the records.
fields string[] no Fields to return; empty means all.

odoo_aggregate Reads data

Group records and return the aggregates per group.

ArgumentTypeRequiredDescription
model string yes Technical name of the model.
groupby string[] yes Fields to group by.
aggregates string[] yes Aggregates as field:function.
domain any[] no Conditions that the records must meet.
limit integer no Maximum number of groups.

odoo_report Reads data

Return a report of records as a PDF file.

ArgumentTypeRequiredDescription
report_name string yes Technical name of the report.
ids integer[] yes Ids of the records.

Calculate

odoo_compute Reads data

Run a short Python script on the data of the agent and return only its result.

ArgumentTypeRequiredDescription
code string yes Python script; the variable result is the answer. odoo.search(model, domain, fields, limit=None, offset=0, order=None) returns a dict with records and count, and every record when there is no limit, so do not read in pages. odoo.read(model, ids, fields), odoo.aggregate(model, domain, groupby, aggregates) and odoo.fields(model) read the same data as the tools. The dict inputs holds the inputs; pandas and numpy are available.
inputs object no Values that the script reads as inputs.

Change data

odoo_create Reads data

Create 1 or more records and return their ids.

ArgumentTypeRequiredDescription
model string yes Technical name of the model.
values object | object[] yes Field values of 1 record, or a list for more records.

odoo_write Changes data

Change the fields of records.

ArgumentTypeRequiredDescription
model string yes Technical name of the model.
ids integer[] yes Ids of the records.
values object yes Field values.

odoo_call Changes data

Run a model method that the agent allows.

ArgumentTypeRequiredDescription
model string yes Technical name of the model.
method string yes Name of an allowed model method.
ids integer[] no Ids of the records, if any.
kwargs object no Named arguments.

odoo_post_message Reads data

Post a message on a record and return the message id.

ArgumentTypeRequiredDescription
model string yes Technical name of the model.
id integer yes Id of the record.
body string yes Message in HTML.
internal boolean no True for an internal note.

Export and import files

odoo_export Reads data

Export records to an Excel or CSV file and return a download link.

ArgumentTypeRequiredDescription
model string yes Technical name of the model.
fields string[] yes Field paths, such as name, partner_id/name or partner_id/id.
domain any[] no Conditions that the records must meet.
file_format object no xlsx or csv.
header "labels" | "fields" no labels for people; fields for a file to import again.
order string no Sort order.
limit integer no Maximum number of records; none gives every record.

odoo_import Changes data

Import a CSV or Excel file with the import of Odoo: every row, or none when 1 row fails.

ArgumentTypeRequiredDescription
model string yes Technical name of the model.
file string no CSV text, or an XLSX file in base64; row 1 is the header.
file_format object no csv or xlsx.
resource_uri string no A file of an earlier answer, such as an export.
fields string[] no Field path per column; empty skips a column; none uses the header.

Recipes

list_recipes Reads data

List the approved recipes of the agent, with their parameters and the tool that runs them.

run_recipe Reads data

Run an approved recipe that only reads data, and return its result.

ArgumentTypeRequiredDescription
recipe string yes Name of an approved recipe, from list_recipes.
params object no Parameters that match the schema of the recipe.

run_write_recipe Changes data

Run an approved recipe that changes data, and return its result.

ArgumentTypeRequiredDescription
recipe string yes Name of an approved recipe, from list_recipes.
params object no Parameters that match the schema of the recipe.

propose_recipe Reads data

Propose a recipe: a fixed series of tool calls that an admin can publish as 1 tool.

ArgumentTypeRequiredDescription
slug string yes Name of the new tool: lowercase, digits, underscores.
description string yes 1 sentence that says what the recipe does.
parameters_schema object yes JSON schema of type object for the input.
steps object[] yes The tool calls in their order.
output_template string yes Template of the result.