Workflow configuration method, electronic equipment and storage medium
By integrating the agent node configuration interface and variable configuration area into the workflow editing page, the configuration process of agent services is simplified, solving the problems of complex and error-prone configuration in existing technologies, and realizing flexible and visual workflow configuration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA UNITED NETWORK COMM GRP CO LTD
- Filing Date
- 2026-01-23
- Publication Date
- 2026-05-12
AI Technical Summary
Configuring agent services in existing workflow systems is cumbersome and error-prone, making it difficult for non-developers to use.
A workflow editing page is provided. Users can select agent services through the agent node configuration interface and determine input parameters through the user input area and variable configuration area to generate a workflow containing agent nodes.
It simplifies the configuration process of intelligent agent services, reduces operational complexity, and improves the flexibility of workflow configuration and the consistency of visual editing.
Smart Images

Figure CN122018756A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of workflow configuration technology, and in particular to a workflow configuration method, electronic device and storage medium. Background Technology
[0002] In the context of current enterprise digital transformation and intelligent upgrading, low-code / no-code platforms greatly simplify the construction and automation of business processes by providing a visual workflow orchestration canvas. At the same time, agents built on artificial intelligence technologies such as large language models are rapidly becoming key components for improving the intelligence level of business systems due to their powerful capabilities in task planning, tool invocation, and complex problem solving.
[0003] There is a widespread need and practice in the industry to integrate agent services into workflow systems. However, existing mainstream integration solutions have significant limitations. The most common approach is to place a generic "HTTP Request" or "API Call" node in the workflow canvas, requiring users to manually fill in the endpoint address (URL) of the target agent service, the request method, request headers, and construct a complex request body (in JSON or other formats). This configuration process is extremely cumbersome and error-prone, requiring users to have a deep understanding of the specific API contract of the agent service and manually write request data structures that conform to its specifications, which is very unfriendly to non-developers.
[0004] Therefore, a solution is needed that allows for the simple and quick configuration of workflows that include agent service functionality. Summary of the Invention
[0005] This application provides a workflow configuration method, electronic device, and storage medium for easily and quickly configuring workflows that include agent service functions.
[0006] To achieve the above objectives, this application adopts the following technical solution: Firstly, this application provides a workflow configuration method, including: The workflow editing page is displayed, which is used to configure a workflow consisting of multiple node objects; the node objects include agent nodes; agent nodes are used to call agent services. In response to the addition of a new agent node in the workflow based on the workflow editing page, the agent node configuration interface is displayed. The agent node configuration interface includes: agent configuration controls, a user input area, and a variable configuration area. The agent configuration controls are used to select the target agent service to be called by the agent node. The user input area is used to configure the prompt information when calling the target agent service. The variable configuration area is used to select the input parameters of the target agent service from the output parameters of the upstream node and / or the parameters in the preset variable library. The upstream node is the node object that runs before the agent node configured by the user. In response to receiving a confirmation operation, a workflow consisting of multiple node objects is generated.
[0007] The technical solution provided in this application brings at least the following beneficial effects: By providing a workflow editing page, users can create workflows containing different work nodes according to their needs. When creating an agent node, users can select the required agent service through the agent configuration controls integrated in the agent node configuration interface, input prompts in the user input area, and specify the input parameters of the selected agent service through the variable configuration area. This process encapsulates the complex task of calling agent services into a standardized configuration action. Users can complete the call to agent services in a unified visual environment without leaving the workflow editing page or manually writing code to call APIs, greatly reducing operational complexity.
[0008] The data required for the operation of intelligent agent services often comes from the execution results of upstream nodes in the workflow. The variable configuration area in this application makes it possible for the input of intelligent agent services to no longer require additional coding, but to reference the data produced by upstream nodes or the system's preset parameters in the workflow. The data in the workflow is visually connected to the intelligent agent service, ensuring the continuity of workflow visual editing and improving the flexibility of workflow configuration.
[0009] Optionally, before generating the workflow, the method further includes: for each configured node object, determining whether the invocation conditions are met; the invocation conditions include: the node object's input parameters include parameters from other workflows, and / or the node object's input parameters include output parameters from downstream nodes of the node object; if the invocation conditions are met, issuing an invocation risk warning, which is used to instruct the node object to be reconfigured.
[0010] Optionally, the variable configuration area includes an upstream node control and a variable library control; the method further includes: in response to a touch operation on the upstream node control, displaying multiple upstream node identifiers; one upstream node identifier corresponds to an upstream node of an agent node; in response to a first selection operation on one or more upstream node identifiers, determining the output parameter of the upstream node indicated by the first selection operation as the input parameter of the agent service called by the agent node; in response to a touch operation on the variable library control, displaying multiple variable identifiers in a preset variable library; one variable identifier corresponds to a preset variable in the preset variable library; in response to a second selection operation on one or more variable identifiers, determining the preset variable indicated by the second selection operation as the input parameter of the agent service called by the agent node.
[0011] Optionally, the method further includes: displaying the output parameters of the first node object after the first node object is configured; in response to the addition operation of the downstream node of the first node object, determining the second node object indicated by the addition operation as the downstream node of the first node object; the addition operation is made by the user based on the output parameters of the first node object.
[0012] Optionally, the method further includes: when the workflow reaches a node object other than an agent node, obtaining preset configuration information of the node object; the preset configuration information is used to characterize the behavior of the node object during execution; the preset configuration information includes variable placeholders; replacing the variable placeholders with the output parameters of the input nodes of the node object in the workflow; the input nodes of the node object are the nodes that output data to the node object from the upstream nodes of the node object; and obtaining the output parameters of the node object based on the preset configuration information that replaces the variable placeholders.
[0013] Optionally, the method further includes: when the workflow reaches the agent node, obtaining the input parameters of the target agent service; sending a call request to the target server corresponding to the agent node; the target server is used to provide the target agent service; the call request includes the input parameters of the target agent service and prompt information; receiving the running result returned by the target server, the running result being generated by the target server based on the input parameters of the target agent service and prompt information; and using the running result as the output parameter of the agent node.
[0014] Optionally, the method further includes: displaying the agent running interface when the workflow reaches the agent node; and displaying the running progress of the target agent service and / or the intermediate running results of the target agent service in the agent running interface.
[0015] Optionally, the method further includes: for each node object running in the workflow, obtaining the node object's input parameters from the working variable pool, and storing the node object's output parameters in the working variable pool.
[0016] Secondly, this application provides a workflow configuration device, comprising: The display module is used to show the workflow editing page, which is used to configure a workflow consisting of multiple node objects. The node objects include agent nodes, which are used to call agent services. The processing module responds to the addition of a new agent node in the workflow based on the workflow editing page, displaying the agent node configuration interface. The agent node configuration interface includes: agent configuration controls, a user input area, and a variable configuration area. The agent configuration controls are used to select the target agent service called by the agent node. The user input area is used to configure the prompt information when calling the target agent service. The variable configuration area is used to select the input parameters of the target agent service from the output parameters of the upstream node and / or parameters in the preset variable library. The upstream node is a node object configured by the user to run before the agent node. The processing module is also used to generate a workflow consisting of multiple node objects in response to receiving a confirmation operation.
[0017] Thirdly, this application provides an electronic device, including: a display, a processor, and a memory; the display is used to display the interface mentioned in any of the above workflow configuration methods; the memory is used to store computer execution instructions, and the processor is connected to the memory. When the electronic device is running, the processor executes the computer execution instructions stored in the memory to cause the electronic device to perform any of the above workflow configuration methods.
[0018] Fourthly, this application provides a computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform any of the above-described workflow configuration methods.
[0019] Fifthly, this application provides a computer program product containing computer execution instructions, which, when run on a computer, causes the computer to execute any of the above-described workflow configuration methods.
[0020] In the specific implementation of this application, the names of the components of the aforementioned device do not limit the device itself. In actual implementation, these components may appear under other names. As long as the function of each component is similar to the specific implementation of this application, it falls within the scope of the claims of this application and its equivalents.
[0021] Furthermore, the technical effects of any of the design methods in aspects two through five can be found in the technical effects of the different design methods in aspect one above, and will not be repeated here. Attached Figure Description
[0022] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application; Figure 2 A flowchart illustrating a workflow configuration method provided in an embodiment of this application; Figure 3 This is a schematic diagram illustrating an application scenario of a workflow configuration method provided in an embodiment of this application. Figure 4 A logical schematic diagram of a workflow configuration method provided in an embodiment of this application; Figure 5 This is a schematic diagram of the structure of a workflow configuration device provided in an embodiment of this application; Figure 6 A schematic diagram of the hardware structure of another electronic device provided in an embodiment of this application; Figure 7 This is a schematic diagram of the hardware structure of another electronic device provided in an embodiment of this application. Detailed Implementation
[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] In the description of this application, unless otherwise stated, "a plurality of" means two or more.
[0025] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0026] As described in the background section, current solutions for configuring workflows that include agent services are not simple or quick enough.
[0027] To address the aforementioned issues, this application provides a workflow configuration method, comprising: displaying a workflow editing page, the workflow editing page being used to configure a workflow composed of multiple node objects; the node objects include agent nodes; the agent nodes are used to call agent services; in response to adding an agent node to the workflow based on the workflow editing page, displaying an agent node configuration interface; the agent node configuration interface includes: agent configuration controls, a user input area, and a variable configuration area; the agent configuration controls are used to select the target agent service called by the agent node; the user input area is used to configure prompt information when calling the target agent service; the variable configuration area is used to select input parameters of the target agent service from the output parameters of the upstream node and / or parameters in a preset variable library; the upstream node is a node object configured by the user to run before the agent node; in response to receiving a confirmation operation, generating a workflow composed of multiple node objects.
[0028] By providing a workflow editing page, users can create workflows containing different work nodes according to their needs. When creating an agent node, users can select the required agent service through the agent configuration controls integrated in the agent node configuration interface, input prompts in the user input area, and specify the input parameters of the selected agent service through the variable configuration area. This process encapsulates the complex task of calling agent services into a standardized configuration action. Users can complete the call to agent services in a unified visual environment without leaving the workflow editing page or manually writing code to call APIs, greatly reducing operational complexity.
[0029] The data required for the operation of intelligent agent services often comes from the execution results of upstream nodes in the workflow. The variable configuration area in this application makes it possible for the input of intelligent agent services to no longer require additional coding, but to reference the data produced by upstream nodes or the system's preset parameters in the workflow. The data in the workflow is visually connected to the intelligent agent service, ensuring the continuity of workflow visual editing and improving the flexibility of workflow configuration.
[0030] The workflow configuration method provided in this application can be applied to electronic devices.
[0031] Specifically, the electronic device is used to: display a workflow editing page, which is used to configure a workflow consisting of multiple node objects; the node objects include agent nodes; agent nodes are used to call agent services; in response to adding an agent node to the workflow based on the workflow editing page, the device displays an agent node configuration interface; the agent node configuration interface includes: agent configuration controls, a user input area, and a variable configuration area; the agent configuration controls are used to select the target agent service called by the agent node; the user input area is used to configure the prompt information when calling the target agent service; the variable configuration area is used to select the input parameters of the target agent service from the output parameters of the upstream node and / or the parameters in the preset variable library; the upstream node is a node object configured by the user to run before the agent node; in response to receiving a confirmation operation, the device generates a workflow consisting of multiple node objects.
[0032] In some embodiments, such as Figure 1 As shown, the electronic device may specifically include the following functional modules: Front-end: Multiple node objects are displayed on the workflow editing page for users to select.
[0033] Backend: Workflow service module, as the core engine, interacts with the agent service. The workflow service module mainly includes: node mapping management module, agent node execution module, variable management and data transmission module, external service communication module, and relationship recording and anti-loop module.
[0034] The node mapping management module is used to maintain the mapping relationship between different types of nodes and their specific implementation classes. It maintains a node mapping dictionary, for example, mapping the agent node type (NodeType.AGENT) to the agent node class (AgentNode).
[0035] Specifically, different node types refer to the classification of various functional units in a workflow, such as start nodes, end nodes, conditional decision nodes, and agent nodes. A concrete implementation class refers to the class in the programming code that actually implements all the logic of a particular node. For example, the StartNode class is responsible for handling the start of the process; the HttpRequestNode class is responsible for sending network requests; and the AgentNode class encapsulates all the complex logic for discovering, invoking, and processing agent service streaming responses. These classes typically inherit from a common abstract base class (such as BaseNode) and implement a standard method (such as run()). The mapping relationship refers to the correspondence between "node type → implementation class," for example, "AGENT type" corresponds to "AgentNode class." A node mapping dictionary is a data structure in program memory used to store and maintain mapping relationships, such as a hash table (Map) or a dictionary (Dictionary).
[0036] For example, taking an agent node as an example: During the creation of a node object, the user first selects to create an agent node (icon) on the front-end page. The front-end tells the back-end "the user wants to create a node of type NodeType.AGENT". The back-end engine queries the node mapping dictionary and finds that NodeType.AGENT corresponds to the AgentNode class. Therefore, the back-end instantiates an AgentNode object and associates it with the agent node (icon) selected by the user on the front-end page. This AgentNode object then carries all subsequent configuration and execution logic. During the execution of the node object, the back-end engine executes the agent node and calls its run() method. Since the agent node was created as an instance of AgentNode through the node mapping dictionary during creation, the run() method called by the engine is the overridden method in the AgentNode class that specifically handles agent services. If a new node type (such as a "blockchain query node") is to be added, the developer only needs to write a new BlockchainNode class and register it in the node mapping dictionary (e.g., NodeType.BLOCKCHAIN:BlockchainNode), without modifying the core code of the workflow engine.
[0037] The agent node execution module is used to execute specific agent tasks. Custom agent nodes and execution flows are defined within the workflow. When executing an agent node, user input, variables, and other information are used to invoke agent services. `AgentNode` inherits from the `BaseNode` base class and implements the agent invocation logic by overriding the `run` method. The `AgentNodeData` class encapsulates all the configuration information required by the agent node, supports real-time output through a streaming response processing mechanism, and also supports error handling and exception reporting mechanisms.
[0038] The variable management and data transfer module is used to transfer and process variable data between workflow nodes. Global variables are managed through a variable pool, and the custom method `format_template` handles and replaces variables in templates. It supports differentiated processing of ordinary and system variables, provides variable formatting and validation mechanisms, and supports validation of required fields.
[0039] The external service communication module is used to communicate with external servers providing intelligent agent services, sending POST requests to the server via an HTTP client. It supports streaming response processing, provides authentication and secure transmission, and includes call chain detection information. The server can be a computer, server, server cluster, or other device with data processing capabilities; this application does not limit the specific implementation of the server.
[0040] The relationship recording and anti-circularity module records the relationships between agents embedded in workflows through a database table of canvas workflows and workflow relationships. When adding agent components or agent-associated tools, this table is queried for validation to prevent circular dependencies.
[0041] In some embodiments, the electronic device may include a display device, or the electronic device may be connected to the display device to display the workflow configuration process and various interfaces involved in the workflow operation.
[0042] In some embodiments, the electronic device may specifically be a device capable of interacting with a user and having data processing capabilities. For example, the electronic device may be a computer, mobile phone, tablet, etc., and this application does not limit the specific implementation of the electronic device.
[0043] The workflow configuration method provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0044] Figure 2 This is a flowchart illustrating a workflow configuration method provided in an embodiment of this application, which can be executed by the aforementioned electronic device. The method includes: S101. Display the workflow editing page.
[0045] The workflow editing page is used to configure a workflow consisting of multiple node objects; the node objects include agent nodes; agent nodes are used to call agent services.
[0046] Users select the node objects corresponding to the work nodes involved in the workflow on the workflow editing page. Users can select the node objects by dragging and dropping the controls corresponding to the node objects to a specific area on the workflow editing page, or by clicking the controls corresponding to the node objects.
[0047] For example, the workflow editing page displays controls corresponding to multiple node objects such as start node, end node, condition judgment node, and agent node. Users can drag and drop the control corresponding to the agent node into the workflow editing area to indicate that the workflow to be created includes the node objects contained in the workflow editing area.
[0048] For example, when a user clicks on the controls corresponding to different node objects in sequence, the clicked node objects are the node objects contained in the workflow, and the order in which the node objects are clicked represents the execution order of the node objects in the workflow.
[0049] S102. In response to the addition of a new agent node in the workflow based on the workflow editing page, display the agent node configuration interface.
[0050] The agent node configuration interface includes: agent configuration controls, a user input area, and a variable configuration area; the agent configuration controls are used to select the target agent service called by the agent node; the user input area is used to configure the prompt information when calling the target agent service; the variable configuration area is used to select the input parameters of the target agent service from the output parameters of the upstream node and / or the parameters in the preset variable library; the upstream node is the node object that runs before the agent node configured by the user.
[0051] The prompt message can be a word or phrase that the user wants the target intelligent agent service to run. For example, if the target intelligent agent service is a document analysis intelligent agent, the prompt message could be "Please introduce the solution steps in the document in sequence".
[0052] For example, when a user clicks on the control corresponding to the agent node, the electronic device displays the agent node configuration interface, which shows the agent configuration control, the user input area, and the variable configuration area.
[0053] If the user clicks the agent configuration control, the agent service selection interface will be displayed, such as... Figure 3 As shown, the agent service selection interface includes an agent service type input box and an agent service input box. Users can enter the desired agent service type in the agent service type input box, and the electronic device will then display agent services of that type for the user to choose from. Users can also directly enter the identifier of the agent service in the agent service input box, and the electronic device will retrieve the relevant agent services and display them for the user to select from.
[0054] Optionally, agent service types and / or agent services can be displayed in a list format. For example, when a user clicks the agent service type input box, the electronic device displays a list of agent types.
[0055] Optionally, the agent node configuration interface may also include a static information display area for automatically filling in information such as the ID and version of the selected agent.
[0056] In some embodiments, the variable configuration area includes an upstream node control and a variable library control. In response to a touch operation on the upstream node control, the electronic device displays multiple upstream node identifiers; each upstream node identifier corresponds to an upstream node of an agent node; in response to a first selection operation on one or more upstream node identifiers, the output parameter of the upstream node indicated by the first selection operation is determined as the input parameter of the agent service invoked by the agent node. In response to a touch operation on the variable library control, the electronic device displays multiple variable identifiers in a preset variable library; each variable identifier corresponds to a preset variable in the preset variable library; in response to a second selection operation on one or more variable identifiers, the preset variable indicated by the second selection operation is determined as the input parameter of the agent service invoked by the agent node.
[0057] For example, in a customer service ticket classification scenario, the three currently selected node objects are: Node 1 is a form submission node, whose output parameters are user description and contact number; Node 2 is a customer information query node, whose output parameters are user level and historical complaint count; and Node 3 is an agent node that calls the ticket classification agent service. Nodes 1 and 2 are upstream nodes of Node 3. When configuring Node 3, clicking the upstream node control will display the identifiers of Nodes 1 and 2. If the user only selects Node 1, the input parameters of the ticket classification agent service will only include the user description and contact number, and will not include the user level and historical complaint count. Assuming that the preset variable library includes variables such as current time, handler group, and emergency threshold, if the user selects the emergency threshold, the input parameters of the ticket classification agent service will be the user description, contact number, and emergency threshold.
[0058] Users do not need to remember the output parameters of upstream nodes, nor do they need to worry about entering the wrong variable names. The upstream node control can display all possible data sources, guide users to discover and use the available data, and avoid configuration errors.
[0059] The variable library control displays preset general variables, ensuring that key business parameters remain consistent throughout the system. When a preset variable needs to be updated, modifying the variable in the preset variable library will automatically apply the changes to all workflow configurations that reference that variable, eliminating the need for individual modifications.
[0060] Users can simultaneously select variables from upstream node outputs and preset variable libraries to form a hybrid input source. This satisfies the complex need for intelligent agents to combine dynamic process data (upstream node outputs) with static system knowledge (preset variables) for input, providing the most comprehensive contextual information for the intelligent agent.
[0061] In some embodiments, after a user selects an upstream node, all output parameters of that upstream node can be displayed, and the user can select one or more of them as input parameters for the target agent service.
[0062] Optionally, the input parameters for the target agent service may also include parameters actively entered by the user. The area for user-entered parameters can be set in the user input area or in the variable configuration area.
[0063] In summary, the process of obtaining and configuring the intelligent agent service is as follows: The user requests a list of intelligent agents through the front-end interface. The back-end receives the request and constructs query parameters. The back-end obtains an authentication token from the user's context and then sends a query request to the external server that provides the intelligent agent service. The back-end parses the server's response data and returns it to the front-end. The front-end user selects a specific intelligent agent. The back-end obtains detailed information about the specific intelligent agent from the server. The front-end user determines the configuration information of the input parameters of the intelligent agent service for workflow configuration.
[0064] In some embodiments, the electronic device first loads a node mapping dictionary, registers the NodeType.AGENT type and its corresponding AgentNode implementation class in the node mapping dictionary, and when an agent node is added to the workflow, creates a corresponding AgentNode instance according to the node type, initializes the AgentNodeData object, sets the basic attributes of the agent (ID, version, name, etc.), and completes the registration and initialization process of the agent node.
[0065] In some embodiments, when configuring downstream nodes of a node object, users can configure them based on the node object's output parameters.
[0066] Specifically, after the first node object is configured, the output parameters of the first node object are displayed; in response to the addition operation of the downstream node of the first node object, the second node object indicated by the addition operation is determined as the downstream node of the first node object; the addition operation is made by the user based on the output parameters of the first node object.
[0067] For example, the work order classification node will output parameters such as work order classification, urgency level, recommended processing department, and estimated resolution time. After seeing these output parameters, the user realizes that different processing is needed based on the classification results. The user can then select a conditional branch node as the downstream node of the work order classification node. When configuring the conditional branch node, the user can set the branch conditions based on the output parameters of the work order classification node.
[0068] Users do not need to remember or predict the output of each node. The system displays the output parameters of the configured nodes in real time, and users decide which node to add next based on these visible results, thus forming a clear logical chain in the workflow.
[0069] In some embodiments, before generating the workflow (i.e., before step S103), it is also determined whether the configured node object has any calling risks. For example, the node object may call parameters from other workflows or call output parameters from its own downstream nodes.
[0070] Specifically, for each configured node object, determine whether the calling conditions are met; the calling conditions include: the node object's input parameters include parameters from other workflows, and / or the node object's input parameters include output parameters from downstream nodes of the node object; if the calling conditions are met, issue a calling risk warning, which is used to instruct the node object to be reconfigured.
[0071] For agent nodes, if an agent node does not meet the calling conditions, the agent service that has been configured for the agent node can be identified as the target agent service.
[0072] For example, in the "Customer Complaint Handling Workflow," there is a "Send Notification Email" node. Its input parameters include the customer's email address (from the upstream node "Customer Information Query") and the processing progress report (from the final output variable of another independent workflow, "Work Order Processing"). The electronic device detects that the "Send Notification Email" node calls parameters from another workflow, and this node meets the calling conditions. Therefore, the electronic device issues a calling risk warning: "Warning: The 'Send Notification Email' node references output parameters from the external workflow 'Work Order Processing,' which may lead to uncertain dependencies or execution failure. It is recommended to obtain data from within this workflow or establish a standard interface between workflows."
[0073] In another example, in the "Order Review Workflow," nodes 1, 2, and 3 are executed sequentially. Node 1 is the order verification node, outputting the verification result; node 2 is the risk scoring node, inputting the review conclusion and outputting the risk score; and node 3 is the final review node, inputting the risk score and outputting the review conclusion. If the electronic device detection system detects that node 2 has called the output parameters of a subsequent node, satisfying the calling condition, then the electronic device will output a call risk warning.
[0074] By setting invocation conditions, potential dependency issues can be identified before workflow deployment, reducing the failure rate of the workflow online and ensuring that the input data of each node is available, valid, and in the correct sequence at runtime, thereby improving the reliability of workflow execution.
[0075] Optionally, risk warnings can be displayed in the form of text, images, highlighted text, or sound.
[0076] Optionally, the electronic device predetermines the calling relationships between various intelligent agent services and other nodes. When the user selects an intelligent agent, the electronic device, based on the predetermined calling relationships and other configured nodes, filters out intelligent agent services that do not conflict with the configured nodes and displays them in a list, so that the user can select the intelligent agent service they need.
[0077] S103. In response to receiving the confirmation operation, a workflow consisting of multiple node objects is generated.
[0078] Confirmation actions can be actions performed by the user after completing workflow configuration, such as saving or applying the workflow. For example, after completing workflow configuration, the user clicks the "Apply" control on the workflow editing page, and the electronic device generates the workflow.
[0079] In some embodiments, when the workflow reaches a node object other than an agent node, the electronic device obtains preset configuration information of the node object; the preset configuration information is used to characterize the behavior of the node object during execution; the preset configuration information includes variable placeholders; the electronic device replaces the variable placeholders with the output parameters of the input nodes of the node object in the workflow; the input nodes of the node object are the nodes that output data to the node object from the upstream nodes of the node object; the electronic device obtains the output parameters of the node object based on the preset configuration information that replaces the variable placeholders.
[0080] For example, in the workflow, node 1 is a form submission node, with output parameters "Customer Name: Zhang San" and "Problem Description: Unable to access the Internet". Node 2 is a work order generation node, with output parameters "Work Order Number: GD202601160001". Node 3 is an SMS sending node, with its corresponding preset configuration information being "Dear {{Customer Name}}, your feedback on '{{Problem Description}}' has been accepted, work order number {{Work Order Number}}, and we will process it as soon as possible." When the workflow reaches node 3, the electronic device obtains its preset configuration information and finds a variable placeholder: {{Customer Name}. The electronic device searches for the input nodes (nodes 1 and 2) of node 3, replacing the variable placeholders of the input node's output parameters: {{customer name}} is replaced with "Zhang San", {{problem description}} is replaced with "unable to access the internet", and {{work order number}} is replaced with "GD202601160001". The preset configuration information after replacement is "Dear Zhang San, your feedback on the 'unable to access the internet' problem has been accepted, work order number GD20241011001, we will process it as soon as possible." The SMS sending node sends this content to the customer.
[0081] The pre-configured information for nodes (such as SMS templates, SQL query statements, and conditional expressions) only needs to be written once. Dynamic parts are represented by variable placeholders, and during actual execution, the electronic device automatically injects the specific runtime data, greatly reducing repetitive configuration work and making the configuration process more intuitive; even non-technical personnel can understand and complete the configuration. When business logic needs to be adjusted (such as changing the wording of SMS templates or altering risk control thresholds), simply update the pre-configured information template for the corresponding node, and all workflow instances using that node will automatically inherit the changes.
[0082] An intelligent agent node is essentially a special type of node. It also follows the pattern of "getting configuration → replacing variables → executing logic". Its "prompt information" and "input parameters" are its special "preset configuration information".
[0083] In some embodiments, when the workflow reaches the agent node, the electronic device obtains the input parameters of the target agent service; the electronic device sends a call request to the target server corresponding to the agent node; the target server provides the target agent service; the call request includes the input parameters of the target agent service and prompt information; the electronic device receives the running result returned by the target server, the running result is generated by the target server based on the input parameters of the target agent service and prompt information; the electronic device uses the running result as the output parameter of the agent node.
[0084] For example, the agent node invokes the work order analysis and classification agent. The work order text output by the work order text node and the user level output by the user level node in the upstream node are the input parameters of the agent node. The user input prompt is "Please analyze this work order, extract key issues and user sentiment, and recommend processing priority and the department to which it should be assigned." The electronic device packages the work order text, user level, and "Please analyze this work order, extract key issues and user sentiment, and recommend processing priority and the department to which it should be assigned" and sends them to the server providing the work order analysis and classification agent service. The work order analysis and classification agent service generates the running result based on the above content, and the server returns this running result to the electronic device. This is the output parameter of the agent node.
[0085] The complex agent interaction process, which previously required intricate prompting, context building, and API calls, is now encapsulated into a standardized workflow node operation. The "prompt information" carries the business intent and instruction logic, while the "input parameters" provide pure data. Business users do not need to understand the technical details of the agent; they only need to configure the prompt information and input parameters to obtain professional results, significantly lowering the barrier to entry for using agents. Furthermore, the input parameters of the agent service are dynamically bound to the data generated during workflow runtime. Each time the agent service is called, the data it processes is real-time and specific to the current process instance.
[0086] In some embodiments, when the workflow reaches the agent node, an agent running interface is displayed; the agent running interface displays the running progress of the target agent service and / or the intermediate running results of the target agent service.
[0087] For example, the running progress could be the step that the target intelligent agent service has reached, or it could be a progress bar for the running target intelligent agent service.
[0088] For example, the target intelligent agent service is a work order classification intelligent agent, and the intermediate results can be the user type, product, urgency, problem type, problem content, etc. in the work order submitted by the user.
[0089] For example, the target intelligent agent service is a copywriting generation intelligent agent, and the intermediate results can be multiple draft copy generated for the product, recommended topic tags, image suggestions, and other content.
[0090] Transforming the thought process of the target intelligent agent into visualized intermediate results allows users to clearly understand the reasoning logic and basis of the target intelligent agent's service. Users can see the progress and intermediate results in real time, and if deviations or adjustments are needed, intervention can be made before the agent completes the process, ensuring the accuracy of the final result. Furthermore, displaying intermediate results aligns with human cognitive habits, reducing user anxiety during waiting.
[0091] In some embodiments, for each node object running in the workflow, the electronic device obtains the node object's input parameters from the working variable pool and stores the node object's output parameters in the working variable pool.
[0092] The working variable pool is essentially a portion of the electronic device's storage space. This storage space can be further divided based on node objects in the workflow. Each node object corresponds to a fixed storage location, and the node object's output parameters are stored in its corresponding storage location. When a node object needs to use the output parameters of other nodes, it queries the storage location corresponding to those other nodes and reads the output parameters from that location.
[0093] The variable pool serves as shared data storage, allowing any node to retrieve data from it as needed. Nodes do not directly pass data to each other, reducing coupling between them. Each node depends only on the data in the variable pool, without needing to know the specific implementation of other nodes or directly reference them. All nodes obtain input from the variable pool and store output in the same way, unifying the data access interface and simplifying node development. Nodes only need to focus on how to execute logic based on input parameters and output the results to the variable pool, without worrying about how data is passed to the next node.
[0094] In some embodiments, the work variable pool can be cleaned up and storage resources released after the workflow is completed.
[0095] In summary, the specific execution process of the agent node is as follows: When the workflow engine schedules to an agent node, it identifies the agent type of the agent node and calls the run() method of its AgentNode implementation class.
[0096] Within the `run()` method, all upstream data referenced in the node's configuration is first extracted from the working variable pool. Then, methods such as `format_template` are used to replace any existing variable templates in the configuration information (such as `{{customer name}}`) with actual runtime values, and the distinction between business variables and preset variables is properly handled.
[0097] The electronic device then packages these processed input parameters, along with the prompts, into a structured request body. After attaching the necessary authentication information, it initiates a call to the target server where the intelligent agent capability is deployed via an HTTP client.
[0098] The server (intelligent agent) begins processing and returns a streaming response. The electronic device receives and parses the data simultaneously, providing real-time feedback on the intermediate process to the user while displaying the final result after all data has been returned.
[0099] Finally, this final result is written back to the workflow variable pool as the output parameter of the agent node. The final result becomes a new shared data in the workflow, and any subsequent node can easily read and utilize the conclusions produced by the agent just like any other variable.
[0100] In some embodiments, a configured workflow can be saved and executed repeatedly to avoid redundant configuration and ensure the consistency of work processed by the same business process.
[0101] Figure 2 The technical solution shown brings at least the following beneficial effects: By providing a workflow editing page, users can create workflows containing different work nodes according to their needs. When creating an agent node, users can select the required agent service through the agent configuration controls integrated in the agent node configuration interface, input prompts in the user input area, and specify the input parameters of the selected agent service through the variable configuration area. This process encapsulates the complex task of calling agent services into a standardized configuration action. Users can complete the call to agent services in a unified visual environment without leaving the workflow editing page or manually writing code to call APIs, greatly reducing operational complexity.
[0102] The data required for the operation of intelligent agent services often comes from the execution results of upstream nodes in the workflow. The variable configuration area in this application makes it possible for the input of intelligent agent services to no longer require additional coding, but to reference the data produced by upstream nodes or the system's preset parameters in the workflow. The data in the workflow is visually connected to the intelligent agent service, ensuring the continuity of workflow visual editing and improving the flexibility of workflow configuration.
[0103] The following describes the workflow configuration process completed using the workflow configuration method provided in this application from an overall logical perspective: Figure 4 As shown: Execute sequentially according to the order of each node object in the workflow. For each node object, first determine the type of the node object. If the node object is a non-agent node, then create a corresponding node instance, execute the run() method of the corresponding node, and finally schedule the next node; If the node object is an agent node, create and initialize an AgentNode instance to process the output parameters, prompts, preset variables, and variable placeholders of the upstream node. Validate all required input fields to ensure they are complete. If any are missing, throw a field missing exception and terminate the process to ensure the reliability of the call. If complete, construct the agent request parameters and add authentication and probe headers; Send an HTTP request to the agent service and determine whether the request was successful; If successful, process the response data, output the final result to the working variable pool, and schedule the next node; if unsuccessful, generate a request failure report and terminate the process. When scheduling the next node, it is necessary to first determine whether there is a subsequent node. If there is, the node scheduling process continues and returns to the "determine the type of node object" step; if there is no node, the process terminates.
[0104] The foregoing primarily describes the solution provided in this application from a methodological perspective. It is understood that, to achieve the aforementioned functions, it includes corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should readily recognize that, based on the algorithmic steps of the examples described in conjunction with the embodiments disclosed herein, the present invention can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.
[0105] like Figure 5 The diagram shown is a structural schematic of a workflow configuration device 20 provided in an embodiment of this application. The workflow configuration device 20 includes a display module 201 and a processing module 202.
[0106] The display module 201 is used to display the workflow editing page, which is used to configure a workflow consisting of multiple node objects. The node objects include agent nodes, which are used to call agent services. The processing module 202 is used to display the agent node configuration interface in response to the addition of an agent node in the workflow based on the workflow editing page. The agent node configuration interface includes: agent configuration controls, a user input area, and a variable configuration area. The agent configuration controls are used to select the target agent service called by the agent node. The user input area is used to configure the prompt information when calling the target agent service. The variable configuration area is used to select the input parameters of the target agent service from the output parameters of the upstream node and / or the parameters in the preset variable library. The upstream node is a node object configured by the user to run before the agent node. The processing module 202 is also used to generate a workflow consisting of multiple node objects in response to receiving a confirmation operation.
[0107] Optionally, before generating the workflow, the processing module 202 is further configured to: determine whether the calling conditions are met for each configured node object; the calling conditions include: the node object's input parameters include parameters from other workflows, and / or the node object's input parameters include output parameters from downstream nodes of the node object; if the calling conditions are met, issue a calling risk warning, which is used to instruct the node object to be reconfigured.
[0108] Optionally, the variable configuration area includes an upstream node control and a variable library control; the display module 201 is further configured to, in response to a touch operation on the upstream node control, display multiple upstream node identifiers; one upstream node identifier corresponds to an upstream node of an agent node; the processing module 202 is further configured to, in response to a first selection operation on one or more upstream node identifiers, determine the output parameter of the upstream node indicated by the first selection operation as the input parameter of the agent service called by the agent node; the display module 201 is further configured to, in response to a touch operation on the variable library control, display multiple variable identifiers in a preset variable library; one variable identifier corresponds to a preset variable in the preset variable library; the processing module 202 is further configured to, in response to a second selection operation on one or more variable identifiers, determine the preset variable indicated by the second selection operation as the input parameter of the agent service called by the agent node.
[0109] Optionally, the display module 201 is further configured to display the output parameters of the first node object after the first node object is configured; the processing module 202 is further configured to determine the second node object indicated by the addition operation as the downstream node of the first node object in response to the addition operation of the downstream node of the first node object; the addition operation is made by the user based on the output parameters of the first node object.
[0110] Optionally, the processing module 202 is further configured to: when the workflow reaches a node object other than an agent node, obtain the preset configuration information of the node object; the preset configuration information is used to characterize the behavior of the node object during execution; the preset configuration information includes variable placeholders; replace the variable placeholders with the output parameters of the input nodes of the node object in the workflow; the input nodes of the node object are the nodes that output data to the node object from the upstream nodes of the node object; and obtain the output parameters of the node object based on the preset configuration information that replaces the variable placeholders.
[0111] Optionally, the processing module 202 is further configured to: when the workflow reaches the agent node, obtain the input parameters of the target agent service; send a call request to the target server corresponding to the agent node; the target server is used to provide the target agent service; the call request includes the input parameters of the target agent service and prompt information; receive the running result returned by the target server, the running result being generated by the target server based on the input parameters of the target agent service and prompt information; and use the running result as the output parameter of the agent node.
[0112] Optionally, the display module 201 is also used to: display the agent running interface when the workflow reaches the agent node; and display the running progress of the target agent service and / or the intermediate running results of the target agent service in the agent running interface.
[0113] Optionally, the processing module 202 is also used to, for each node object running in the workflow, obtain the input parameters of the node object from the working variable pool and store the output parameters of the node object in the working variable pool.
[0114] This application embodiment can divide the workflow configuration device into functional modules according to the above method example. For example, each function can be divided into a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware or as a software functional module. Optionally, the module division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.
[0115] This application also provides an electronic device, including: a display, a processor, and a memory. The display is used to show the interface mentioned in any of the above workflow configuration methods; the memory is used to store computer execution instructions; the processor is connected to the memory; when the electronic device is running, the processor executes the computer execution instructions stored in the memory, so that the electronic device executes any of the workflow configuration methods provided in the above embodiments.
[0116] Besides the display, the hardware structure of electronic devices can be as follows: Figure 6 As shown, the electronic device includes a processor 301, a memory 302, a communication interface 303, and a bus 304. The memory 302 exists independently of the processor 301. The processor 301, the memory 302, and the communication interface 303 can be connected via the bus 304.
[0117] Processor 301 is the control center of the electronic device. It can be a single processor or a collective term for multiple processing elements. For example, processor 301 can be a general-purpose central processing unit (CPU) or other general-purpose processors. Among them, the general-purpose processor can be a microprocessor or any conventional processor.
[0118] As one embodiment, processor 301 may include one or more CPUs, for example Figure 6 CPU 0 and CPU 1 are shown in the diagram.
[0119] The memory 302 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), disk storage medium or other magnetic storage device, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto.
[0120] The memory 302 can be connected to the processor 301 via the bus 304 and is used to store instructions or program code. When the processor 301 calls and executes the instructions or program code stored in the memory 302, it can implement the workflow configuration method provided in this embodiment of the invention.
[0121] The communication interface 303 is used to connect with other devices via a communication network. The communication network can be Ethernet, a wireless access network, a wireless local area network (WLAN), etc. The communication interface 303 may include a receiving unit for receiving data and a transmitting unit for sending data.
[0122] Bus 304 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0123] In other embodiments, the memory 302 may also be integrated with the processor 301. For example... Figure 7 As shown, the electronic device may include a processor 305 and a communication interface 306, with the processor 305 coupled to the communication interface 306.
[0124] The functions of processor 305 can be referred to the above. Figure 6 The processor 301 is described above. In addition, the processor 305 also has storage capabilities, which can be found in the above description. Figure 6The function of memory 302.
[0125] The communication interface 306 is used to provide data to the processor 305. This communication interface 306 can be an internal interface of the electronic device or an external interface of the electronic device (equivalent to...). Figure 6 (Communication interface 303 in the middle).
[0126] It should be pointed out that, Figure 6 (or Figure 7 The structures shown in the document do not constitute a limitation on the electronic device, except... Figure 6 (or Figure 7 In addition to the components shown in the diagram, the electronic device may include more or fewer components than those shown, or combine certain components, or have different component arrangements.
[0127] This application also provides a computer-readable storage medium including computer-executable instructions that, when run on a computer, cause the computer to execute any of the workflow configuration methods provided in the above embodiments.
[0128] This application also provides a computer program product containing computer execution instructions, which, when run on a computer, causes the computer to execute any of the workflow configuration methods provided in the above embodiments.
[0129] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented using software programs, it can be implemented, in whole or in part, as a computer program product. This computer program product includes one or more computer-executable instructions. When these computer-executable instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated.
[0130] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A workflow configuration method, characterized in that, include: The workflow editing page is displayed, which is used to configure a workflow consisting of multiple node objects; the node objects include agent nodes; the agent nodes are used to call agent services; In response to the addition of a smart agent node in the workflow based on the workflow editing page, the smart agent node configuration interface is displayed; The agent node configuration interface includes: an agent configuration control, a user input area, and a variable configuration area; the agent configuration control is used to select the target agent service called by the agent node; the user input area is used to configure the prompt information when calling the target agent service; the variable configuration area is used to select the input parameters of the target agent service from the output parameters of the upstream node and / or the parameters in the preset variable library; the upstream node is a node object configured by the user to run before the agent node; In response to receiving a confirmation operation, the workflow consisting of multiple node objects is generated.
2. The method according to claim 1, characterized in that, Before generating the workflow, the method further includes: For each configured node object, determine whether the calling conditions are met; the calling conditions include: the input parameters of the node object include parameters from other workflows, and / or the input parameters of the node object include output parameters from the downstream nodes of the node object; If the aforementioned invocation conditions are met, an invocation risk warning is issued, which is used to instruct the node object to be reconfigured.
3. The method according to claim 1, characterized in that, The variable configuration area includes upstream node controls and variable library controls; The method further includes: In response to a touch operation on the upstream node control, multiple upstream node identifiers are displayed; one upstream node identifier corresponds to an upstream node of the agent node; in response to a first selection operation on one or more upstream node identifiers, the output parameters of the upstream node indicated by the first selection operation are determined as the input parameters of the agent service called by the agent node. In response to a touch operation on the variable library control, multiple variable identifiers in the preset variable library are displayed; each variable identifier corresponds to a preset variable in the preset variable library; in response to a second selection operation on one or more variable identifiers, the preset variable indicated by the second selection operation is determined as the input parameter of the agent service invoked by the agent node.
4. The method according to claim 1, characterized in that, The method further includes: After the first node object is configured, display the output parameters of the first node object; In response to an add operation to a downstream node of the first node object, the second node object indicated by the add operation is determined as a downstream node of the first node object; the add operation is performed by the user based on the output parameters of the first node object.
5. The method according to claim 1, characterized in that, The method further includes: When the workflow reaches a node object other than the agent node, the preset configuration information of the node object is obtained; the preset configuration information is used to characterize the behavior of the node object during execution; the preset configuration information includes variable placeholders; Replace the variable placeholder with the output parameter of the input node of the node object in the workflow; the input node of the node object is the node that outputs data to the node object from its upstream node. Based on the preset configuration information that replaces the variable placeholders, the output parameters of the node object are obtained.
6. The method according to claim 1, characterized in that, The method further includes: When the workflow reaches the agent node, the input parameters of the target agent service are obtained; A call request is sent to the target server corresponding to the agent node; the target server is used to provide the target agent service; the call request includes the input parameters of the target agent service and the prompt information. Receive the running result returned by the target server, the running result being generated by the target server based on the input parameters of the target intelligent agent service and the prompt information; The execution results are used as the output parameters of the agent node.
7. The method according to claim 1, characterized in that, The method further includes: When the workflow reaches the agent node, the agent's operating interface is displayed; The intelligent agent's running interface displays the running progress of the target intelligent agent service and / or the intermediate running results of the target intelligent agent service.
8. The method according to claim 1, characterized in that, The method further includes: For each node object running in the workflow, the input parameters of the node object are obtained from the working variable pool, and the output parameters of the node object are stored in the working variable pool.
9. An electronic device, characterized in that, The electronic device includes a display, a memory, and a processor; The display is used to display the interface or page of the method according to any one of claims 1-8; The memory and the processor are coupled; The memory is used to store computer program code, which includes computer instructions; Wherein, when the processor executes the computer instructions, the electronic device performs the method as described in any one of claims 1-8.
10. A computer storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1-8.