Creation

Ways to create an AgentFlow

WorkFX AI provides two ways to create an AgentFlow:

  • Select from existing templates and clone them into your own agent

  • Build one from scratch

Usage Example

In the following example, we will use the creation of a travel assistant as a case to demonstrate how to create an agentflow that helps users plan their travel itineraries.

Clone a "Default Chat Flow" from the "Template Explore" page

On the Template Explore page, you can view a variety of Agent templates provided. In this example, select the simplest chat AgentFlow----"Default Chat Flow", clone it, and perform basic configuration to get started.

Open it from the "Agent" page

Then, go to the Agent page to find the "Default Chat Flow" you just cloned. Click to open and configure it.

You will see a simple example composed of three nodes: Start Node → LLM Node → Answer NodeThis structure represents the flow starting from user input, processed by the language model, and then delivered as the final response to the user.

Configure the Start Node

Click on the "StartNode" to display its configuration panel on the right. In the configuration panel, you can view the variables under the InputField section. Click "Add" to add a new input variable.

Here, you can configure input variables in addition to the user's original input (query). These variables are typically used for API calls, but in this case, they are not needed and can be skipped for now.At the top, you can select the variable type. Below, you can configure the following information:

  • Variable Name: A unique identifier used to reference this input within the workflow.

  • Label Name: A label name is a user-facing variable name that offers greater flexibility. It can include common special characters such as spaces, making the interface more intuitive and user-friendly.

  • Description (Optional): Additional information or instructions to help the user understand the purpose of this input.

  • Max Length: The maximum number of characters allowed for this input. Used to control the size and format of the user input.

Configure the LLM Node

Click the "LLM Node" to open the configuration panel on the right.You can select the model to use and configure some simple parameters (most of the time, the default settings are sufficient).Below, you can input the system prompt and user prompt, as well as configure the number of chat history turns to reference. Here are the parameter settings for this example:

  • Model Settings

    • Model: o3-mini

    • Temperature: 0.7

    • Max Tokens: 1000

  • Chat History: 10

  • System:

#Role Definition
You are a reliable travel planning assistant. Your task is to generate a detailed travel itinerary based on online information and the user's specific needs.
  • User:

#Info
    The user's requirements are: 
#Output
    Based on the above, please provide the following:
    Suggested travel itinerary (organized by day)
        Recommended attractions for each day (include opening hours, ticket prices, and suggested visit duration)
        Recommended local food (with restaurant names and addresses)
        Transportation suggestions (intercity and local travel)
        Accommodation suggestions (with pros and cons)
        Important tips (weather, clothing, cultural taboos, etc.)

Configure the Answer Node

Click the "Answer Node" to open the configuration panel on the right.Click the “</>” button to select the output from a previous node and embed it into the final response.In this example, simply output the result from the previous LLM Node directly. As shown in the diagram, click on “text” under the LLM Node.

Try it

Now, a basic AgentFlow is complete. You can try it out with the following steps:

  1. Click "Draft" to save the current flow.

  2. Click "Preview" to test how this AgentFlow works.

  3. Enter your travel requirements in the input box below, and the AgentFlo\w will begin to run, generating a simple travel guide.

Last updated

Was this helpful?