Automatic task execution method and device, electronic equipment and storage medium
By automating the software development and release process through agents based on large language models and MCP servers, the problem of high human involvement in traditional methods is solved. This achieves efficient and standardized pipeline task execution, reduces error rates, and optimizes resource utilization.
Patent Information
- Application Number
- CN202511835324.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-02-13
AI Technical Summary
Traditional software development and release processes involve a high degree of human intervention, leading to low efficiency, a high risk of errors, delayed information transmission, low standardization, and inconsistent operating habits among different developers, which poses a risk of information loss.
The agent of the large language model receives the demand commands and sequentially calls multiple Model Context Protocol (MCP) servers to automatically execute pipeline tasks, including project management, code management, instant messaging, and application packaging and release pipelines, reducing manual operations and achieving full automation.
It reduces human intervention, improves the standardization and execution efficiency of pipeline tasks, reduces error rates, ensures the accuracy and timeliness of information transmission, and achieves process traceability and resource optimization.
Smart Images

Figure CN121523739A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, and in particular, to a task automatic execution method and device, electronic equipment and storage medium. BACKGROUND
[0002] In the related art, in the traditional software development and release process, when the demand test passes and enters the online state, the following manual operation steps are usually required: code merging stage: the developer manually initiates the merge request (MR) of the code, and sends the MR to the leader for code review; pipeline creation stage: after the MR passes, the developer needs to log in to the Octopus platform, manually input the related information of the PMS demand single and the tester information, and create a release pipeline; pipeline execution stage: the pipeline automatically triggers image building, pre-release environment verification, production environment release, backtest and other steps; notification coordination stage: the developer needs to paste the pipeline address to the group, and notify the tester to follow up the pipeline execution status.
[0003] The problems in the related art are as follows: high manual participation, the entire process requires a large amount of manual operation, is prone to errors and low in efficiency, information transmission lags behind, information transmission between stages depends on manual operation, there is a risk of delay and omission, the process standardization degree is low, the operation habits and standards of different developers may not be consistent, the error handling capability is weak, manual operation is prone to input errors, omission of steps and other problems, and resources are wasted, and repetitive manual operation occupies a large amount of time of the developer.
[0004] In view of the above problems in the related art, there is no effective solution at present. SUMMARY
[0005] The embodiments of the present application provide a task automatic execution method and device, electronic equipment and storage medium to solve the technical problems of the related art.
[0006] According to an aspect of an embodiment of the present application, a task automatic execution method is provided, including: receiving a demand command through a dialogue box of an agent of a large language model, wherein the demand command includes a task identifier and a trigger symbol; responding to the demand command based on the trigger symbol, and sequentially calling a plurality of model context protocol (MCP) servers according to the demand command; receiving a notification message of the last MCP server, wherein the notification message carries a pipeline execution result of the demand command; and outputting the pipeline execution result in the dialogue box.
[0007] Further, invoking the plurality of model context protocol (MCP) servers according to the requirement command in sequence comprises: parsing the requirement command, determining a pipeline process matched with the task identifier, wherein the pipeline process comprises a plurality of sequentially arranged MCP servers; and invoking the plurality of MCP servers according to the pipeline process in sequence, wherein the plurality of MCP servers comprise a project management MCP server, a code management MCP server, an instant messaging MCP server, and an application packaging and releasing pipeline MCP server.
[0008] Further, invoking the plurality of MCP servers according to the pipeline process in sequence comprises: invoking the project management MCP server according to the pipeline process; and obtaining requirement sheet information matched with the task identifier by using tool calling of the project management MCP server, wherein the requirement sheet information comprises a code branch, a person in charge, and a tester.
[0009] Further, invoking the plurality of MCP servers according to the pipeline process in sequence comprises: determining that the agent obtains the code branch returned by the project management MCP server; invoking the code management MCP server according to the pipeline process; and initiating a merge request (MR) corresponding to the code branch by using tool calling of the code management MCP server, and returning an MR address of the MR to the agent by using notification of the code management MCP server.
[0010] Further, invoking the plurality of MCP servers according to the pipeline process in sequence comprises: determining that the agent obtains the MR address returned by the code management MCP server; invoking the instant messaging MCP server according to the pipeline process; pushing the MR address to a communication address of the person in charge by using tool calling of the instant messaging MCP server; and returning an acceptance notification message of the MR address to the agent by using notification of the code management MCP server after returning an audit pass message at the communication address.
[0011] Further, the sequentially calling the plurality of MCP servers according to the pipeline procedure comprises: determining that the agent obtains an acceptance notification message of the MR address returned by the code management MCP server; calling an application packaging and publishing pipeline MCP server according to the pipeline procedure; creating a packaging and deployment pipeline based on requirement order information of the task identifier through tool calling of the application packaging and publishing pipeline MCP server, and returning a pipeline address of the packaging and deployment pipeline to the agent through notification of the application packaging and publishing pipeline MCP server; calling an instant messaging MCP server according to the pipeline procedure; sending the pipeline address to an account of a tester through tool calling of the instant messaging MCP server; and returning a pipeline execution result of the packaging and deployment pipeline to the agent through notification of the application packaging and publishing pipeline MCP server after the packaging and deployment pipeline is executed.
[0012] Further, before the requirement command is received through the dialog box of the agent of the large language model, the method further comprises: creating a reusable workflow, and creating a task identifier matched with the workflow; and configuring a command template of the requirement command by using the task identifier and the trigger symbol.
[0013] According to another aspect of the embodiments of the present application, a task automatic execution device is also provided, comprising: a first receiving module configured to receive a requirement command through a dialog box of an agent of a large language model, wherein the requirement command comprises a task identifier and a trigger symbol; a calling module configured to respond to the requirement command based on the trigger symbol, and sequentially call a plurality of model context protocol MCP servers according to the requirement command; a second receiving module configured to receive a notification message of a last MCP server, wherein the notification message carries a pipeline execution result of the requirement command; and an output module configured to output the pipeline execution result in the dialog box.
[0014] Further, the calling module comprises: a determining unit configured to parse the requirement command, and determine a pipeline procedure matched with the task identifier, wherein the pipeline procedure comprises a plurality of MCP servers arranged in sequence; and a calling unit configured to sequentially call the plurality of MCP servers according to the pipeline procedure, wherein the plurality of MCP servers comprise a project management MCP server, a code management MCP server, an instant messaging MCP server, and an application packaging and publishing pipeline MCP server.
[0015] Further, the calling unit comprises: a first calling subunit, configured to call a project management MCP server according to the pipeline process; a first acquisition subunit, configured to acquire requirement sheet information matched with the task identifier by using tool calling of the project management MCP server, wherein the requirement sheet information comprises a code branch, a person in charge and a tester.
[0016] Further, the calling unit comprises: a first determining subunit, configured to determine that the agent acquires the code branch returned by the project management MCP server; a second calling subunit, configured to call a code management MCP server according to the pipeline process; and a first processing subunit, configured to initiate a merge request MR corresponding to the code branch by using tool calling of the code management MCP server, and return the MR address of the merge request MR to the agent by using notification of the code management MCP server.
[0017] Further, the calling unit comprises: a second determining subunit, configured to determine that the agent acquires the MR address returned by the code management MCP server; a third calling subunit, configured to call an instant messaging MCP server according to the pipeline process; a pushing subunit, configured to push the MR address to a communication address of the person in charge by using tool calling of the instant messaging MCP server; and a second processing subunit, configured to return an acceptance notification message of the MR address to the agent by using notification of the code management MCP server after a pass message is returned at the communication address.
[0018] Further, the calling unit comprises: a third determination subunit configured to determine that the agent obtains an acceptance notification message of the MR address returned by the code management MCP server; a fourth calling subunit configured to call an application packaging and publishing pipeline MCP server according to the pipeline process; a third processing subunit configured to create a packaging and deployment pipeline through tool calling of the application packaging and publishing pipeline MCP server based on the requirement information of the task identifier, and return a pipeline address of the packaging and deployment pipeline to the agent through notification of the application packaging and publishing pipeline MCP server; a fifth calling subunit configured to call an instant messaging MCP server according to the pipeline process; a sending subunit configured to send the pipeline address to the account of the tester through tool calling of the instant messaging MCP server; and the fourth processing subunit is configured to return a pipeline execution result of the packaging and deployment pipeline to the agent through notification of the application packaging and publishing pipeline MCP server after the packaging and deployment pipeline is executed.
[0019] Further, the apparatus further comprises: a creating module configured to create a reusable workflow and a task identifier matched with the workflow before the first receiving module receives a requirement command through a dialogue box of an agent of a large language model; and a configuring module configured to configure a command template of the requirement command by using the task identifier and the trigger symbol.
[0020] According to another aspect of the embodiments of the present application, a storage medium is also provided, which comprises a stored program, and the program performs the steps described above when running.
[0021] According to another aspect of the embodiments of the present application, an electronic device is also provided, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus; the memory is used to store a computer program; and the processor is used to execute the steps in the above method by running the program stored in the memory.
[0022] The embodiments of the present application also provide a computer program product comprising instructions which, when executed on a computer, cause the computer to perform the steps of the above method.
[0023] The embodiment of the application provides a task automatic execution method and device, electronic equipment and storage medium, wherein the demand command is received through the dialogue box of the agent of the large language model, the demand command comprises a task identifier and a trigger symbol; the demand command is responded based on the trigger symbol, a plurality of model context protocol (MCP) servers are sequentially called according to the demand command; a notification message of the last MCP server is received, wherein the notification message carries a pipeline execution result of the demand command; and the pipeline execution result is output in the dialogue box, the MCP server is automatically scheduled by the agent and the corresponding pipeline task is sequentially executed, the manual participation is reduced, the technical problem of low efficiency of the related art when the pipeline task is executed by the multiple servers is solved, and the standardization degree and execution efficiency of the pipeline task are improved. BRIEF DESCRIPTION OF DRAWINGS
[0024] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and serve to explain the principles of the application, and do not limit the application. In the drawings: Figure 1 is a hardware structure block diagram of a server according to an embodiment of the application; Figure 2 is a flowchart of a task automatic execution method according to an embodiment of the application; Figure 3 is a system structure diagram of an embodiment of the application; Figure 4 is a timing diagram of automatic task execution of an agent in an embodiment of the application; Figure 5 is a structure block diagram of a task automatic execution device according to an embodiment of the application; Figure 6 is a structure diagram of an electronic equipment according to an embodiment of the application. DETAILED DESCRIPTION
[0025] In order to enable persons skilled in the art to better understand the scheme of the present application, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor should be within the protection scope of the present application. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.
[0026] It should be noted that the terms "first", "second" and the like in the description and in the claims of the present application are used to distinguish between similar objects and not necessarily for describing a specific sequential or chronological order. It is to be understood that the use of these terms herein is merely for distinguishing between the similar objects and the use of these terms in the description and the claims of the present application is not to be construed as implying a specific order unless explicitly stated. Furthermore, the terms "comprise", "comprising", "include", "including", and the like used herein are specifically intended to be construed in an inclusive sense and not in an exclusive sense unless explicitly stated. The term "or" used herein is specifically intended not to be construed in an exclusive sense unless explicitly stated.
[0027] The method provided by the embodiment of the present application can be executed in a mobile phone, a computer, a server or similar computing device. Taking the case of running on a server, Figure 1 is a hardware structure block diagram of a server of the embodiment of the present application. As shown in Figure 1 , the server can include one or more (only one is shown in Figure 1 ) processor 102 (the processor 102 can include but not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the above-mentioned server can also include a transmission device 106 for communication function and an input and output device 108. Those skilled in the art can understand that Figure 1 The structure shown is only schematic, which does not limit the structure of the above-mentioned server. For example, the server can also include more or less components than those shown in Figure 1 , or have a different configuration from Figure 1 .
[0028] The memory 104 can be used to store server programs, such as software programs of application software and modules, such as the server program corresponding to the automatic execution method of a task in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the server program stored in the memory 104, that is, implements the above-mentioned method. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, which can be connected to the server through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0029] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the server's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0030] This embodiment provides a method for automatically executing tasks. Figure 2 This is a flowchart of a method for automatically executing a task according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: S202, receive a request command through the dialog box of the agent of the large language model, wherein the request command includes a task identifier and a trigger symbol; In this embodiment, the requirement command is a custom command within the agent. Custom commands allow you to create reusable workflows and use a simple " / " prefix as a trigger symbol in the chat input box. These commands help standardize processes and improve the efficiency of common tasks within a company team. Optionally, the task identifier can be a requirement number, project number, etc.
[0031] The solution in this embodiment can be applied to scenarios such as team software development (e.g., requirement release management for agile development teams, continuous integration / continuous deployment (CI / CD) process optimization, and multi-environment deployment management), enterprise-level applications (e.g., release management for large software projects, release coordination for multi-team collaboration, and enterprise-level DevOps process automation), and cloud-native environments (e.g., release management for containerized applications, deployment coordination for microservice architecture, and automated management of cloud platform resources).
[0032] S204, respond to the demand command based on the trigger symbol, and sequentially call multiple Model Context Protocol (MCP) servers according to the demand command; An automated deployment method based on agents and the Model Context Protocol (MCP) can automate the entire process of software development projects from requirement release to deployment.
[0033] S206, Receive the notification message from the last MCP server, wherein the notification message carries the pipeline execution result of the demand command; S208, output the pipeline execution result in the dialog box.
[0034] By adopting the scheme of the embodiment, a demand command is received through a dialogue box of an agent of a large language model, the demand command includes a task identifier and a trigger symbol, the demand command is responded based on the trigger symbol, a plurality of model context protocol (MCP) servers are sequentially called according to the demand command, a notification message of a last MCP server is received, the notification message carries a pipeline execution result of the demand command, and the pipeline execution result is output in the dialogue box. The agent automatically schedules the MCP servers and sequentially executes corresponding pipeline tasks, the manual participation degree is reduced, the technical problem of low efficiency in executing a pipeline task with participation of a plurality of servers in the related art is solved, and the standardization degree and execution efficiency of the pipeline task are improved.
[0035] In one embodiment of the embodiment, sequentially calling a plurality of model context protocol (MCP) servers according to the demand command includes: analyzing the demand command, determining a pipeline process matched with the task identifier, wherein the pipeline process includes a plurality of sequentially arranged MCP servers; and sequentially calling the plurality of MCP servers according to the pipeline process, wherein the plurality of MCP servers include a project management MCP server, a code management MCP server, an instant messaging MCP server, and an application packaging and publishing pipeline MCP server.
[0036] Optionally, the project management MCP server is a PMS MCP Server (a company internal project management platform), the code management MCP server is a GitLab MCP Server (a company internal code management platform), the instant messaging MCP server is a Feishu MCP Server (a company internal instant messaging tool), and the application packaging and publishing pipeline MCP server is an Octopus MCP Server (a company internal application packaging and publishing pipeline).
[0037] An AI agent is used as an intelligent coordination center to interact with multiple external services through Tool Calling and Notifications mechanisms in a Model Context Protocol (MCP) to realize end-to-end automation of the release process. In the MCP, Tool Calling can obtain information that is not included in the training of the large language model itself, enrich the context, and operate local or remote applications to perform specific business operations. Since the data and capabilities of platforms such as code management and instant messaging servers are private, the large language model cannot obtain related data information, but the task flow requires obtaining data on these platforms for analysis and decision-making. The MCP is born to solve such problems, and Tool Calling in the MCP is used to call tools defined in the MCP server to perform related data reading and operations. Notifications in the MCP can support real-time notifications to enable the server to notify the client of changes without the client explicitly requesting.
[0038] Optionally, the demand command is “ / release PCAREQ-1234”, where “PCAREQ-1234” is a task identifier corresponding to a single number. The initiator inputs “ / release PCAREQ-1234” in the agent dialog box, and the agent starts to execute according to the process defined in the command description.
[0039] Figure 3 is a system structure diagram of an embodiment of the present application, including an agent and multiple MCP servers (PMS MCP Server, GitLab MCP Server, Feishu MCP Server, and Octopus MCP Server). The initiator initiates a task flow to the agent through a release command, and the responsible person (supervisor or process auditor) and the tester log in to the Feishu MCP Server through their respective accounts.
[0040] In one example, sequentially calling multiple MCP servers according to the pipeline process includes: calling a project management MCP server according to the pipeline process; and obtaining demand single information matched with the task identifier by using tool calling of the project management MCP server, wherein the demand single information includes: a code branch, a responsible person, and a tester.
[0041] The information of the PCAREQ-1234 demand single is obtained through tool calling of the PMS MCP server, including a code branch, a responsible person, and a tester.
[0042] In one example, sequentially calling the plurality of MCP servers according to the pipeline procedure comprises: determining that the agent acquires the code branch returned by the project management MCP server; calling the code management MCP server according to the pipeline procedure; initiating a merge request MR corresponding to the code branch by using the tool calling of the code management MCP server, and returning the MR address of the merge request MR to the agent by the notification of the code management MCP server.
[0043] The agent gets the code branch information, initiates the MR corresponding to the code branch by using the tool calling of the gitlab MCP server, and returns the MR address. The merge request address is sent to the team leader or the person responsible for code review for manual confirmation of the code access application.
[0044] In one example, sequentially calling the plurality of MCP servers according to the pipeline procedure comprises: determining that the agent acquires the code branch returned by the project management MCP server; calling the code management MCP server according to the pipeline procedure; initiating a merge request MR corresponding to the code branch by using the tool calling of the code management MCP server, and returning the MR address of the merge request MR to the agent by the notification of the code management MCP server.
[0045] After the agent acquires the MR address, the MR address is pushed to the responsible person by using the tool calling of the feishu MCP server. After the responsible person reviews the code and passes, the agent receives a notification of the feishu gitlab MCP server.
[0046] In one example, sequentially invoking the plurality of MCP servers according to the pipeline procedure includes: determining that the agent obtains an acceptance notification message of the MR address returned by the code management MCP server; invoking an application packaging and publishing pipeline MCP server according to the pipeline procedure; creating a packaging and deployment pipeline through tool calling of the application packaging and publishing pipeline MCP server based on requirement information of the task identifier, and returning a pipeline address of the packaging and deployment pipeline to the agent through notification of the application packaging and publishing pipeline MCP server; invoking an instant messaging MCP server according to the pipeline procedure; sending the pipeline address to an account of a tester through tool calling of the instant messaging MCP server; and returning a pipeline execution result of the packaging and deployment pipeline to the agent through notification of the application packaging and publishing pipeline MCP server after the packaging and deployment pipeline is executed.
[0047] Optionally, the requirement information includes pms order number, person in charge, acceptance person, online reason and the like, which are necessary parameters for creating a deployment pipeline and pushing to relevant personnel in the next step.
[0048] After the agent receives the notification of the gitlab MCP server, the agent initiates a packaging and deployment pipeline based on context content (from the beginning of the process initiation, the large language model calculates reasoning and obtains data information through various MCPs), and pushes the returned pipeline address to the tester through tool calling of the feishu MCP server for tracking, verification and backtesting. The tester tracks the pipeline progress, and the pipeline execution result is notified to the agent through notification of the octopus MCP server. The agent informs the initiator through the dialogue box.
[0049] Optionally, before receiving the requirement command through the dialogue box of the agent of the large language model, the method further includes: creating a reusable workflow, and creating a task identifier matched with the workflow; and configuring a command template of the requirement command by using the task identifier and the trigger symbol.
[0050] A release command (a requirement command) is defined in an agent (for example, a cursor) supporting the command, and a parameter in the command is a requirement number (for example, PCAREQ-1234). The release command uses pure Markdown to write content, and the content describes a task to be performed by the command. The release command is defined first to create a reusable workflow, and a " / " is used as a trigger symbol, and only a simple " / " prefix needs to be input in a chat input box to trigger. These commands help to standardize team processes and improve the efficiency of common tasks. One command corresponds to one Markdown text, and the content of the text describes a process corresponding to the command for reading by the large model.
[0051] To solve the technical problems of high artificial participation, low efficiency and easy to make mistakes in the software development release process in the prior art, a large language model environment is provided, an automatic release scheme is realized based on an agent and an MCP, an automatic release method and device based on an agent and an MCP are provided, the method triggers an automatic release process by defining a Command of the agent, the process is coordinated and called by the agent to call multiple MCP servers (a Feishu MCP server, a GitLab MCP server, a PMS MCP server and an Octopus MCP server), and whole-process automatic management from the command issuing to online in a production environment is realized. AI agents are used as intelligent coordination centers, ToolCalling and Notifications mechanisms in a model context protocol (MCP) are used to interact with multiple external services, and end-to-end automation of the release process is realized.
[0052] Figure 4 is a timing diagram of automatic execution of tasks by the agent in the embodiment of the application, a release command is defined in an agent (for example, a cursor) supporting the command, and a parameter in the command is a requirement number (for example, PCAREQ-1234). The release command uses pure Markdown to write content, and the content describes a task to be performed by the command. An online initiator inputs " / release PCAREQ-1234" in an agent dialog box, and the agent starts to automatically execute according to a process defined in the command description: PCAREQ-1234 requirement information is obtained through ToolCalling of the PMS MCP server, including a code branch, a person in charge and a test acceptance person; The agent obtains the code branch information, initiates a merge request of the corresponding code branch by using tool calling of the gitlab mcp server, and returns an address of the MR; After the agent obtains the address of the MR, the agent pushes the address of the MR to the person in charge by using tool calling of the feishu mcp server. After the person in charge reviews the code and passes, the agent receives a notification of the feishu gitlab mcp server; After the agent receives the notification of the gitlab mcp server, the agent initiates a packaging and deployment pipeline based on the context content by calling the octopus mcp server, and pushes the returned pipeline address to the tester by using tool calling of the feishu mcp server for tracking, verification, and backtesting; The tester tracks the progress of the pipeline, and the execution result of the pipeline is notified to the agent by the notification of the octopus mcp server. The agent informs the initiator through a dialog box.
[0053] The scheme of the embodiment can improve efficiency, reduce manual operation by 90%, reduce error rate by 95%, improve quality, standardize the process, ensure information consistency, ensure the accuracy and timeliness of information transmission at each stage, realize traceability, optimize resources, release the time of developers, focus on core development work, utilize system resources, and reduce maintenance costs.
[0054] Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and necessary general hardware platforms, and of course, it can also be realized by hardware, but in many cases, the former is a better embodiment. Based on this understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disc) and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device) to execute the method described in each embodiment of the present application.
[0055] This embodiment also provides an automatic task execution device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0056] Figure 5 This is a structural block diagram of an automatic task execution device according to an embodiment of the present invention, such as... Figure 5 As shown, the device includes: a first receiving module 50, a calling module 52, a second receiving module 54, and an output module 56, wherein... The first receiving module 50 is used to receive a request command through the dialog box of the agent of the large language model, wherein the request command includes a task identifier and a trigger symbol; Calling module 52 is used to respond to the demand command based on the trigger symbol, and sequentially call multiple Model Context Protocol (MCP) servers according to the demand command; The second receiving module 54 is used to receive a notification message from the last MCP server, wherein the notification message carries the pipeline execution result of the demand command; Output module 56 is used to output the pipeline execution results in the dialog box.
[0057] Furthermore, the invocation module includes: a determination unit, used to parse the requirement command and determine the pipeline process matching the task identifier, wherein the pipeline process includes multiple MCP servers arranged in sequence; and an invocation unit, used to invoke multiple MCP servers sequentially according to the pipeline process, wherein the multiple MCP servers include a project management MCP server, a code management MCP server, an instant messaging MCP server, and an application packaging and release pipeline MCP server.
[0058] Furthermore, the calling unit includes: a first calling subunit, used to call the project management MCP server according to the pipeline process; and a first obtaining subunit, used to obtain requirement information matching the task identifier using the tool calling of the project management MCP server, wherein the requirement information includes: code branch, responsible person, and tester.
[0059] Further, the calling unit comprises: a first determining sub-unit, configured to determine that the agent acquires a code branch returned by the project management MCP server; a second calling sub-unit, configured to call a code management MCP server according to the pipeline process; a first processing sub-unit, configured to initiate a merge request MR corresponding to the code branch by using tool calling of the code management MCP server, and return the MR address of the merge request MR to the agent by using notification of the code management MCP server.
[0060] Further, the calling unit comprises: a second determining sub-unit, configured to determine that the agent acquires the MR address returned by the code management MCP server; a third calling sub-unit, configured to call an instant messaging MCP server according to the pipeline process; a pushing sub-unit, configured to push the MR address to a communication address of a responsible person by using tool calling of the instant messaging MCP server; and a second processing sub-unit, configured to return an acceptance notification message of the MR address to the agent by using notification of the code management MCP server after a pass message is returned at the communication address.
[0061] Further, the calling unit comprises: a third determining sub-unit, configured to determine that the agent acquires the acceptance notification message of the MR address returned by the code management MCP server; a fourth calling sub-unit, configured to call an application packaging and publishing pipeline MCP server according to the pipeline process; a third processing sub-unit, configured to create a packaging and deployment pipeline by using tool calling of the application packaging and publishing pipeline MCP server based on the requirement information of the task identifier, and return a pipeline address of the packaging and deployment pipeline to the agent by using notification of the application packaging and publishing pipeline MCP server; a fifth calling sub-unit, configured to call an instant messaging MCP server according to the pipeline process; a sending sub-unit, configured to send the pipeline address to an account of a tester by using tool calling of the instant messaging MCP server; and a fourth processing sub-unit, configured to return a pipeline execution result of the packaging and deployment pipeline to the agent by using notification of the application packaging and publishing pipeline MCP server after the packaging and deployment pipeline is executed.
[0062] Furthermore, the apparatus further includes: a creation module, configured to create a reusable workflow and a task identifier matching the workflow before the first receiving module receives the demand command through the dialog box of the agent of the large language model; and a configuration module, configured to configure the command template of the demand command using the task identifier and the trigger symbol.
[0063] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0064] This application also provides an electronic device. Figure 6 This is a structural diagram of an electronic device according to an embodiment of the present invention, such as... Figure 6 As shown, the system includes a processor 61, a communication interface 62, a memory 63, and a communication bus 64. The processor 61, communication interface 62, and memory 63 communicate with each other via the communication bus 64. The memory 63 stores computer programs. When the processor 61 executes the program stored in the memory 63, it performs the following steps: receiving a request command through the dialog box of the large language model agent, wherein the request command includes a task identifier and a trigger symbol; responding to the request command based on the trigger symbol; sequentially calling multiple Model Context Protocol (MCP) servers according to the request command; receiving a notification message from the last MCP server, wherein the notification message carries the pipeline execution result of the request command; and outputting the pipeline execution result in the dialog box.
[0065] Furthermore, sequentially invoking multiple Model Context Protocol (MCP) servers according to the requirement command includes: parsing the requirement command and determining the pipeline process matching the task identifier, wherein the pipeline process includes multiple MCP servers arranged in sequence; and sequentially invoking multiple MCP servers according to the pipeline process, wherein the multiple MCP servers include a project management MCP server, a code management MCP server, an instant messaging MCP server, and an application packaging and release pipeline MCP server.
[0066] Furthermore, sequentially calling multiple MCP servers according to the pipeline process includes: calling the project management MCP server according to the pipeline process; using the tool calling of the project management MCP server to obtain requirement information matching the task identifier, wherein the requirement information includes: code branch, responsible person, and tester.
[0067] Further, sequentially calling the plurality of MCP servers according to the pipeline process comprises: determining that the agent obtains a code branch returned by the project management MCP server; calling a code management MCP server according to the pipeline process; initiating a merge request MR corresponding to the code branch by tool calling of the code management MCP server, and returning the MR address of the merge request MR to the agent by notification of the code management MCP server.
[0068] Further, sequentially calling the plurality of MCP servers according to the pipeline process comprises: determining that the agent obtains a code branch returned by the project management MCP server; calling a code management MCP server according to the pipeline process; initiating a merge request MR corresponding to the code branch by tool calling of the code management MCP server, and returning the MR address of the merge request MR to the agent by notification of the code management MCP server.
[0069] Further, sequentially calling the plurality of MCP servers according to the pipeline process comprises: determining that the agent obtains a code branch returned by the project management MCP server; calling a code management MCP server according to the pipeline process; initiating a merge request MR corresponding to the code branch by tool calling of the code management MCP server, and returning the MR address of the merge request MR to the agent by notification of the code management MCP server.
[0070] Further, before receiving the requirement command through the dialog box of the agent of the large language model, the method further comprises: creating a reusable workflow, and creating a task identifier matched with the workflow; and configuring a command template of the requirement command by using the task identifier and the trigger symbol.
[0071] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or only one type of bus.
[0072] The communication interface is used for communication between the terminal and other devices.
[0073] The memory can include a Random Access Memory (RAM) and can also include a non-volatile memory, such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the processor.
[0074] The processor mentioned above can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc. It can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0075] In another embodiment provided in the present application, a computer readable storage medium is also provided, which stores instructions, and when the instructions run on a computer, the computer executes the automatic execution method of the task in any of the above embodiments.
[0076] In another embodiment provided in the present application, a computer program product containing instructions is also provided, and when the instructions run on a computer, the computer executes the automatic execution method of the task in any of the above embodiments.
[0077] In the embodiments described above, all or some of the steps can be implemented by software, hardware, firmware or any combination thereof. When implemented in software, all or some of the steps can be stored in or performed in relation to one or more computer program products and can be implemented as one or more computer programs. The computer program product can be a computer program storage medium readable by a computer and encoding a computer program of instructions for executing modules. The computer program product can be a computer readable storage medium. The computer readable storage medium can be a volatile (transitory) or non-volatile storage medium, or some combination thereof. The computer readable storage medium can be tangible or in transitory propagation modes such as the programs being downloaded from a website, being uploaded from a computer, being stored on a computer, being transmitted from a computer to another computer via a wired (for example, coaxial cable, fiber optics, digital subscriber line (DSL), etc.) or wireless (for example, infrared, radio, microwave, etc.) connection, or being stored on a computer network, etc.
[0078] The specific embodiments described herein are illustrative and not intended to be limiting. Other embodiments will readily occur to those skilled in the art. Modifications may be made to such embodiments without departing from the spirit and scope of the application. Accordingly, it will be appreciated that the application will be limited only by the claims and equivalents thereof.
[0079] The preceding description is merely exemplary in nature of the present application, and is not intended to limit the present application throughout the scope of the claims, which are intended to be construed as limiting the present application.
Claims
1. A method for automatically executing a task, characterized in that, include: The agent of the large language model receives the request command through its dialog box, wherein the request command includes a task identifier and a trigger symbol; Based on the trigger symbol, respond to the demand command, and sequentially call multiple Model Context Protocol (MCP) servers according to the demand command; Receive a notification message from the last MCP server, wherein the notification message carries the pipeline execution result of the demand command; The pipeline execution result is output in the dialog box.
2. The method as described in claim 1, characterized in that, According to the aforementioned requirement command, multiple Model Context Protocol (MCP) servers are invoked sequentially, including: Parse the demand command to determine the pipeline process that matches the task identifier, wherein the pipeline process includes multiple MCP servers arranged in sequence; The pipeline process sequentially calls multiple MCP servers, including a project management MCP server, a code management MCP server, an instant messaging MCP server, and an application packaging and deployment pipeline MCP server.
3. The method as described in claim 2, characterized in that, The pipeline process involves sequentially calling multiple MCP servers, including: Call the project management MCP server according to the described pipeline process; The tool calling function of the project management MCP server is used to obtain the requirement form information that matches the task identifier. The requirement form information includes: code branch, responsible person, and tester.
4. The method as described in claim 2, characterized in that, The pipeline process involves sequentially calling multiple MCP servers, including: Determine the code branch returned by the project management MCP server obtained by the agent; The MCP server is managed by calling the code according to the described pipeline process. The code management MCP server initiates a merge request (MR) for the corresponding code branch using tool calling, and returns the MR address of the merge request MR to the agent through the notification of the code management MCP server.
5. The method as described in claim 2, characterized in that, The pipeline process involves sequentially calling multiple MCP servers, including: Determine the MR address returned by the code management MCP server obtained by the agent; Call the instant messaging MCP server according to the described pipeline process; The MR address is pushed to the communication address of the responsible person using the tool calling function of the instant messaging MCP server; After the communication address returns an approval message, the agent receives an acceptance notification message for the MR address via the notification of the code management MCP server.
6. The method as described in claim 2, characterized in that, The pipeline process involves sequentially calling multiple MCP servers, including: Determine the acceptance notification message received by the agent for the MR address returned by the Code Management MCP server; The application packaging and deployment pipeline MCP server is invoked according to the described pipeline process. Based on the requirement information of the task identifier, a packaging and deployment pipeline is created through the toolcalling of the application packaging and deployment pipeline MCP server, and the pipeline address of the packaging and deployment pipeline is returned to the agent through the notification of the application packaging and deployment pipeline MCP server. Call the instant messaging MCP server according to the described pipeline process; The pipeline address is sent to the tester's account via the tool calling function of the instant messaging MCP server. After the packaging and deployment pipeline is completed, the pipeline execution result is returned to the agent through the notification of the application packaging and deployment pipeline MCP server.
7. The method as described in claim 1, characterized in that, The method further includes, prior to receiving the demand command via the dialog box of the agent of the large language model: Create reusable workflows and create task identifiers that match the workflows; The command template for the required command is configured using the task identifier and the trigger symbol.
8. An automatic task execution device, characterized in that, include: The first receiving module is used to receive a request command through the dialog box of the agent of the large language model, wherein the request command includes a task identifier and a trigger symbol; The calling module is used to respond to the demand command based on the trigger symbol, and sequentially call multiple Model Context Protocol (MCP) servers according to the demand command. The second receiving module is used to receive the notification message from the last MCP server, wherein the notification message carries the pipeline execution result of the demand command; An output module is used to output the pipeline execution results in the dialog box.
9. An electronic device, characterized in that, The electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the automatic execution method of the task as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, implements the steps of the automatic execution method for the task as described in any one of claims 1 to 7.