AI commands
ai AI
Asks the AI model set up in Settings → AI (answered through the Botream server, so the key never reaches the robot): answer a question, pull fields out of a document or an email, or sort a text into categories. The input is --input (text, or any variable) and/or --file (PDF text, a text file, or a picture for models that read images).
Parameters of every variant
| Parameter | Value | Default | Description |
|---|---|---|---|
--input | any value | What the model reads: text, or a variable (records and lists are sent as JSON), e.g. $mail.Body$ | |
--file | text | A file the model reads: PDF (its text), .txt/.csv/.json/.xml/.html/.eml, or a picture (.png, .jpg, .gif, .webp) A file on the agent machine. | |
--instructions | text | Extra guidance, e.g. "Amounts are in EUR; dates are day/month/year" | |
--timeout | number | 120 | Timeout in seconds |
--retry | number | Number of retry attempts. When not set, screen and file commands try once more after a passing problem (a page still loading, a covered element, a locked file); 0 turns that off | |
--retryinterval | number | 1 | Seconds between retries |
Actions (--action)
--action:ask
Answers a question about the input (or without one) in plain text.
| Parameter | Value | Default | Description |
|---|---|---|---|
--prompt required | text | The question or task, e.g. "Summarize this complaint in two sentences" | |
--output required | variable name | Variable that receives the result |
--action:extract
Pulls the fields out of the input into a record, e.g. --fields:"InvoiceNo, Date:date, Total:number, Lines:list". Types: text (default), number, date, boolean, list. A field that is not in the input is empty.
| Parameter | Value | Default | Description |
|---|---|---|---|
--fields required | text | Comma-separated field names, each optionally :text, :number, :date, :boolean or :list | |
--output required | variable name | Variable that receives the result |
--action:classify
Picks the category the input belongs to; the record has Label (one of the categories), Confidence (0 to 1) and Reason.
| Parameter | Value | Default | Description |
|---|---|---|---|
--categories required | text | Comma-separated categories, e.g. Invoice, Complaint, Order, Other | |
--output required | variable name | Variable that receives the result |
Examples
ai --action:ask --prompt:"Summarize this complaint in two sentences" --input:$mail.Body$ --output:summary
ai --action:extract --file:"C:\In\invoice.pdf" --fields:"InvoiceNo, Date:date, Total:number, Lines:list" --instructions:"Amounts are in EUR" --output:invoice
ai --action:classify --input:$mail$ --categories:"Invoice, Complaint, Order, Other" --output:kind