> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://docs.flokzu.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# AI Assistant in the process workflow


# AI Assistant in the process workflow

AI Assistants incorporate a new type of Service Task within the workflow, through which it is possible to activate different artificial intelligence agents to provide automatic support for document, text, and image processing activities.
With these agents, Flokzu allows for further automation of flows that involve unstructured data, documents, images, or validations that traditionally require manual intervention.

| Currently, this feature is in Beta phase with a __limited number of executions.__ If you wish to unlock the full potential of these agents in a production process or with higher usage volume, please contact us and we will design a plan tailored to your needs.

### How to configure the AI Assistant?

The AI Assistant is configured as a type of **Service Task** within the process modeler.
To use it, simply drag a Service Task to your workflow diagram and select the **"AI Assistant"** option.
Once selected, you can choose the specific agent you wish to use for that task and configure its input fields (what information you will send it) and its output fields (where the response will be stored).


![](https://storage.crisp.chat/users/helpdesk/website/-/c/c/c/3/ccc3fbb5dc442800/encajitanblock_gh1ml8.gif)


## Available AI Agents

Below, we describe the agents currently available and their use cases.

### 1. Extract text from an image (OCR)

This agent acts as an advanced Optical Character Recognition (OCR) system. It is provided with an image file **in JPEG format** that is stored in a Flokzu field. The assistant analyzes the image, extracts all legible text it contains, and returns the resulting content in a text-type field for subsequent use in the process.

###### Input Data

* **jpg:** *Attachment* type field where the photo or image containing the text to be recognized must be uploaded. The supported image format is **JPG/JPEG**.

###### Output Data

* **recognized text:** *Text* type field where the content identified in the image will be stored. If a large amount of text is expected, we recommend using a *Multiline Text* or a *Rich Text* field.


### 2. Answer questions about a text

This agent specializes in contextual information retrieval within a document. It receives a **PDF file** and a specific question (sent as text). The AI will read and understand the document to formulate an answer based *exclusively* on the information contained in that file.


###### Input Data

* **PDF:** *Attachment* type field where the PDF document containing the reference information must be uploaded.
* **Question:** *Text* type field with the specific question to be answered.

Optionally, the question can be configured directly in the Assistant connector, instead of selecting a field.

###### Output Data

* **Answer:** This is the *Text* type field where the answer will be stored.


### 3. Analyze text sentiment and tone

This agent processes a block of text (such as the body of an email, a form comment, or an internal note) and evaluates it to determine the **sentiment** (e.g., Positive, Negative, Neutral) and the **tone** (e.g., Urgent, Formal, Angry, Satisfied).

###### Input Data

* **Text:** This is the *Text* type field whose content will be evaluated by the agent.

###### Output Data

* **Sentiment**: This is the *Text* type field where the specific sentiment identified in the text will be stored (e.g., joy, anger, neutral).
* **Tone**: This is the *Text* type field where the classification of the general tone of the text will be stored (e.g., positive, negative, neutral).


### 4. Classify invoices automatically

This agent is specifically trained to process accounting documents. It receives **JPEG or PDF images** of invoices, receipts, or similar documents. The assistant identifies the document type and classifies it according to the following predefined categories:
* Purchase Invoice
* Sales Invoice
* Service Invoice
* Credit Note
* Debit Note
* Proforma Invoice
* Tax Invoice
* Commercial Invoice


###### Input Data

* **JPG**: This is the *Attachment* type field where the image of the document to be classified must be uploaded.

###### Output Data

* **Classification:** This is the *Text* type field where the detected classification will be stored (e.g., Credit Note, Tax Invoice, Debit Note).
* **Confidence:** This is a *Text* type field where the confidence level of the prediction will be saved.



### 5. Generate automatic summary of a PDF

Ideal for handling large volumes of information, this agent takes a **PDF** document (usually extensive) and generates a concise and coherent summary of its content. The summary is delivered as a text field, ready to be used in subsequent notifications or tasks.


###### Input Data

* **PDF:** *Attachment* type field where the PDF file to be analyzed and summarized must be uploaded.

###### Output Data

* **Summary:** *Text* or *Rich Text* type field where the concise summary of the document's content will be stored.

### 6. Validate information between documents

This is an advanced cross-validation tool. It allows you to upload multiple documents (supporting a combination of PDF, DOCX, and JPG/PNG files) and perform a query to compare data between them. It is ideal for ensuring the consistency of information across different sources.

###### Input Data

* **Query:** *Text* type field where the specific query or question to be validated between the provided documents is entered. Optionally, the query can be configured directly in the Assistant connector, instead of selecting a field.
* **Attachment 1, 2, 3, 4 and 5:** *Attachment* type fields with the files that the agent will use for cross-validation. Permitted formats are: **PDF, DOCX, and JPG/PNG**.

###### Output Data

* **Result** (YES/NO Validation): *Text* type field where the agent will return the validation result in boolean format (**true/false**). The agent interprets the query as a Yes/No validation.
* **Answer:** *Text* or *Rich Text* type field where the agent will return the response to the formulated query.
* **Reasoning:** *Text* or *Rich Text* type field where the agent will show the logical process or justification used to arrive at the answer.