How-To: Use the AI Workflow Wizard
This guide explains how to use the AI Workflow Wizard, a conversational AI assistant that helps you create complex automation templates by describing your goals in plain English.
Overview
The AI Workflow Wizard is an intelligent assistant integrated into the "Workflow Templates" page. Instead of building a workflow manually node by node, you can simply tell the wizard what you want to achieve, and it will generate a complete, editable workflow template for you.
How to Use the Wizard
Step 1: Open the Wizard
- In the admin panel, navigate to the Workflow Templates page.
- Click the "Create with AI Wizard" button at the top of the page.
- The chat interface will expand, ready for your request.
Step 2: Describe Your Goal
In the chat input, type a plain-English description of the workflow you want to create. Be as simple or as detailed as you like.
Examples:
- "Create a workflow to send new leads to Mautic."
- "I want to post daily tech news to WordPress."
- "Automatically generate social media posts from our company blog's RSS feed."
Step 3: Answer Clarifying Questions
The AI may ask follow-up questions to better understand your needs. For example, it might ask:
- "When should the workflow trigger? (e.g., daily, on-demand, etc.)"
- "What is the source of the content? (e.g., an RSS feed URL, a specific website)"
Step 4: Review the Suggested Workflow
The wizard will analyze your request and propose a complete workflow, recommending the best AI agents and tools for the job. The proposed structure will be displayed in the chat.
Step 5: Create the Template
If you are happy with the suggestion, click the "Create Template" button. The AI-generated workflow is now saved as a new template in your library.
Step 6: Edit and Activate
The new template is fully editable. You can open it in the main visual workflow builder to fine-tune any settings before activating it.
For Developers: Technical Reference
This section contains technical details about the implementation of the Workflow Wizard.
Core Components
- Livewire Component:
app/Livewire/WorkflowWizardChat.php- This component manages the entire state of the chat interface, handles user input, and communicates with the AI agent.
- AI Agent: The
MarketingAgentis used as the primary AI engine for the wizard due to its understanding of brand context, content orchestration, and its ability to generate structured JSON output. - View:
resources/views/livewire/workflow-wizard-chat.blade.php- A Blade view that renders the Gemini-style chat UI, including animations, loading states, and the workflow preview.
- Integration Point: The component is injected into the top of the Filament page at
resources/views/filament/resources/workflow-template-resource/pages/list-workflow-templates.blade.php.
Available Resources for the AI
The wizard's AI has knowledge of the following platform resources, which it uses to build its recommendations:
- 10 AI Agents: Including
MarketingAgent,WordPressAgent,SEOAgent,RssAutoblogAgent, etc. - 9 MCP Servers: Including
WordPress,Mautic,Brave Search,GitHub,Slack, etc. - Brand Book: The AI reads the current tenant's
BrandBookto ensure its suggestions align with the brand's voice and guidelines.
System Prompt Strategy
The MarketingAgent is given a detailed system prompt that instructs it to act as a "Workflow Automation Architect". The prompt includes:
- A list of all available AI agents and MCP servers.
- The tenant's brand book for contextual awareness.
- The required JSON format for generating the workflow node and connection structure.
- Instructions to ask clarifying questions before providing a solution.
🐛 Troubleshooting
| Issue | Solution |
|---|---|
| Wizard not loading | Clear the application cache: php artisan cache:clear |
| AI agent errors | Check the Livewire and Laravel logs in the storage/logs/ directory for error messages from the AI provider. |
| MCP servers not appearing | In the database, verify that the required servers are enabled for the current tenant in the mcp_servers table. |
| Generated workflow is invalid | This can happen if the AI's response doesn't perfectly match the expected JSON format. Try rephrasing your request to be more specific. |
| Template not saving | Verify the user has permission to create WorkflowTemplate records and check the database connection. |
