# AI Assistance

The AI Assistant allows you to create and edit complete workflows using natural language descriptions. The AI Assistant provides flexible workflow creation and modification capabilities through seamless interaction modes.

### AI Assistant Modes

The AI Assistant operates in multiple seamless modes: Generate, Edit, and Chat. These modes are seamless and natural, you don't explicitly know which mode you're in. The AI Assistant automatically adapts based on what you currently have selected or how you've spoken to it.

**Generate**: Creates workflows from scratch on a blank canvas\
**Edit**: Modifies existing workflows and individual actions\
**Chat**: Provides conversational explanations and discussions about workflows

### Creating a Workflow with AI Assistant

**Getting Started**

1. Create a new workflow to access the landing page.
2. In the prompt text box, you'll see a list of suggested prompt templates above it:
   * These templates are backed by data
   * Select any template to input it into your prompt box
   * Click the refresh button on the right to see more suggestions (displays three at a time)
   * Alternatively, you can access the full template library (see template documentation for details)
3. Type your workflow description in the text box:
   * **Be specific** about integrations and values you want passed through
   * Structure your text well, keep it short and concise rather than large copy-paste blocks
   * The more detailed and specific you are, the better results you'll get
4. Click the submit button (arrow up button in a circle) to submit your prompt.

**Generation Process**

1. The canvas opens and you'll see the AI Assistant working in the bottom left corner.
2. Your original prompt appears first.
3. Below that, you'll see "Lleverage loading" followed by real-time updates.
4. **Important**: The response messages from the AI Assistant have different UI styling compared to the actions it's taking. This visual distinction helps you understand what's being processed:
   * AI Assistant messages appear in one UI style
   * Actions taken appear in a different UI style
5. When complete, the message will indicate completion and guide you to the next steps.

### Working with AI Assistant

**Conversational Workflow Interaction**

You can chat with your workflow beyond just editing:

* Ask questions like "What is this workflow about?"
* The AI Assistant will have conversations about your workflow and explain its functionality

**Editing the Entire Workflow**

1. Use the text box in the bottom left corner to describe changes you want to make.
2. Submit your editing instructions using the submit button.
3. The AI Assistant will modify the entire canvas as needed.

**Editing Specific Actions (Context-Based Editing)**

1. **Select a node**: Click on the specific action/node you want to modify.
2. **Context indicator**: You'll see in the bottom left corner of the text box that you've selected that particular node.
3. **Give simple instructions**: Instead of providing node IDs or technical details, you can simply say:
   * "Simplify"
   * "Fill it out"
   * "Fix it"
4. **Whole canvas editing with context**: The AI Assistant doesn't just edit the individual node, it edits the whole canvas but uses your selected node as context.

**Important**: When the AI Assistant changes a particular action, it may have ripple effects throughout the rest of the workflow. This is intentional and ensures your workflow remains functional.

### AI Assistant Capabilities and Limitations

**What the AI Assistant Can Do**

* Generate complete workflows from natural language descriptions
* Edit and modify existing workflows
* Handle input error messages and provide advice
* Make changes that affect multiple connected nodes
* Provide conversational explanations about your workflow
* Use context from selected nodes to make targeted improvements

**Authentication Limitations**

* **Cannot handle authentication**: The AI Assistant won't fill out authentication details for you
* **Manual authentication required**: You'll need to complete authentication steps manually
* **Post-authentication setup**: Some integration nodes may ask for additional context after authentication
* **Useful workflow**: After authenticating manually, you can return to the AI Assistant and say "I've just authenticated it. Can you do this?" for further configuration

### Tips for Best Results

💡 **Be Specific**: Include details about integrations, data processing, and specific values you want handled.

💡 **Structure Well**: Keep prompts concise and well-organized rather than copying large blocks of text.

💡 **Use Context**: Click on specific nodes before giving editing instructions to provide context.

💡 **Understand Ripple Effects**: Changes to one action may affect connected parts of your workflow.

💡 **Post-Authentication Workflow**: After manual authentication, return to the AI Assistant for additional configuration help.

💡 **Visual Distinction**: Pay attention to the different UI styles for AI messages versus actions taken.

### Visual Indicators

**AI Assistant Activity**

* **Bottom left corner placement**: Always located in the bottom left of the canvas
* **Real-time updates**: Shows step-by-step progress during generation and editing
* **Context indicators**: Displays when you have a specific node selected
* **Different UI styles**: Messages and actions have distinct visual styling
* **Completion messages**: Clear notifications when processes are finished

⚠️ **Note**: Always review workflows after AI Assistant modifications, especially complex ones, and remember that authentication steps require manual completion.
