> ## 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 Developer

> Generate specific business rules or code expressions from natural language prompts, without manual coding.

## Overview

The AI Developer is an intelligent agent that transforms natural language descriptions into functional code. It helps developers generate business rules, JavaScript expressions, and test data without requiring manual coding. The agent can also edit existing code, provide explanations, and translate between programming languages, significantly accelerating the development process.

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

***

## Key capabilities

The AI Developer offers two main categories of capabilities:

### Generate new code

<CardGroup cols={2}>
  <Card title="Generate Business Rule" icon="code">
    Transforms natural language descriptions into code using the data model as context. Supports JavaScript, Python, and MVEL. Produces clean, functional business rule code based on text prompts.
  </Card>

  <Card title="Generate Business Rule from Document" icon="file-code">
    Extracts business rule definitions from uploaded documents. Identifies relevant text on each page that describes business rules, summarizes and presents the information to users in a dropdown, and generates corresponding code based on the selected rule description.
  </Card>

  <Card title="Generate (un)Hide JavaScript Expression" icon="eye-slash">
    Creates JavaScript expressions for conditional visibility of elements. Uses the data model as context for proper variable references.
  </Card>

  <Card title="Generate Computed JavaScript Expression" icon="calculator">
    Produces JavaScript code for calculated or derived values. Uses the data model to ensure proper variable referencing.
  </Card>

  <Card title="Generate Custom Component" icon="code-branch">
    Generates a React Custom Component bundle (JSX, CSS, `package.json`, and sample input data) from a natural-language description. A sample input field lets you supply preview data so the generated component renders meaningfully on first run.
  </Card>
</CardGroup>

### Edit existing code

<CardGroup cols={2}>
  <Card title="Edit Existing Business Rule" icon="pen-to-square">
    Modifies existing code based on natural language instructions. Uses the data model as context for accurate updates.
  </Card>

  <Card title="Edit Custom Component" icon="wand-magic-sparkles">
    Iterates on an existing Custom Component bundle through the same conversation. The agent keeps the component context across turns and updates JSX, CSS, `package.json`, or sample input data as requested.
  </Card>

  <Card title="Fix / Explain Code" icon="wrench">
    Fixes errors in business rules based on error logs. Provides clear explanations of what the code does.
  </Card>

  <Card title="Translate Code Between Languages" icon="language">
    Converts business rules from one language to another. Maintains functionality while adapting to language-specific syntax.
  </Card>
</CardGroup>

***

## How to use

The AI Developer is accessible through the FlowX.AI Platform interface. You can:

<Steps>
  <Step title="Select the desired capability">
    Choose the capability you need from the AI Developer section.
  </Step>

  <Step title="Provide instructions or upload documents">
    Provide natural language instructions or upload relevant documents.
  </Step>

  <Step title="Specify programming language preferences">
    Specify programming language preferences when applicable.
  </Step>

  <Step title="Review and implement the generated code">
    Review the generated code and implement it in your process.
  </Step>
</Steps>

For document-based generation, you can upload documents, view extracted rule descriptions in a dropdown, select the rule you want to generate, and receive the corresponding code.

***

## How it works

The AI Developer architecture integrates large language models with the FlowX.AI Platform to convert natural language to code.

```mermaid theme={"system"}
%%{
  init: {
    'theme': 'base',
    'themeVariables': {
      'primaryColor': '#f1774a',
      'primaryTextColor': '#000',
      'primaryBorderColor': '#000',
      'lineColor': '#6b6b6b',
      'secondaryColor': '#f3b861',
      'tertiaryColor': '#000'
    }
  }
}%%
graph TD;
    Start([Start]):::primary

    subgraph DI_Platform_process [DI Platform process]
        Classify_Document[Classify Document]:::secondary
        Summarize[Summarize]:::secondary
        Identify_process[Identify process]:::secondary
        Extract_Prompt[Extract Prompt]:::secondary
    end

    Generate_Business_rule[Generate Business rule]:::secondary
    END([END]):::primary

    Start --> DI_Platform_process;
    DI_Platform_process --> Generate_Business_rule;
    Generate_Business_rule --> END;

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

***

## Best practices

### ✅ DO the following

<Card icon="square-check" color="green" horizontal="true">
  **Be specific with your requirements:**
  Clearly state what the business rule should accomplish, including conditions, actions, and expected outcomes.
</Card>

<Card icon="square-check" color="green" horizontal="true">
  **Reference data model elements:**
  Mention specific data fields or entities that the code should interact with to ensure proper context.
</Card>

<Card icon="square-check" color="green" horizontal="true">
  **Specify the programming language:**
  Always indicate whether you need JavaScript, Python, or another supported language for your code generation.
</Card>

<Card icon="square-check" color="green" horizontal="true">
  **Provide edge cases:**
  Mention special conditions or exceptions that the business rule should handle to ensure reliable code.
</Card>

### ⛔ **DON'T** do these

<Card icon="ban" color="red" horizontal="true">
  **Don't be vague:**
  Avoid ambiguous descriptions that can lead to incorrect implementation. Be precise about the logic you need.
</Card>

<Card icon="ban" color="red" horizontal="true">
  **Don't reference external systems:**
  The AI Developer has no knowledge of external systems not defined in the provided context.
</Card>

<Card icon="ban" color="red" horizontal="true">
  **Don't skip defining variables:**
  Make sure to define all variables or data fields that your business rule will use.
</Card>

<Card icon="ban" color="red" horizontal="true">
  **Don't expect platform-specific knowledge:**
  The agent doesn't know about keys or information not defined in the data model or provided context.
</Card>

***

## Related resources

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

  <Card title="AI Analyst" icon="magnifying-glass-chart" href="./ai-analyst">
    Generate process definitions and data models from natural language descriptions
  </Card>

  <Card title="AI Designer" icon="paintbrush" href="./ai-designer">
    Automatically generate UI components and screen layouts from process definitions
  </Card>
</CardGroup>
