Welcome to DOFBOT SE repository
8. AI agent workflow
AI Agent Workflow
AI Agent WorkflowCourse ContentStart Dify ServiceCase: Classification Q&A ChatbotVisual Workflow DebuggingAccessing AI Agent Applications
Course Content
Use multiple AI large models to build an agent workflow to achieve complex logic functions.
Note that the Dify used by Dofbot-SE is for chatbots. This tutorial is provided for users who are interested in learning and development.
Start Dify Service

Check the virtual machine's IP address. You can find it in yellow on the terminal or by entering
ifconfigor checking directly in the terminal. Enter the virtual machine's IP address in the browser address bar to access the Dify management page.
Case: Classification Q&A Chatbot
In the example AI applications folder for this section's course, there are reference examples that you can import and use directly.
Click Import DSL file on the Dify homepage studio.

Select the example AI application
Complex agent.ymlfrom this section's course folder, then click Create.


You can see the workflow content as shown below.

In the workflow,
Question Classifieris an AI large model-driven module. Its function is to classify user questions into math questions, physics questions, or other questions. If the user input is suitable for math or physics-related questions, different branches of AI large models will be called to answer. TheQuestion Classifierclassification content is as follows:

The LLM-1 branch is used to answer math-related questions. The prompt and settings are as follows.

The LLM-2 branch is used to answer physics-related questions. The prompt and settings are as follows.

Visual Workflow Debugging
If you need to debug and test the workflow effect, you can click the preview button in the upper right corner. Then enter questions in the popup dialog to test.

At the same time, the workflow will display the data flowing through the branches in real-time. Therefore, you can conveniently debug the workflow.

If you need to expand the workflow, you can click the + sign on the left. There are multiple Dify preset tools and modules.

Accessing AI Agent Applications
After completing the AI application editing, click Publish Application to save the configuration. Then click Copy URL or API access credentials to access the created AI application through the web page or backend service API.

