Data processing method, system and device of intelligent agent and storage medium
By providing long-term storage of task session data within the task session, the problem of difficulty in task data sharing and team collaboration in existing technologies is solved. This enables long-term storage and cross-session sharing of task data, lowers the barrier to entry, and improves team collaboration efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU ALIBABA INT INTERNET IND CO LTD
- Filing Date
- 2026-03-31
- Publication Date
- 2026-07-21
AI Technical Summary
Existing technologies for AI agents face challenges such as high barriers to entry in using task tools, difficulties in team collaboration, and a lack of a unified service platform, which limit the sharing of task data.
This paper provides a data processing method for intelligent agents in a sandbox environment and task sessions. It enables long-term storage of task session data, allowing for the sharing of task data and cross-session data sharing.
It enables long-term storage of task data and cross-session data sharing, lowering the barrier to entry and improving team collaboration efficiency and knowledge transfer.
Smart Images

Figure CN122431746A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of software development, specifically to a data processing method, electronic device, and storage medium for an intelligent agent. This application also relates to an intelligent agent service system. Background Technology
[0002] With the development of artificial intelligence technology, various AI agents are being deployed to handle a wide range of complex tasks. Agents based on large language models are increasingly being used in various task tools, such as command-line tools. This provides a new model for agent extension, offering tool support not only for developers but also enabling non-technical personnel to complete various tasks through natural language, such as writing articles and designing products.
[0003] However, the tools for deploying AI agents in related technologies are generally designed for technical personnel and run locally on individuals, which presents problems such as high barriers to entry, difficulties in team collaboration, and the lack of a unified service platform that limits task data sharing.
[0004] Therefore, how to realize the service-oriented nature of command-line capabilities based on AI agents is a problem that needs to be solved.
[0005] The information disclosed in the background section is only intended to enhance the understanding of the background of this application, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] This application provides a data processing method, apparatus, electronic device, and computer-readable storage medium for intelligent agents, which can provide a service-oriented solution for realizing command-line capabilities based on AI intelligent agents, overcoming the shortcomings of limited task data sharing in related technologies. The specific solution is as follows: In a first aspect, this application provides a data processing method for an intelligent agent, the method comprising: receiving a task request sent by an intelligent agent client corresponding to a target user; the task request being generated based on a requirement description provided by the target user in natural language; allocating a target sandbox node from a sandbox cluster according to the task request, and establishing a task session between the target sandbox node and the intelligent agent client; wherein the target sandbox node is mounted with a workspace for storing relevant data of the task session, the workspace being a long-term storage space with a lifespan longer than the task session; receiving commands sent by the intelligent agent client and returning command execution results through the task session, thereby realizing the execution of the project task corresponding to the task request through the task session; and in response to determining that the task session has terminated, saving the relevant data of the task session to the workspace.
[0007] Secondly, this application provides an intelligent agent service system, the system comprising: Thirdly, this application also provides another data processing method for intelligent agents, applied to an intelligent agent client. The method includes: receiving natural language-based demand description information input locally by a target user, and generating a task request based on the demand description information; sending the task request to a cloud device; wherein the cloud device executes the data processing method for intelligent agents described in the first aspect to establish a task session corresponding to the intelligent agent client; sending commands to the cloud device through the task session and receiving command execution results returned by the cloud device, so as to realize the execution of the project task corresponding to the task request through the task session; wherein, after the task session terminates, the relevant data of the task session is saved to the workspace allocated by the cloud device.
[0008] Fourthly, this application also provides a data processing apparatus for an intelligent agent, the apparatus comprising: Fifthly, this application also provides an electronic device, comprising: a processor, a memory, and computer program instructions stored in the memory and executable on the processor; wherein the processor executes the computer program instructions to implement the method as described in the first aspect.
[0009] In a sixth aspect, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect.
[0010] In a seventh aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.
[0011] Compared with the prior art, this application has the following advantages: This application provides a data processing method, apparatus, electronic device, and computer-readable storage medium for intelligent agents. The method includes: receiving a task request sent by an intelligent agent client corresponding to a target user; the task request being generated based on a requirement description provided by the target user using natural language; allocating a target sandbox node from a sandbox cluster according to the task request, and establishing a task session between the target sandbox node and the intelligent agent client; wherein the target sandbox node is mounted with a workspace for storing relevant data of the task session, and the workspace is a long-term storage space with a lifespan longer than the task session; receiving commands sent by the intelligent agent client and returning command execution results through the task session to execute the project task corresponding to the task request through the task session; and saving the relevant data of the task session to the workspace in response to determining that the task session has terminated. By mounting a long-term storage space on the target sandbox node, long-term memory of task session data can be achieved, and the session data can continue to be stored even after the session ends, thereby facilitating the solution of the task data sharing problem. Furthermore, the long-term stored task session-related data, especially the task result data provided by the target sandbox node, enables sharing of task processing data within and between teams. By providing extended management and resource sharing mechanisms, it facilitates collaboration and knowledge transfer among teams.
[0012] This application embodiment also provides an intelligent agent service system, including a central server and a sandbox cluster; the central server is used to receive task requests sent by intelligent agent clients corresponding to target users; the task requests are generated based on the demand description information provided by the target user in natural language; target sandbox nodes are allocated from the sandbox cluster according to the task requests, and task execution instructions are sent to the target sandbox nodes; the sandbox cluster includes one or more sandbox nodes, and the sandbox nodes include the target sandbox node; wherein, in response to the task execution instructions, the target sandbox node establishes a task session between the target sandbox node and the intelligent agent client, and uses the task session to receive commands sent by the intelligent agent client and return command execution results, so as to execute the project task corresponding to the task request through the task session; in response to determining that the task session is terminated, the relevant data of the task session is saved to the workspace; wherein, the sandbox nodes are mounted with the workspace for storing the relevant data of the task session, and the workspace is a long-term storage space with a lifespan longer than the task session. By providing the infrastructure of a cloud-based service system, the barrier to entry is lowered, enabling non-technical personnel to use task tools (such as CLI tools) without local environment configuration. This service system offers unified extension management and resource sharing mechanisms, facilitating collaboration and knowledge transfer among teams. Furthermore, it can be deployed as an online service platform, integrating task tools into online business processes and enhancing business integration capabilities. Nearly half of the system offers multi-tenant personalized configuration and security isolation mechanisms, enabling private sandbox execution environments through sandbox clusters, cross-session persistent storage by mounting dedicated long-term workspaces within sandboxes, and shielding various command-line backend protocols through intelligent agent client protocol interfaces. In addition, the system implements dynamic resource scheduling and automatic scaling cluster management. Attached Figure Description
[0013] Figure 1 This is a schematic diagram illustrating an application scenario of the data processing method for an intelligent agent provided in an embodiment of this application.
[0014] Figure 2 This is a flowchart of a data processing method for an intelligent agent provided in the first embodiment of this application.
[0015] Figure 3 This is a schematic diagram illustrating an example of the calling flow of a layered architecture in a data processing method for an intelligent agent provided in the first embodiment of this application.
[0016] Figure 4 This is a schematic diagram of an example of the automatic scaling process in a data processing method for an intelligent agent provided in the first embodiment of this application.
[0017] Figure 5 This is a schematic diagram of an intelligent agent service system provided in the second embodiment of this application.
[0018] Figure 6 This is a flowchart of another data processing method for an intelligent agent provided in the third embodiment of this application.
[0019] Figure 7 This is a schematic diagram of a data processing device for an intelligent agent provided in the fourth embodiment of this application.
[0020] Figure 8 This is a structural block diagram of the electronic device provided in this application. Detailed Implementation
[0021] To enable those skilled in the art to better understand the technical solutions of this application, the application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. However, this application can be implemented in many other ways different from those described below. Therefore, based on the embodiments provided in this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0022] It should be noted that the terms "first," "second," etc., in the claims, specification, and drawings of this application are used to distinguish similar objects and are not used to describe a specific order or sequence. Such data are interchangeable where appropriate so that the embodiments of this application described herein can be implemented in a sequence other than that shown or described herein. Furthermore, the terms "comprising," "having," and their variations are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to these processes, methods, products, or apparatuses.
[0023] To facilitate understanding of the embodiments of this application, the relevant concepts and application background of the embodiments are given.
[0024] Command Line Interface (CLI): A user interface that allows interaction with computer programs through text commands. In this manual, "command line" or "CLI" refers to the interaction between the user and the computer system through the command line interface.
[0025] Agent Client Protocol (ACP): A standard protocol for communication between agents and agent clients.
[0026] A sandbox is an isolated execution environment used to safely run programs or commands.
[0027] Network Attached Storage (NAS): A dedicated data storage server that provides file-level data access over a network.
[0028] OverlayFS is a union file system used to stack multiple file system directories together to form a unified file view.
[0029] Model Context Protocol (MCP): A standardized interface for defining how models interact with their environment.
[0030] A session refers to an interaction process between a user and a system, which typically has a certain lifecycle. Establishing a session means initiating an interaction process.
[0031] Workspace: refers to the persistent storage area allocated to users or tenants for storing and managing files.
[0032] Skills: These refer to predefined functional modules in command-line tools that can be invoked via natural language commands.
[0033] With the development of artificial intelligence technology, task tools based on large language models are an extension of task tools that deploy AI agents (or simply agents). This model is applicable to command-line tools, resulting in command-line tools that deploy AI agents, which are called command-line agents. Command-line agents provide developers with powerful tool support, allowing non-technical personnel to easily complete various tasks, such as writing articles and designing products, using natural language.
[0034] However, task tools for deploying AI agents in related technologies are generally designed for technical personnel and run locally on an individual's device, resulting in high barriers to entry, difficulties in team collaboration, and a lack of a unified service platform that limits task data sharing. To address these issues, this application provides a data processing method for AI agents and an AI agent service system, offering a solution for cloud-based AI agent infrastructure and standardized interfaces for task tools, thereby improving team collaboration capabilities and user experience. In this embodiment, "cloud-based" refers to providing command-line capabilities in the form of cloud-based services.
[0035] Please refer to Figure 1The figure illustrates an application scenario of the data processing method for the intelligent agent, but the method is not limited to this. The application scenario shown in the figure uses a command-line intelligent agent as an example, including: several command-line intelligent agent clients 101 and a command-line intelligent agent service platform 102. The command-line intelligent agent clients 101 can interact with users through a command-line interface and receive text input commands from users. The command-line intelligent agent clients 101 access the command-line intelligent agent service platform 102 through a local area network (LAN), wide area network (WAN), internet connection, or other types of data network. Through this platform, they call a large language model to implement the method provided in this application embodiment, thereby providing a solution for executing user tasks in a task session manner. The command-line intelligent agent clients can correspond to different tenants, including but not limited to applications or applets that interact with the command-line intelligent agent service platform, or web pages of applications, and can also refer to client devices running the aforementioned applications. The client devices include, but are not limited to, any form of intelligent device such as desktop computers, mobile phones, tablets, laptops, and smart TVs. In this specification, "client," "agent client," and "command-line agent client" can all refer to "command-line agent client," and "platform," "service platform," and "command-line agent service platform" can all refer to "command-line agent service platform." The command-line agent service platform 102 includes, but is not limited to, the server-side software corresponding to the various forms of applications described above, or the server device or server cluster running the server-side software. It is understood that this application scenario is an illustrative embodiment, used only to help understand the method and does not constitute a limitation on the method. For example, the method can also be applied to other agent scenarios, such as browser agents, conversational agents, and business task agents.
[0036] It should be noted that the information disclosed above is only for the purpose of helping to understand this application, and does not mean that it constitutes prior art known to those skilled in the art, nor does it constitute a specific limitation on the methods provided in the embodiments of this application.
[0037] Example 1 The first embodiment of this application provides a data processing method for an intelligent agent, which is described below in conjunction with... Figures 2 to 4 The data processing method for the aforementioned intelligent agent is described. Figure 2 The data processing method for the intelligent agent shown includes steps S201 to S204.
[0038] Step S201: Receive a task request sent by the intelligent agent client corresponding to the target user; the task request is generated based on the demand description information provided by the target user in natural language.
[0039] Specifically, the data processing method for the intelligent agent can be deployed on a cloud server, such as an online intelligent agent service platform. This allows the configuration and use of task tools to be extended beyond the user's local computer, enabling command-line data sharing within the team through the service platform. This improves collaboration efficiency and facilitates the integration of command-line tools into business processes, thereby enhancing product development efficiency. The command-line intelligent agent service platform is an intelligent agent service platform that provides command-line tool services based on AI models.
[0040] Specifically, the target user inputs a natural language-based requirement description through the interactive interface provided by the intelligent agent client. The intelligent agent client then generates a task request based on this requirement description. The task request carries user information and task information. The user information includes at least the tenant information to which the target user belongs. The task information is information about the project task generated based on the requirement description, and may include specific operations or task objectives for the project task to be completed. For example, the project task may be a command-line task. A command-line task refers to a specific task that needs to be completed through a command-line interface; for example, it could be executing automated operations or scripts via the command line, or executing management commands (such as file management, network configuration, system maintenance, writing or debugging code, automatically building or testing runnable programs, etc.). The task request may carry information about the command-line task based on natural language.
[0041] The agent client can send the task request by calling the API service interface provided by the agent service platform. The task request can be a task initiation request to create a project task, a task execution request to run an application or plugin to operate on a project task, or a task editing request to edit a project task, etc., without specific limitations. The project task can specifically be a command-line task, such as a software project task. After the project task is created, it can be accessed through its corresponding ID, allowing it to be added to different agent clients. Specifically, the agent client can encapsulate the requirement description information into a standardized "Task" object and send it through the tasks / send or tasks / sendSubscribe interfaces. This task can include a unique ID, input parameters, context information, etc., clearly indicating the computational task to be performed.
[0042] The agent client sends the task request, triggering the establishment of a task session. A task session can be an interactive session initiated in response to the task request. Furthermore, this task session has state transitions, such as task submission and initialization states: the agent client sends a request (including intent and parameters), the agent confirms receipt, and the session state changes to "submitted" or "processing." Alternatively, when the agent encounters a problem it cannot solve independently or requires user confirmation or additional information, the session state switches to "input required," the task is paused, and it awaits commands from the agent client. Furthermore, this task session transmits data using command execution and streaming feedback. For example, the agent's real-time thought process, intermediate results, or text content can be streamed and displayed on the corresponding agent client. Taking a command-line agent client as an example, the command-line agent client sends a task request, triggering the establishment of a command-line session between the client and the command-line agent. This command-line session executes the commands related to the task request, and the results are displayed on the client via streaming feedback. Finally, when the task is completed, the agent delivers the final output, ending the current task session.
[0043] In this embodiment, before receiving the task request, the process further includes configuring the tenant. Specifically, this includes receiving and saving tenant-specific configuration information for each tenant. This tenant-specific configuration information includes resource pool information, an application programming interface (API) key, and extended configuration information. The resource pool information includes storage resource information for configuring the corresponding tenant's workspace. The API key is credential information used by the agent client to access the cloud-based command-line AI model service. The extended configuration information includes tenant-specific extended information for configuring the plugins and extended functions that the corresponding tenant needs to load. This allows for recording the personalized configuration of each tenant, providing customized resources and services to different tenants, ensuring secure isolation between tenants, and protecting privacy. The AI model can be a large model with natural language understanding capabilities. Step S202: Allocate a target sandbox node from the sandbox cluster according to the task request, and establish a task session between the target sandbox node and the agent client; wherein, the target sandbox node is mounted with a workspace for storing relevant data of the task session, and the workspace is a long-term storage space with a lifespan longer than the task session.
[0044] Specifically, the sandbox cluster refers to a collection of multiple sandbox instances used to run and manage applications or services in an isolated environment. The target sandbox node is a sandbox instance allocated in response to the task request.
[0045] This step involves allocating sandbox resources based on task requests. Specifically, task requests can be distributed from the pre-warmed container pool to different sandbox nodes. Sandbox cluster management is based on the `bizType` dimension of the sandbox cluster configuration. The `bizType` dimension refers to classification parameters used in the sandbox environment to identify and differentiate different business types or scenarios. The value of the `biz_type` field (such as a code or number) defines a specific business identity (i.e., business ID) or processing rule, thereby allocating corresponding sandbox nodes based on the business ID or processing rule matched to the task request. This ensures that each session has an independent sandbox environment.
[0046] The process involves initializing the sandbox environment for the target sandbox node after the task request is assigned, mounting the workspace corresponding to the tenant of the target user or the workspace corresponding to the command-line task carried in the task request, and mounting the specific extended functions corresponding to that tenant. A tenant can correspond to a dedicated workspace, or a command-line task can also correspond to a dedicated workspace; a dedicated workspace can refer to dedicated storage space. Further, the workspace persistently stores relevant data from task sessions initiated by different intelligent agent clients, which correspond to the tenant of the target user; or, the workspace is dedicated to persistently storing relevant data for the project tasks. This persistent storage includes continued storage after the task session ends, forming long-term memory to facilitate cross-session data saving and knowledge sharing within or between teams. The workspace can be a storage workspace allocated based on a Network Attached Device (NAS). Specifically, an independent long-term storage space can be created on the NAS through the workspace service module, with a lifespan longer than the lifespan of a task session, thus allowing for the reuse of work states across sessions.
[0047] This embodiment also includes: according to the extended configuration information of the tenant to which the target user belongs, instructing the target sandbox node to load the corresponding plugin, and the plugin loading mechanism can save plugin-related information as a file on the workspace.
[0048] In a preferred embodiment, the workspace is mounted in read-only mode on the target sandbox node via an OverlayFS union file system, enabling rapid loading of shared content from a team. Therefore, the sandbox node does not directly store task session data on the NAS; instead, it processes the data and sends it to a module or server controlling the write service. This module or server retrieves the task session data from the target sandbox node and controls its writing to the workspace. This ensures the security of the sandbox environment and isolation between sandboxes. Allocating an independent sandbox environment to each session and implementing file system isolation via OverlayFS guarantees the security and independence of the execution environment.
[0049] This step includes starting the task execution process and establishing a task session to provide an interaction channel between the target user and the large language model. Specifically, before establishing the task session between the target sandbox node and the agent client, the target sandbox node is instructed to mount the workspace and start the task execution process. The task execution process is used to execute the logic and resource operations of the project task corresponding to the task request. The task session is established based on a session interface in the Agent Client Protocol (ACP) format. Using a standardized protocol interface for interaction with the agent client facilitates shielding different command-line backend protocols (such as SSH, Telnet, etc.), thereby supporting multiple command-line backends. Specifically, each sandbox node in the sandbox cluster uses the same or different command-line protocols; each sandbox node includes a task execution process and a command-line gateway; the task execution process executes the commands sent by the agent client and obtains result data in the corresponding command-line protocol format; the command-line gateway converts the result data into data in the agent client protocol format as the command execution result returned to the agent client. The command-line gateway running in the sandbox node can shield different protocols of the CLI backend and exchange data with the outside world using a unified protocol format such as ACP.
[0050] Establishing a task session includes a session initialization process to initiate a task session. The agent client triggers the task processing flow by sending an initial message (such as a user query). Furthermore, project tasks (such as command-line tasks) can be processed in stages (such as calling tools, generating code diagrams, etc.), and progress and intermediate results are fed back to the client via streaming (SSE). Upon completion of the project task, the final execution result (such as generated files or structured data) is returned to the client as an output, and the final execution result can also be saved to the workspace.
[0051] Furthermore, the edge computing gateway accessed by the agent client can provide a unified API interface (such as an ACP-formatted session interface), load balancing, and long-lived network connections for the agent client, encapsulating the underlying implementation. The long-lived network connection function provides a data transmission channel over which ACP-formatted messages are transmitted, establishing ACP-formatted sessions; the load balancing function enables task requests to be evenly distributed to each node of the sandbox cluster.
[0052] This embodiment also includes: sandbox cluster preheating, which reduces cold start latency by pre-starting and initializing sandbox instances to adapt to dynamic resource scheduling scenarios. For example, container pools for commonly used languages (such as Python, Node.js, etc.) can be pre-created, and instances can be allocated directly from the container pool when a task request is received. Alternatively, instances can be retained for a period of time after a task request is executed, allowing subsequent requests to reuse the keep-alive instances for hot starts. Furthermore, a fixed number of persistent instances can be configured and created in advance through timed or metric-based strategies.
[0053] Step S203: Receive commands sent by the intelligent agent client and return command execution results through the task session, so as to execute the project task corresponding to the task request through the task session.
[0054] During the task session, the user inputs a command through the agent client, which is then sent to the server that executes the data processing method. The server then forwards the command to the corresponding target sandbox node. The target sandbox node's command-line gateway converts the ACP format to the protocol format implemented by the node. The task execution process executes the command and returns the command execution result, which is then converted back to the unified ACP protocol format by the node's command-line gateway and returned to the agent client.
[0055] Step S204: In response to determining that the task session has terminated, save the relevant data of the task session to the workspace.
[0056] Specifically, when a user is detected to be unresponsive for an extended period or actively terminates the session, the task session is terminated. The relevant data of the task session can be converted into a data format suitable for persistent storage and saved, and resources can be reclaimed. This task session data can be data located in the `target` directory; furthermore, it can also include task information from the current session (such as requirement description information). Specifically, the relevant data of the task session provided by the target sandbox node can be obtained, and the underlying write service can be invoked to control the writing to the workspace.
[0057] For example, a software development team A acts as a tenant, with its own configuration information. This tenant can have multiple command-line agent clients. User 1 in development team A sends a task request through a command-line agent client, thus establishing task session 1. This task request is related to AI coding, such as creating a project. The module in the middleware (such as the central server) that handles task scheduling and cluster management assigns a target sandbox to this task request. This target sandbox calls the AI model through a command-line process and creates the relevant code for the project based on the task request. When user 2 of the same tenant accesses the project through another command-line agent client, they create task session 2 and are also assigned to the same target sandbox. The code files of the project created by user 1 are saved to team A's workspace, and user 2 can edit and view the relevant code files of the project. This enables multiple agent clients to collaboratively operate on a single file and synchronize state / data within a sandbox environment. User 1 can send other coding-related task requests 3 to the cloud-based agent through task session 1, and User 2 can send other coding-related task requests 4 to the cloud-based agent through task session 2. When processing other task requests 4, the cloud-based agent can generate the corresponding coding result based on the context of task request 3, and vice versa. This allows multiple agent clients to obtain execution results around the same task. The relevant AI coding tasks can run on the user's local machine (command-line agent client) or be pushed to the remote cloud for asynchronous, large-scale execution. In addition, task requests can include AI coding requirement information. The cloud-based agent (based on the AI model) can decompose this AI coding requirement information into multiple coding sub-tasks. Each coding sub-task is assigned to multiple agent clients of team A, thereby enabling decision optimization based on the thinking and planning capabilities of the AI model.
[0058] Please refer to Figure 3 The diagram illustrates an example of a hierarchical architecture call flow in an agent's data processing method. Using a command-line agent as an example, the diagram shows a top-down request processing and response generation model, including: The top-level session controller receives session creation requests from command-line agent clients and creates the sessions accordingly. Below the session controller are the object layer and the service layer. The object layer includes connection information, maintenance of user session state, and task manager. The service layer includes sandbox operation service, sandbox connection management service, and dynamic management processor. Below the object layer and opinion service layer are the storage layer and the infrastructure layer. The storage layer includes a session cache module and a configuration storage module; the infrastructure layer includes a command-line process manager, a WebSocket connection pool, and a load balancer. Below the infrastructure layer is the sandbox cluster, which includes multiple sandbox nodes such as the first sandbox node, ..., the nth sandbox node.
[0059] Furthermore, this embodiment also provides dynamic resource scheduling, automatically scaling up or down based on load conditions to optimize resource utilization. Specifically, this includes: obtaining the number of preheated sandboxes in the sandbox cluster; the number of preheated sandboxes is the number of sandboxes to be pre-started; monitoring the current water level value of the sandbox cluster, the current water level value being the number of allocated sandboxes; determining a scaling up or down decision for the sandbox cluster based on the difference between the number of preheated sandboxes and the current water level value, the scaling up or down decision being used to trigger the sandbox cluster to scale up or down.
[0060] Please refer to Figure 4 The diagram illustrates an example of an automatic scaling process, including: an external system 401, resource monitoring 402, a scaling decision engine 403, a scaling executor 404, a scheduled task executor 405, a sandbox initialization processor 406, and configuration management 407. The external system 401 sends a task request and is assigned a sandbox node, thus updating the sandbox cluster status in real time. Resource monitoring 402 caches the sandbox cluster configuration at the `bizType` dimension, monitors the current water level value, determines the difference between the sandbox preheating quantity and the current water level value, and provides this difference to the scaling decision engine 403. The scaling decision engine 403 executes scaling logic based on this difference. If the difference is greater than a threshold, a scaling trigger activates the scaling executor 404, and the scheduled task executor 405 is invoked based on the execution result of the scaling logic. The dynamic management processor of the scaling executor 404 receives the trigger command from the scaling trigger, then scales up or down according to the service type. The scaling result is provided to the sandbox management service, which updates the sandbox cluster status in real time based on the scaling result. The scheduled task executor 405 periodically calls the sandbox initialization processor 406, which performs sandbox initialization processing based on the sandbox configuration center of the configuration management 407 and the service type configuration set. This achieves dynamic initialization and automatic scaling of the sandbox nodes.
[0061] The data processing method of the described intelligent agent client provides a solution for service-oriented CLI capabilities, enabling users to define various project tasks using natural language through the intelligent agent client. Furthermore, cloud infrastructure lowers the barrier to entry for task tools, allowing non-technical personnel to use them without local environment configuration. It also provides a unified extension management and resource sharing mechanism, offering a private sandbox execution environment and cross-session persistent workspace, facilitating team collaboration and knowledge transfer, thereby improving team collaboration efficiency. It should be noted that, unless otherwise specified, the features given in this embodiment and other embodiments of this application can be combined with each other, and steps S201 and S202 or similar terms do not limit the order in which the steps must be executed.
[0062] This concludes the description of the method provided in this embodiment. By providing a private sandbox execution environment and a cross-session persistent workspace, the method effectively solves the problem of task data sharing and achieves the technical effect of improving team collaboration efficiency.
[0063] Example 2 Based on the above embodiments, this embodiment also provides an intelligent agent service system. The following is in conjunction with... Figure 5 The intelligent agent service system will be described below. For the relevant technical features and the effects achieved, please refer to the corresponding descriptions in the above embodiments. Figure 5 The intelligent agent service system shown includes: a central server 501 and a sandbox cluster 502; The central server 501 is used to receive task requests sent by the intelligent agent client corresponding to the target user; the task request is generated based on the demand description information provided by the target user based on natural language; the central server 501 allocates target sandbox nodes from the sandbox cluster according to the task request and sends task execution instructions to the target sandbox nodes. The sandbox cluster 502 includes one or more sandbox nodes, including the target sandbox node; wherein, in response to the task execution instruction, the target sandbox node establishes a task session between the target sandbox node and the agent client, and uses the task session to receive commands sent by the agent client and return command execution results, so as to execute the project task corresponding to the task request through the task session; in response to determining that the task session is terminated, the relevant data of the task session is saved to the workspace; The sandbox node is equipped with a workspace for storing relevant data of the task session, and the workspace is a long-term storage space with a lifespan longer than the task session.
[0064] Specifically, the central server includes an edge computing gateway, a task scheduling and cluster management module, a tenant management module, a session management module, and a workspace module. Figure 5 The sandbox cluster in the example uses a command-line agent. Each sandbox node (one sandbox node is one worker) in the sandbox cluster contains a task execution process and a command-line gateway. The command-line process is executed by the agent client, thus forming a relatively complete command-line execution environment. The agent client is used to receive natural language-based requirement description information input locally by the target user, generate the task request based on the requirement description information, and send the task request to the central server. The central server may also include an extension module to provide a plugin loading mechanism.
[0065] Specifically, each session is allocated an independent sandbox environment to provide a private sandbox execution environment. The NAS workspace is mounted via OverlayFS to achieve file system isolation and ensure the security and independence of the execution environment.
[0066] The edge computing gateway is used to provide the agent client with a session interface in the agent client protocol format, so that the agent client can call the session interface to initiate the establishment of the task session; establish a data transmission channel with the agent client to transmit the interaction data between the agent client, the central server, and the sandbox cluster, the interaction data including the task request; the task request is forwarded by the edge computing gateway to the task scheduling and cluster management module; the edge computing gateway can serve as a unified external API interface, and can also realize functions such as sandbox cluster warm-up, load balancing, and long network connection, encapsulate the underlying implementation, and expose the SSE (Server-Sent Events) interface in ACP format.
[0067] The task scheduling and cluster management module is used to maintain the status of the sandbox cluster, pre-start sandbox nodes, and allocate task requests to the target sandbox nodes. The tenant management module records tenant-specific configuration information for each tenant, including the users under that tenant. The tenant-specific configuration information includes resource pool information, application programming interface (API) keys, and extended configuration information. The resource pool information includes storage resource information for configuring the corresponding tenant's workspace. The API key serves as credentials for the agent client to access cloud-based AI model services; for example, it is a credential for the command-line agent client to access cloud-based command-line AI model services. The extended configuration information includes tenant-specific extended information for configuring the plugins and extended functions that the corresponding tenant needs to load. This supports multi-tenancy, providing customized resources and services to different tenants while ensuring secure isolation. The multi-tenant personalized configuration and secure isolation mechanism ensures security and independence between different teams, while also enabling cross-session data sharing through workspaces, improving team collaboration efficiency.
[0068] The session management module is used to maintain the state of the task session, including maintaining the session connection and synchronizing the session state. For example, the initial session state is task submission and initialization, i.e., the agent client sends a request (including intent and parameters); when the agent confirms receipt of the request, the session state changes to "submitted" or "processing". Furthermore, when the agent encounters a problem it cannot solve independently or requires user confirmation or additional information, the session state switches to "input required", the task is paused, and it waits for commands from the agent client.
[0069] The workspace module is used to create a tenant-specific workspace for the target user's tenant or a task-specific workspace for the project task on a Network Attached Storage (NAS) device. The workspace includes either the tenant-specific workspace or the task-specific workspace. It also acquires relevant data from the task session provided by the target sandbox node and controls its writing to the workspace. The workspace continues to store the relevant data from the task session after it ends, forming a long-term memory. This enables cross-session data storage and cross-session work state reuse.
[0070] Furthermore, the task scheduling and cluster management module is also used to: determine a scaling up or down decision for the sandbox cluster based on the difference between the number of preheated sandboxes and the current water level value of the sandbox cluster. This scaling up or down decision is used to trigger the sandbox cluster to scale up or down. Specifically, the number of preheated sandboxes is the number of pre-started sandboxes, and the current water level value is the number of allocated sandboxes. This can be achieved through sandbox cluster configuration based on the bizType dimension, combined with asynchronous message-driven mechanisms, enabling dynamic sandbox initialization, dynamic allocation and reclamation of resources based on load conditions for automatic scaling up or down, and optimizing resource utilization.
[0071] Furthermore, the extension module is used to instruct the target sandbox node to load corresponding plugins and extended functions based on the tenant-specific configuration information. Furthermore, the extension module also provides user-defined commands, skills, and MCP configurations to meet the needs of different business scenarios.
[0072] Each sandbox node in the sandbox cluster runs a task execution process and a command-line gateway; wherein, The task execution process executes commands sent by the agent client to obtain result data in a specified protocol format. This specified protocol format is a command-line protocol format specified for the target sandbox node. The sandbox nodes in the sandbox cluster may use the same or different command-line protocols. The task execution process is a separate process on the sandbox node, responsible for accepting tasks, initializing the environment (which can be done by mounting custom extensions and workspace files via overlayfs), and executing command-line commands. It then provides the final results in the target directory to the workspace service module for writing back to the workspace.
[0073] The command-line gateway is used to convert the result data into data in the agent client protocol format, and return it to the agent client as the command execution result. Specifically, the command-line gateway can... By shielding different command-line protocols and returning command execution results to the user in a unified ACP protocol, it provides good scalability and supports various CLI backend architecture designs.
[0074] The central server also includes a monitoring and alarm module, which is used to monitor sandbox resources and issue alarms for resource anomalies.
[0075] The sandbox cluster also includes a shared resource pool, which provides shared resources such as computing resources, network resources, and storage resources for each sandbox node.
[0076] The intelligent agent service system also includes a file writing service and NAS shared storage. The workspace mounted on the sandbox node is mounted in read-only mode. After receiving the command execution result data (such as the data in the final target directory) provided by the sandbox node, the workspace service module calls the file writing service to write the command execution result data to the dedicated workspace allocated to the corresponding tenant on the NAS shared storage. The sandbox node can mount corresponding workspaces according to the business type; for example, one sandbox node may mount the command / skills directory, and another may mount the user file directory. Here, "skills" refers to predefined functional modules in the CLI tool, which can be invoked via natural language commands. Specifically, through the file system isolation and multi-tenant security mechanism implemented by OverlayFS, during runtime, only files in the NAS can be read, and only files in specific working directories will be written back to the workspace by the system.
[0077] The intelligent agent service system, through cloud-based infrastructure and standardized ACP protocol interfaces, enables users to use task tools such as CLI tools without requiring local environment configuration, thereby lowering the barrier to entry for task tools. Furthermore, the service system can be deployed on the same service platform, providing standardized API interfaces and ACP protocols that allow task tools to be seamlessly integrated into business processes.
[0078] Example 3 Based on the above embodiments, this embodiment also provides a data processing method for intelligent agents. The following is combined with... Figure 6 The data processing method of the intelligent agent will be described below. For the relevant technical features and the effects achieved, please refer to the corresponding descriptions in the above embodiments. Figure 6 The data processing method for the intelligent agent shown is applied to the intelligent agent client and includes steps S601 to S603.
[0079] Step S601: Receive natural language-based demand description information input locally by the target user, and generate a task request based on the demand description information; Step S602: Send the task request to the cloud device; wherein, the cloud device executes the data processing method of the intelligent agent provided in the first embodiment to establish a task session corresponding to the intelligent agent client; Step S603: Send commands to the cloud device through the task session and receive the command execution results returned by the cloud device, so as to execute the project task corresponding to the task request through the task session. After the task session is terminated, the relevant data of the task session is saved to the workspace allocated by the cloud device.
[0080] Specifically, the intelligent agent client provides a user interface and receives user input in natural language to describe the user's needs. It then calls API interfaces to send task requests to cloud devices, such as the server of the intelligent agent service platform, to trigger the establishment of a task session.
[0081] Example 4 Corresponding to the data processing method for an intelligent agent provided in Embodiment 1, this embodiment also provides a data processing device for an intelligent agent. The following is in conjunction with... Figure 7 The device will be described in detail below. For related technical features and effects, please refer to the description of the corresponding method. Figure 7 The data processing device for the intelligent agent shown includes: The request entry unit 701 is used to receive a task request sent by the intelligent agent client corresponding to the target user; the task request is generated based on the demand description information provided by the target user in natural language. The session establishment unit 702 is used to allocate a target sandbox node from the sandbox cluster according to the task request and establish a task session between the target sandbox node and the agent client; wherein, the target sandbox node is mounted with a workspace for storing relevant data of the task session, and the workspace is a long-term storage space with a lifespan longer than the task session. The task execution unit 703 is used to receive commands sent by the intelligent agent client through the task session and return the command execution results, so as to execute the project task corresponding to the task request through the task session. The data storage unit 704 is used to save the relevant data of the task session to the workspace in response to determining that the task session has terminated.
[0082] Optionally, the workspace persistently stores data related to task sessions initiated by different intelligent agent clients, the different intelligent agent clients corresponding to the tenant to which the target user belongs; or, the workspace is dedicated to persistently storing data related to the project tasks; wherein, the persistent storage includes continued storage after the task session ends, in order to form long-term memory.
[0083] Optionally, after the command-line task is created, it can be accessed through the ID corresponding to the project task, thereby allowing different agent clients to join the project task.
[0084] Optionally, each sandbox node in the sandbox cluster may use the same command-line protocol or different command-line protocols. Each sandbox node includes a task execution process and a command-line gateway; the task execution process executes the commands sent by the agent client and obtains result data in the corresponding command-line protocol format; the command-line gateway converts the result data into data in the agent client protocol format and returns it as the command execution result to the agent client.
[0085] Optionally, the device further includes an expansion / shrinkage unit, which is used to: obtain the number of preheated sandboxes in the sandbox cluster; the number of preheated sandboxes is the number of pre-started sandboxes; monitor the current water level value of the sandbox cluster, the current water level value is the number of allocated sandboxes; determine an expansion / shrinkage decision for the sandbox cluster based on the difference between the number of preheated sandboxes and the current water level value, the expansion / shrinkage decision is used to trigger the sandbox cluster to expand or shrink.
[0086] Optionally, the device further includes a configuration management unit, which is configured to: receive and save tenant-specific configuration information for each tenant, the tenant-specific configuration information including resource pool information, application programming interface key, and extended configuration information; wherein, the resource pool information includes storage resource information for configuring the workspace of the corresponding tenant; the application programming interface key is credential information used by the agent client to access the cloud command-line AI model service; and the extended configuration information includes tenant-specific extended information for configuring the plugins and extended functions that the corresponding tenant needs to load.
[0087] Optionally, the session establishment unit 702 is further configured to: instruct the target sandbox node to mount the workspace and start the task execution process via instructions before establishing a task session between the target sandbox node and the agent client.
[0088] Optionally, the workspace is mounted to the target sandbox node in read-only mode via a union file system; the data storage unit 704 is specifically used to: obtain relevant data of the task session provided by the target sandbox node, and control the writing to the workspace.
[0089] Based on the above embodiments, one embodiment of this application provides an electronic device; for relevant parts, please refer to the corresponding descriptions of the above embodiments. Figure 8 A schematic diagram of an electronic device is shown in the figure. The electronic device includes a memory and a processor. The memory is used to store computer instructions for data processing. When the computer instructions are read and executed by the processor, they execute the method provided in the embodiments of this application.
[0090] Based on the above embodiments, one embodiment of this application provides a computer-readable storage medium. For relevant details, please refer to the corresponding descriptions in the above embodiments. The schematic diagram of the computer-readable storage medium is similar to that of an electronic device, and the memory in the diagram can be understood as the computer-readable storage medium. The computer-readable storage medium stores computer instructions, which, when executed by a processor, are used to implement the method provided in the embodiments of this application.
[0091] It should be noted that the embodiments of this application may involve the use of user data. In practical applications, user-specific personal data should be used in the scheme described herein within the scope permitted by applicable laws and regulations, provided that it complies with the applicable laws and regulations of the country in which it is located (e.g., with the user's explicit consent, and with the user being properly notified).
[0092] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, a network interface, and memory. Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0093] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.
[0094] 2. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0095] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
Claims
1. A data processing method for an intelligent agent, characterized in that, include: Receive task requests sent by the intelligent agent client corresponding to the target user; The task request is generated based on the demand description information provided by the target user using natural language. According to the task request, a target sandbox node is allocated from the sandbox cluster, and a task session is established between the target sandbox node and the agent client; wherein, the target sandbox node is mounted with a workspace for storing relevant data of the task session, and the workspace is a long-term storage space with a lifespan longer than the task session; The task session receives commands sent by the intelligent agent client and returns command execution results, thereby enabling the execution of the project task corresponding to the task request through the task session. In response to determining that the task session has terminated, the relevant data of the task session is saved to the workspace.
2. The method according to claim 1, characterized in that, The workspace persistently stores data related to task sessions initiated by different intelligent agent clients, where each client corresponds to the tenant to which the target user belongs; or, The workspace is dedicated to persistently storing data related to the project tasks; The persistent storage includes continued storage after the task session ends, in order to form long-term memory.
3. The method according to claim 1, characterized in that, Once created, the project task can be accessed via its corresponding ID, allowing it to be added to different agent clients.
4. The method according to claim 1, characterized in that, Each sandbox node in the sandbox cluster may use the same command-line protocol or different command-line protocols. Each sandbox node includes a task execution process and a command-line gateway; The task execution process executes the commands sent by the intelligent agent client and obtains result data in the corresponding command line protocol format; The command-line gateway converts the result data into data in the agent client protocol format, which is then returned to the agent client as the command execution result.
5. The method according to claim 1, characterized in that, The method further includes: Obtain the number of preheated sandboxes in the sandbox cluster; the number of preheated sandboxes is the number of pre-started sandboxes. Monitor the current water level of the sandbox cluster, where the current water level value is the number of sandboxes that have been allocated. The expansion / reduction decision for the sandbox cluster is determined based on the difference between the number of preheated sandboxes and the current water level value. The expansion / reduction decision is used to trigger the sandbox cluster to expand or shrink.
6. The method according to claim 1, characterized in that, The method further includes: Receive and save tenant-specific configuration information for each tenant, including resource pool information, application programming interface key, and extended configuration information; The resource pool information includes storage resource information used to configure the workspace of the corresponding tenant; The application programming interface key is the credential information used by the intelligent agent client to access the cloud command-line AI model service. The extended configuration information includes tenant-specific extended information for configuring the plugins that the corresponding tenant needs to load and extended functions.
7. The method according to claim 1, characterized in that, The method further includes: Before establishing a task session between the target sandbox node and the agent client, the target sandbox node is instructed to mount the workspace and start the task execution process via commands.
8. The method according to claim 7, characterized in that, The workspace is mounted in read-only mode to the target sandbox node via a union file system; Saving the relevant data of the task session to the workspace includes: obtaining the relevant data of the task session provided by the target sandbox node, and controlling the writing to the workspace.
9. An intelligent agent service system, characterized in that, include: Central server and sandbox cluster; The central server is used to receive task requests sent by the intelligent agent client corresponding to the target user; The task request is generated based on the demand description information provided by the target user in natural language; a target sandbox node is allocated from the sandbox cluster according to the task request, and a task execution instruction is sent to the target sandbox node; The sandbox cluster includes one or more sandbox nodes, including the target sandbox node; wherein, in response to the task execution instruction, the target sandbox node establishes a task session with the agent client, and uses the task session to receive commands sent by the agent client and return command execution results, so as to execute the project task corresponding to the task request through the task session; in response to determining that the task session is terminated, the relevant data of the task session is saved to the workspace; The sandbox node is equipped with a workspace for storing relevant data of the task session, and the workspace is a long-term storage space with a lifespan longer than the task session.
10. The intelligent agent service system according to claim 9, characterized in that, The central server specifically includes: an edge computing gateway, a task scheduling and cluster management module, a tenant management module, a session management module, and a workspace module; The edge computing gateway is configured to provide the agent client with a session interface in the agent client protocol format, so that the agent client can call the session interface to initiate the establishment of the task session; establish a data transmission channel with the agent client to transmit the interaction data between the agent client, the central server, and the sandbox cluster, the interaction data including the task request; and forward the task request to the task scheduling and cluster management module by the edge computing gateway. The task scheduling and cluster management module is used to maintain the state of the sandbox cluster, pre-start sandbox nodes, and allocate task requests to the target sandbox nodes. The tenant management module is used to record tenant-specific configuration information for each tenant. Each tenant includes the tenant to which the user belongs. The tenant-specific configuration information includes resource pool information, application programming interface (API) key, and extended configuration information. The resource pool information includes storage resource information for configuring the corresponding tenant's workspace. The API key is credential information used by the agent client to access the cloud-based command-line AI model service. The extended configuration information includes tenant-specific extended information for configuring the plugins and extended functions that the corresponding tenant needs to load. The session management module is used to maintain the state of the task session; The workspace module is used to create a tenant-specific workspace for the target user's tenant or a task-specific workspace for the project task on a network-attached storage device. The workspace includes either the tenant-specific workspace or the task-specific workspace. It also acquires relevant data of the task session provided by the target sandbox node and controls its writing to the workspace. The workspace continues to store the relevant data of the task session after the task session ends to form a long-term memory.
11. The intelligent agent service system according to claim 10, characterized in that, The task scheduling and cluster management module is also used for: The expansion / reduction decision for the sandbox cluster is determined based on the difference between the number of preheated sandboxes in the sandbox cluster and the current water level value of the sandbox cluster. The expansion / reduction decision is used to trigger the sandbox cluster to expand or shrink. The number of preheated sandboxes refers to the number of pre-started sandboxes, and the current water level value refers to the number of allocated sandboxes.
12. The intelligent agent service system according to claim 10, characterized in that, Also includes: Extended modules The extension module is used to instruct the target sandbox node to load the corresponding plugins and extended functions according to the tenant-specific configuration information.
13. The intelligent agent service system according to claim 10, characterized in that, Each sandbox node in the sandbox cluster runs a task execution process and a command-line gateway; among which... The task execution process is used to execute the commands sent by the intelligent agent client and obtain result data in a specified protocol format, wherein the specified protocol format is a command line protocol format specified for the target sandbox node; wherein, the sandbox nodes of the sandbox cluster use the same command line protocol or different command line protocols. The command-line gateway is used to convert the result data into data in the agent client protocol format and return it to the agent client as the result of the command execution.
14. A data processing method for an intelligent agent, characterized in that, Applied to an intelligent agent client, the method includes: Receive natural language-based requirement description information input locally by the target user, and generate a task request based on the requirement description information; The task request is sent to a cloud device; wherein the cloud device executes the data processing method of the intelligent agent as described in any one of claims 1-8 to establish a task session corresponding to the intelligent agent client; The task session sends commands to the cloud device and receives command execution results returned by the cloud device, thereby enabling the execution of the project task corresponding to the task request through the task session. After the task session is terminated, the relevant data of the task session is saved to the workspace allocated by the cloud device.
15. An electronic device, characterized in that, include: Processor, memory, and computer program instructions stored in said memory and executable on the processor; When the processor executes the computer program instructions, it implements the method as described in any one of claims 1-8.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-8.