> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Analyst

> Builds and optimizes BPMN processes using AI to generate, validate, and enhance workflows based on user-provided documents

## Overview

The AI Analyst is an intelligent agent that transforms various inputs into Business Process Model and Notation (BPMN) processes. It can generate complete workflows from text prompts, images, or documents, as well as modify existing BPMN processes. The agent uses advanced AI to interpret requirements and convert them into structured JSON representations that the FlowX.AI platform can interpret and visualize as proper BPMN diagrams.

<Frame>
  <video controls className="w-full aspect-video" src="https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/470/ai-analyst.mp4" autoPlay muted loop />
</Frame>

***

## Key capabilities

The AI Analyst offers two main categories of capabilities:

<CardGroup cols={2}>
  <Card title="Generate from prompt" icon="keyboard">
    Creates a complete BPMN process based on natural language descriptions. Transforms textual requirements into a structured workflow and produces a JSON representation containing nodes (with name and type) and links between nodes.
  </Card>

  <Card title="Generate from image" icon="image">
    Extracts BPMN process information from uploaded images, identifies swimlanes and components, and processes various image resolutions. Accepts optional text descriptions for additional context.
  </Card>

  <Card title="Generate from document" icon="file-lines">
    Extracts process descriptions from uploaded documents, analyzes textual content to identify workflow components and relationships, and creates a structured representation of the described process.
  </Card>

  <Card title="Generate from BPMN file" icon="file-code">
    Imports and interprets existing BPMN files and converts external BPMN formats into FlowX.AI-compatible representations.
  </Card>

  <Card title="Generate in-between nodes" icon="diagram-project">
    Adds missing steps between existing nodes in a workflow, enhancing process completeness and logical flow.
  </Card>

  <Card title="Generate from node" icon="diagram-next">
    Expands a process by adding subsequent steps after a specified node, allowing incremental development of complex workflows.
  </Card>

  <Card title="Edit existing process" icon="pen-to-square">
    Modifies components of an existing process based on user instruction, updating node properties, connections, or process structure.
  </Card>
</CardGroup>

***

## How it works

The AI Analyst architecture integrates multiple AI components to process different input types and generate standardized BPMN output.

The workflow begins with a user query that gets rewritten for clarity. A quality check determines if more information is needed, in which case a human provides additional context. Once sufficient information is available, the process generation component creates the BPMN workflow, which is then delivered to the user.

<Tabs>
  <Tab title="Generate new">
    ### Generate from prompt

    Creates a complete BPMN process based on natural language descriptions. Transforms textual requirements into a structured workflow and produces a JSON representation containing nodes (with name and type) and links between nodes.

    ```mermaid theme={"system"}
    %%{
      init: {
        'theme': 'base',
        'themeVariables': {
          'primaryColor': '#f1774a',
          'primaryTextColor': '#000',
          'primaryBorderColor': '#000',
          'lineColor': '#6b6b6b',
          'secondaryColor': '#f3b861',
          'tertiaryColor': '#bababa'
        }
      }
    }%%
    graph TD;
        Start([Start]):::primary
        Check_Prompt[Check Prompt]:::secondary
        Classify_Image[Classify Image]:::tertiary
        Generate_Process[Generate Process]:::secondary
        Generate_from_Node[Generate from Node]:::tertiary
        Generate_between_Nodes[Generate between Nodes]:::tertiary
        PostProcessing[PostProcessing]:::secondary
        END([END]):::primary

        subgraph Parallel_Processing [Parallel Processing]
            Process_Swimlanes[Process Swimlanes]:::tertiary
            Split_Image[Split Image]:::tertiary
            Image_Analysis[Image Analysis]:::tertiary
            Generate_Prompt[Generate Prompt]:::tertiary
        end

        Start ==> Check_Prompt;
        Start --> Classify_Image;
        Classify_Image --> Parallel_Processing;
        Parallel_Processing --> Generate_Process;
        Check_Prompt ==> Generate_Process;
        Check_Prompt --> Generate_from_Node;
        Check_Prompt --> Generate_between_Nodes;
        Generate_Process ==> PostProcessing;
        Generate_from_Node --> PostProcessing;
        Generate_between_Nodes --> PostProcessing;
        PostProcessing ==> END;

        %% Styling
        classDef primary fill:#f1774a,stroke:#000,stroke-width:1px,color:#000;
        classDef secondary fill:#f3b861,stroke:#000,stroke-width:1px,color:#000;
        classDef tertiary fill:#bababa,stroke:#000,stroke-width:1px,color:#000;
    ```

    ### Generate from image

    Extracts BPMN process information from uploaded images, identifies swimlanes and components in diagram images, and can process various image resolutions (from small \< 4K to large > 8K). Accepts optional text descriptions for additional context and combines visual recognition with language processing for accurate interpretation.

    ```mermaid theme={"system"}
    %%{
      init: {
        'theme': 'base',
        'themeVariables': {
          'primaryColor': '#f1774a',
          'primaryTextColor': '#000',
          'primaryBorderColor': '#000',
          'lineColor': '#6b6b6b',
          'secondaryColor': '#f3b861',
          'tertiaryColor': '#bababa'
        }
      }
    }%%
    graph TD;
        Start([Start]):::primary
        Classify_Image[Classify Image]:::secondary
        Check_Prompt[Check Prompt]:::tertiary
        Generate_Process[Generate Process]:::secondary
        Generate_from_Node[Generate from Node]:::tertiary
        Generate_between_Nodes[Generate between Nodes]:::tertiary
        Post_Processing[Post Processing]:::secondary
        END([END]):::primary

        subgraph Parallel_Processing [Parallel Processing]
            Process_Swimlanes[Process Swimlanes]:::secondary
            Split_Image[Split Image]:::secondary
            Image_Analysis[Image Analysis]:::secondary
            Generate_Prompt[Generate Prompt]:::secondary
        end

        Start ==> Classify_Image;
        Start --> Check_Prompt;
        Classify_Image ==> Parallel_Processing;
        Parallel_Processing ==> Generate_Process;
        Check_Prompt --> Generate_Process;
        Check_Prompt --> Generate_from_Node;
        Check_Prompt --> Generate_between_Nodes;
        Generate_Process ==> Post_Processing;
        Generate_from_Node --> Post_Processing;
        Generate_between_Nodes --> Post_Processing;
        Post_Processing ==> END;

        %% Styling
        classDef primary fill:#f1774a,stroke:#000,stroke-width:1px,color:#000;
        classDef secondary fill:#f3b861,stroke:#000,stroke-width:1px,color:#000;
        classDef tertiary fill:#bababa,stroke:#000,stroke-width:1px,color:#000;
        classDef secondary-highlight fill:#f3b861,stroke:#8a2be2,stroke-width:2px,color:#000;
    ```

    ### Generate from document

    Extracts process descriptions from uploaded documents, analyzes textual content to identify workflow components and relationships, and creates a structured representation of the described process.

    <img className="block dark:hidden" src="https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/470/AI%20Analyst.svg" alt="AI Analyst Diagram - Light Mode" />

    <img className="hidden dark:block" src="https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/470/AI%20Analyst-dark.svg" alt="AI Analyst Diagram - Dark Mode" />
  </Tab>

  <Tab title="Edit existing">
    ### Generate process from BPMN file

    Imports and interprets existing BPMN files and converts external BPMN formats into FlowX.AI-compatible representations.

    ### Generate in-between nodes

    Adds missing steps between existing nodes in a workflow, enhancing process completeness and logical flow.

    <img className="block dark:hidden" src="https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/470/AI%20Analyst-existing.svg" alt="AI Analyst Diagram - Light Mode" />

    <img className="hidden dark:block" src="https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/470/AI%20Analyst-existing-dark.svg" alt="AI Analyst Diagram - Dark Mode" />

    ### Generate from node

    Expands a process by adding subsequent steps after a specified node, allowing incremental development of complex workflows.

    <img className="block dark:hidden" src="https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/470/AI%20Analyst-from-node.svg" alt="AI Analyst Diagram - Light Mode" />

    <img className="hidden dark:block" src="https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/470/AI%20Analyst-from-node-dark.svg" alt="AI Analyst Diagram - Dark Mode" />

    ### Edit existing process

    Modifies components of an existing process based on user instruction, updating node properties, connections, or process structure.

    <img className="block dark:hidden" src="https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/470/AI%20Analyst-edit-existing.svg" alt="AI Analyst Diagram - Light Mode" />

    <img className="hidden dark:block" src="https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/470/AI%20Analyst-edit-existing-dark.svg" alt="AI Analyst Diagram - Dark Mode" />
  </Tab>
</Tabs>

***

## How to use

The AI Analyst is accessed through the FlowX.AI Platform interface.

<Steps>
  <Step title="Select the desired capability">
    Choose the appropriate capability from the AI Analyst section based on your input type and goal.
  </Step>

  <Step title="Provide input">
    Supply input in the appropriate format: text prompt, image, document, or BPMN file.
  </Step>

  <Step title="Add additional context">
    Optionally add extra context or requirements to refine the generated output.
  </Step>

  <Step title="Review the generated process">
    Review the generated process in a visual BPMN format to verify it meets your expectations.
  </Step>

  <Step title="Make adjustments">
    Use the "Edit" capabilities to make adjustments if necessary.
  </Step>

  <Step title="Implement the workflow">
    Implement the final workflow in your project.
  </Step>
</Steps>

The interaction follows a human-in-the-loop approach, allowing for quality checks and iterative improvements to ensure the generated process meets requirements.

***

## Best practices

### DO the following

<Card icon="square-check" color="green" horizontal="true">
  **Be specific about process goals:**
  Clearly state what the process should accomplish, including start and end points, major milestones, and desired outcomes.
</Card>

<Card icon="square-check" color="green" horizontal="true">
  **Describe key participants and roles:**
  Mention the different stakeholders or departments involved in the process and their responsibilities.
</Card>

<Card icon="square-check" color="green" horizontal="true">
  **Include decision points:**
  Specify any conditional logic or decision points that might create branches in the workflow.
</Card>

<Card icon="square-check" color="green" horizontal="true">
  **Provide process constraints:**
  Mention any business rules, regulations, or time constraints that should be incorporated into the process design.
</Card>

### DON'T do these

<Card icon="ban" color="red" horizontal="true">
  **Don't be too technical with BPMN terms:**
  You don't need to use precise BPMN terminology; the AI Analyst can interpret business language and convert it to appropriate BPMN elements.
</Card>

<Card icon="ban" color="red" horizontal="true">
  **Don't request subprocess details:**
  The AI Analyst has no knowledge about subprocesses or other platform-specific information not provided in your input.
</Card>

<Card icon="ban" color="red" horizontal="true">
  **Don't upload low-quality images:**
  When generating from images, ensure the diagram is clear and readable to improve accuracy of the generated process.
</Card>

<Card icon="ban" color="red" horizontal="true">
  **Don't expect platform-specific optimizations:**
  The AI Analyst generates standard BPMN representations and may not incorporate FlowX.AI platform-specific features automatically.
</Card>

***

## Related resources

<CardGroup cols={2}>
  <Card title="Agent Builder" icon="robot" href="../agent-builder/overview">
    Build custom AI agents for your business workflows
  </Card>

  <Card title="AI Designer" icon="paintbrush" href="./ai-designer">
    Generate and refine UI components using AI
  </Card>

  <Card title="AI Developer" icon="code" href="./ai-developer">
    Generate business rules and integration logic with AI
  </Card>
</CardGroup>
