Agent tool invocation method and apparatus, and electronic device

CN122933746APending Publication Date: 2026-10-16BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610870095.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-16
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

在代码生成、测试执行、日志分析等场景下,大文件同步可能挤占工具调用链路,导致智能体Agent获取执行结果延迟,影响连续推理和后续动作规划

Benefits of technology

[0012] This disclosure separates the tool call signaling from the file entity stream, which can avoid the impact of large file synchronization on the agent tool call response, improve the efficiency of agent tool calls, reduce the delay in the agent obtaining execution results, and improve the efficiency and accuracy of continuous inference and subsequent action planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122933746A_ABST
    Figure CN122933746A_ABST
Patent Text Reader

Abstract

The present disclosure provides an agent tool calling method and device and electronic equipment, and relates to the technical field of artificial intelligence, natural language processing and agent. The specific implementation scheme is: receiving a tool calling request sent by an agent, the tool calling request comprising a session identifier and a tool identifier to be called; according to the tool calling request, a full-duplex communication WebSocket channel and a cooperative state of the WebSocket channel, issuing a tool execution instruction carrying a request identifier to a client, the WebSocket channel being two independent full-duplex communication WebSocket channels between a server and the client, comprising a tool execution channel and a file synchronization channel; receiving an execution result sent by the client, the execution result carrying the request identifier. The present disclosure separates the tool calling signaling and the file entity stream, which can avoid the influence of large file synchronization on the response of the agent tool calling, improve the efficiency of the agent tool calling and reduce the delay of the agent in obtaining the execution result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, and more particularly to the fields of natural language processing and intelligent agents. Background Technology

[0002] In related technologies, the model context protocol tool call chain leans more towards standardized tool interfaces, failing to distinguish between lightweight tool signaling and large file entity streams. In scenarios such as code generation, test execution, and log analysis, large file synchronization may clog the tool call chain, causing delays in the agent's acquisition of execution results, affecting continuous inference and subsequent action planning. Summary of the Invention

[0003] This disclosure provides a method, apparatus, and electronic device for invoking intelligent agent tools.

[0004] According to one aspect of this disclosure, a method for invoking an intelligent agent tool is provided, wherein the tool is executed by a server, including:

[0005] Receive tool invocation requests sent by intelligent agents. The tool invocation request includes a session identifier and the identifier of the tool to be invoked. Based on the tool invocation request, the full-duplex communication WebSocket channel, and the coordination status of the WebSocket channel, a tool execution instruction carrying a request identifier is sent to the client. The WebSocket channel consists of two independent full-duplex communication WebSocket channels between the server and the client, including the tool execution channel and the file synchronization channel. Receive the execution result sent by the client, which carries the request identifier.

[0006] According to another aspect of this disclosure, a method for invoking an intelligent agent tool is provided, wherein the tool is executed by a client, comprising: Through the tool execution channel, receive tool execution instructions sent by the server, which carry a request identifier; Based on the tool execution instructions, invoke the tool in the local environment to execute the instructions and obtain the execution results; The execution result, carrying the request identifier, is sent to the server through the tool execution channel.

[0007] According to another aspect of this disclosure, an intelligent agent tool invocation device is provided, wherein it is deployed on a server and includes: The receiving module is used to receive tool invocation requests sent by the intelligent agent. The tool invocation request includes a session identifier and a tool identifier to be invoked. The processing module is used to send tool execution instructions carrying request identifiers to the client based on the tool call request, the full-duplex communication WebSocket channel, and the coordination status of the WebSocket channel. The WebSocket channel consists of two independent full-duplex communication WebSocket channels between the server and the client, including the tool execution channel and the file synchronization channel. The receiving module is also used to receive the execution results sent by the client, and the execution results carry a request identifier.

[0008] According to another aspect of this disclosure, an intelligent agent tool invocation device is provided, wherein, deployed on a client, it includes: The receiving module is used to receive tool execution instructions carrying a request identifier sent by the server through the tool execution channel; The processing module is used to invoke the tool to execute the tool execution instructions in the local environment and obtain the execution results. The sending module is used to send the execution result, carrying the request identifier, to the server through the tool execution channel.

[0009] According to another aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the above-described agent tool invocation method.

[0010] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to execute the above-described agent tool invocation method.

[0011] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described intelligent agent tool invocation method.

[0012] This disclosure separates the tool call signaling from the file entity stream, which can avoid the impact of large file synchronization on the agent tool call response, improve the efficiency of agent tool calls, reduce the delay in the agent obtaining execution results, and improve the efficiency and accuracy of continuous inference and subsequent action planning.

[0013] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0014] The accompanying drawings are provided to better understand this disclosure and are not intended to limit it. Wherein: Figure 1 This is a schematic diagram illustrating an exemplary implementation of an intelligent agent tool invocation method disclosed herein; Figure 2 This is a schematic diagram illustrating an exemplary implementation of an intelligent agent tool invocation method disclosed herein; Figure 3 This is an architecture diagram of an intelligent agent tool invocation system disclosed herein; Figure 4 This is a schematic diagram of an exemplary implementation of dual-channel collaboration shown in this disclosure; Figure 5 This is a schematic diagram illustrating the timing of a tool invoking a proxy, as shown in this disclosure; Figure 6 This is a schematic diagram illustrating an exemplary implementation of an intelligent agent tool invocation method disclosed herein; Figure 7 This is a schematic diagram illustrating an exemplary implementation of an intelligent agent tool invocation method disclosed herein; Figure 8 This is a schematic diagram of a two-way file synchronization process disclosed in this publication; Figure 9 This is a schematic diagram illustrating a large file chunked transmission method disclosed in this publication; Figure 10 This is a schematic diagram of an intelligent agent tool invocation device according to an exemplary embodiment of the present disclosure; Figure 11 This is a schematic diagram of an intelligent agent tool invocation device according to an exemplary embodiment of the present disclosure; Figure 12 This is a schematic diagram of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation

[0015] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0016] Artificial Intelligence (AI) is a new technological science that studies and develops theories, methods, technologies, and application systems to simulate, extend, and expand human intelligence. AI is a branch of computer science that attempts to understand the nature of intelligence and produce new intelligent machines that can react in a way similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems.

[0017] Natural Language Processing (NLP) is an important research direction in the field of artificial intelligence. It integrates knowledge from multiple disciplines such as linguistics, computer science, machine learning, mathematics, and cognitive psychology. It is an interdisciplinary field that combines computer science, artificial intelligence, and linguistics, encompassing two main aspects: natural language understanding and natural language generation. Its research content includes multiple levels such as characters, words, phrases, sentences, paragraphs, and texts, serving as a bridge between machine language and human language. Its aim is to enable machines to understand, interpret, and generate human language, achieving effective communication between humans and machines, and enabling computers to perform tasks such as language translation, sentiment analysis, and text summarization.

[0018] An intelligent agent is a proxy capable of perceiving its environment and taking actions to achieve specific goals. It can be software, hardware, or a system, possessing autonomy, adaptability, and interactivity. Intelligent agents perceive changes in the environment (e.g., through sensors or data input), make judgments and decisions based on their learned knowledge and algorithms, and then execute actions to influence the environment or achieve predetermined goals. Intelligent agents are widely used in the field of artificial intelligence, commonly found in automated systems, robots, virtual assistants, and game characters. Their core strength lies in their ability to learn autonomously and continuously evolve to better complete tasks and adapt to complex environments.

[0019] MCP stands for Model Context Protocol.

[0020] WebSocket is a protocol that provides full-duplex communication over a single Transmission Control Protocol (TCP) connection, enabling clients and servers to transmit data in real time and bidirectionally without having to repeatedly establish connections as required by the Hypertext Transfer Protocol (HTTP).

[0021] Dual WebSocket means that the client and server maintain two independent WebSocket connections simultaneously.

[0022] The acquisition, storage, and application of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0023] The examples in this disclosure may involve user data, data acquisition, and / or use. All of these aspects comply with relevant laws, regulations, and provisions. In the examples of this disclosure, all data collection, acquisition, processing, manipulation, forwarding, and use are conducted with the user's knowledge and confirmation. Accordingly, when implementing each example, the type, scope of use, and usage scenarios of any data or information that may be involved should be communicated to the user and their authorization obtained through appropriate means in accordance with relevant laws and regulations. The specific methods of notification and / or authorization can vary depending on the actual situation and application scenario, and the scope of the solution is not limited in this regard.

[0024] In this manual and the sample solutions, any processing of personal information will be conducted only under legal grounds (such as obtaining the consent of the data subject or being necessary for the performance of a contract) and will only be carried out within the scope stipulated or agreed upon. A user's refusal to process personal information beyond what is necessary for basic functions will not affect the user's use of basic functions.

[0025] Figure 1 This is a schematic diagram illustrating an exemplary implementation of an intelligent agent tool invocation method disclosed herein, such as... Figure 1 As shown, the intelligent agent tool's invocation method is executed by the server and includes the following steps: S101, receive a tool call request sent by the intelligent agent. The tool call request includes a session identifier and a tool identifier to be called.

[0026] In some implementations, the server receives a session request sent by the client, calls an agent to parse the session request, the agent obtains and initiates a tool invocation request, and the server proxy interface receives the tool invocation request sent by the agent. The tool invocation request is an MCP tool invocation signaling, which includes at least a session identifier and a tool identifier to be invoked, used to verify that the target dialogue exists and the tool has been registered.

[0027] S102, based on the tool call request, the full-duplex communication WebSocket channel, and the coordination status of the WebSocket channel, send a tool execution instruction carrying a request identifier to the client. The WebSocket channel consists of two independent full-duplex communication WebSocket channels between the server and the client, including the tool execution channel and the file synchronization channel.

[0028] In this embodiment of the disclosure, two independent WebSocket long connection channels are established for each session, and the session identifier is used as a path parameter to distinguish the connections of different users.

[0029] The two channels in this embodiment are managed independently and do not interfere with each other. The tool execution channel only carries MCP tool call signaling, tool metadata, execution result summary, and heartbeat keep-alive data, and does not carry file entity streams; the file synchronization channel carries file content, directory changes, and large file chunk data. This avoids large amounts of data such as code repositories, log files, and binary files from occupying the tool execution channel, ensuring that the Agent can receive local tool execution results in a timely manner during continuous inference. By separating the tool call signaling and file entity streams, this disclosure avoids large file synchronization affecting the Agent's tool call response.

[0030] Based on the tool invocation request submitted by the frontend and the real-time collaborative operation status of two independent full-duplex WebSocket links, the system issues standardized tool execution instructions bound to unique request identifiers to the corresponding clients. Two non-interfering full-duplex WebSocket communication channels are configured between the server and client, with clearly defined roles. The file synchronization channel is responsible for bidirectional file change synchronization, supporting operations such as file content updates, file deletion, directory creation, large file chunk transfer, and operation completion confirmation. The tool execution channel is responsible for tool invocation proxying, supporting operations such as client tool capability registration, tool execution request issuance, tool execution result reporting, and connection keep-alive heartbeat.

[0031] The tool execution instructions embed request identifiers to achieve one-to-one matching of requests, instructions, execution receipts, and file transfers throughout the entire process. Based on dual-channel parallel collaborative scheduling, the tool execution and file data flow are isolated to avoid data congestion and packet corruption, ensuring that the tool call process is orderly, stable, and efficient.

[0032] S103: Receive the execution result sent by the client. The execution result carries a request identifier.

[0033] The server receives tool execution result data packets from the client in real time. Each execution result is accompanied by a unique request identifier. The server uses the identifier to accurately match the corresponding tool execution instructions previously issued, and completes the corresponding collection of task results.

[0034] This disclosure receives a tool invocation request sent by an agent. The tool invocation request includes a session identifier and a tool identifier to be invoked. Based on the tool invocation request, the full-duplex communication WebSocket channel, and the coordination state of the WebSocket channel, a tool execution instruction carrying a request identifier is sent to the client. By separating the tool invocation signaling and the file entity stream, the impact of large file synchronization on the agent's tool invocation response can be avoided, thereby improving the efficiency of agent tool invocation, reducing the delay in the agent obtaining execution results, and improving the efficiency and accuracy of continuous inference and subsequent action planning.

[0035] In some implementations, the dual-channel architecture of this disclosure can also be implemented based on a bidirectional gRPC stream. That is, the open-source, high-performance remote procedure call framework (gRPC) can be used to replace WebSocket with bidirectional streaming, designing tool execution and file synchronization as two separate streaming interfaces. This approach offers better type constraints and performance, but requires a predefined protocol buffer (protobuf), making it less flexible than WebSocket; it also incurs higher integration costs in browser, plugin, and lightweight client scenarios.

[0036] In some implementations, file synchronization and tool execution can be merged into the same WebSocket channel using single-channel multiplexing, with message type fields distinguishing between tool calls, file changes, and heartbeat messages. This approach requires fewer connections, but it can clog the tool call channel when transmitting large files, logs, and test reports.

[0037] Figure 2 This is a schematic diagram illustrating an exemplary implementation of an intelligent agent tool invocation method disclosed herein, such as... Figure 2 As shown, the intelligent agent tool's invocation method is executed by the server and includes the following steps: S201, Receive channel establishment information sent by the client. The channel establishment information includes session identifier, startup path and user information.

[0038] The server continuously listens for and receives channel establishment information pushed by the client. This information includes the session identifier, startup path, and user information required for verification, which is used to complete the dual-channel initialization verification.

[0039] S202, based on the channel establishment information, establish two independent full-duplex WebSocket communication channels between the server and the client.

[0040] After parsing and verifying the received channel establishment information, the server establishes two independent full-duplex WebSocket channels between the server and the client, which do not interfere with each other, and are responsible for command interaction and file synchronization, respectively.

[0041] S203 receives tool registration information sent by the client through the tool execution channel, and maintains the device capability profile corresponding to the session identifier based on the tool registration information.

[0042] The following describes the dynamic registration and remote proxy mechanism of the client tool disclosed herein.

[0043] Figure 3 This disclosure presents an architecture diagram of an intelligent agent tool invocation system, such as... Figure 3As shown, the client registers its local information with the server via a proxy. After connecting to the tool execution channel, the client immediately sends a tool registration message to the server, including a list of tools supported by the device (including the name, function description, and parameter definitions of each tool), device identifier, device working directory, operating system, and user information. Different clients can register different tools; for example, a local development machine can register code editing and testing tools, a remote testing machine can register script execution and log reading tools, and an encryption machine can register encrypted data generation tools. Tool capabilities can be skills. Optionally, the file synchronization service is used for verifying, writing, confirming, or responding to ACKs for file content, logs, and test artifacts; optionally, the tool proxy service is used for maintaining device capability profiles and request routing related to the tool execution channel.

[0044] The server-side session manager maintains an independent device capability profile for each session identifier, recording the complete list of tool definitions registered by the client, the set of tool names (used for validity checks before tool invocation), the device working directory, the asynchronous wait mapping table for all pending requests in the current session (such as the mapping between request identifiers and asynchronous placeholder objects), the connection establishment time, and the last activity time. The Claude Agent only sees a unified list of MCP tools and does not need to know the actual device location behind the tools.

[0045] Claude Agent is an agent runtime that can run in a local project environment. Through multi-agent collaboration and MCP tool extensions, it upgrades AI from "providing suggestions" to "participating in execution." In concurrent programming, a Future represents a placeholder for an asynchronous task that may not yet be completed, signifying a result that will only be obtained at some point in the future. For the agent, the tool invocation process is completely transparent; the agent does not need to know whether the tool is actually running on the client or server.

[0046] Clients on different devices register their native tool capabilities as MCP tools that can be invoked by the Claude Agent. The server maintains device capability profiles and file synchronization status on a session-by-session basis, enabling the Claude Agent to invoke tools on multiple devices as if they were local tools.

[0047] In this embodiment of the disclosure, the dynamic registration and remote proxy mechanism of client tools enables the server agent to discover and invoke tools on different devices on a session basis, so that Claude's perception of device capabilities becomes a unified MCP tool list, solving the problem that traditional monolithic agents can only perceive a single operating environment.

[0048] S204, Receive a tool invocation request sent by the intelligent agent. The tool invocation request includes a session identifier and a tool identifier to be invoked.

[0049] The session state is determined based on the number of concurrent processes corresponding to the current session.

[0050] In response to a specified session state, a tool execution command containing a request identifier is sent to the client based on the tool invocation request, the full-duplex communication WebSocket channel, and the coordination state of the WebSocket channel.

[0051] The following describes the multi-user session isolation and concurrency management mechanism disclosed herein.

[0052] Each user session is completely isolated by a unique session identifier, including the following dimensions: At the working directory level, each session corresponds to an independent working directory on the server. The directory name contains the session identifier, and file operations in different sessions do not affect each other.

[0053] For file synchronization connections, each session maintains an independent file synchronization WebSocket connection, and the disconnection of the connection does not affect other sessions.

[0054] For the tool execution connection dimension, each session maintains an independent tool execution WebSocket connection, and tool call requests are precisely routed to the corresponding client.

[0055] For example, a dual-channel can be created for each session, and the WebSocket channel can be released after a certain period of time. Another example is that the WebSocket channel is released after a certain preset time threshold has elapsed since no new messages have been received in the current session.

[0056] At the Agent instance level, each session corresponds to an independent large model Agent instance, with session context and dialogue history completely isolated.

[0057] For the session metadata dimension, the configuration information, associated documents, generation status and other metadata of each session are stored in a separate directory.

[0058] This disclosure controls concurrent initialization by using a semaphore mechanism to limit the number of concurrent Agent initializations (e.g., a maximum of 5) to prevent excessive concurrency in the underlying large model process when a large number of users initiate sessions simultaneously, which could lead to initialization timeouts or resource exhaustion. Initialization requests exceeding the concurrency limit enter a waiting queue and are executed sequentially.

[0059] In this embodiment of the disclosure, a session state machine can be used to maintain two processing states for each session: idle and processing. When a session is in the processing state, if a new session message arrives, the system returns a busy response to prevent the same session from processing multiple messages concurrently, which could lead to context confusion.

[0060] In this embodiment of the disclosure, when a new connection with the same session identifier arrives, the server automatically closes the old connection and establishes a new session, supporting the client to reconnect and resume working status after network interruption. Thus, an old connection replacement mechanism can be implemented.

[0061] User session isolation and concurrency management mechanisms can prevent file crosstalk, mis-sent tool requests, and Agent context confusion when multiple users share the server.

[0062] S205, perform verification based on session identifier and tool identifier. In response to the existence of the target session corresponding to the session identifier and the determination that the tool has been registered based on the tool registration message and tool identifier, the verification is confirmed to be successful.

[0063] In this embodiment, multi-layered security verification is performed by extracting the session identifier and tool identifier carried in the message. The overall verification process is considered successful only when both verification conditions are met simultaneously: a valid session exists and the corresponding tool has completed registration and filing.

[0064] Optionally, if any condition is not met, the request will be rejected and subsequent tool scheduling operations will be refused. This will prevent unauthorized sessions and unregistered tools from initiating unauthorized calls from both the session and tool perspectives, thus ensuring the security and controllability of the communication and scheduling system.

[0065] S206, Generate a request identifier and create an asynchronous placeholder object corresponding to the request identifier, and store it in the pending response mapping table.

[0066] In this embodiment of the disclosure, the server automatically generates a globally unique request identifier, synchronously creates an asynchronous placeholder object bound to it, and then pairs the identifier with the placeholder and stores it in the pending response mapping table for temporary storage and waiting for the receipt.

[0067] S207, based on the coordination state of the WebSocket channel, sends a tool execution instruction carrying a request identifier to the client through the tool execution channel.

[0068] In response to tool commands being read-only or status query types, a tool execution command carrying a request identifier is sent directly to the client through the tool execution channel. Alternatively, In response to the file synchronization channel transmitting data files, the channel status of the file synchronization channel is determined to be in the first state. Non-urgent tool execution instructions within the same session are temporarily stored in the waiting queue until the file synchronization channel responds with an indication message that the file transmission is complete. At this point, the channel status of the file synchronization channel is determined to be in the second state, and tool execution instructions carrying request identifiers are continued to be sent to the client through the tool execution channel. For example, the first state could be a processing state, and the second state could be an idle state.

[0069] The dual-channel cooperative state machine mechanism disclosed herein is described below.

[0070] like Figure 4 As shown, to prevent tool execution and file synchronization from preempting each other's state within the same session, the system maintains a dual-channel collaborative state machine at the session level. This state machine binds the Agent inference context, client tool execution state, and file synchronization confirmation state together within the same session.

[0071] When the file synchronization channel is transmitting critical code files or test result files, the system can temporarily store non-urgent tool commands within the same session in a waiting queue, waiting for the file synchronization channel to return operation confirmation before continuing to send them. For read-only and status query tool calls, they can be directly allowed based on the tool type. This approach avoids both the agent continuing inference based on old file states and large file synchronization blocking the tool execution channel. The tool call agent timing disclosed herein can be as follows: Figure 5 As shown.

[0072] The dual-channel collaborative state machine mechanism can bind the tool execution result and file synchronization confirmation to the same round of agent inference, preventing the agent from continuing to execute the next step based on old files that have not been synchronized.

[0073] S208: Receive the execution result sent by the client. The execution result carries a request identifier.

[0074] For details regarding step S208, please refer to the relevant descriptions in the above embodiments; they will not be repeated here.

[0075] S209: Based on the request identifier, establish the association between the execution result and the asynchronous placeholder object to support the server in querying the execution result based on the asynchronous placeholder object.

[0076] Based on the unique request identifier, a binding association is established between the tool execution result and the asynchronous placeholder object, which makes it convenient for the server to quickly retrieve the corresponding complete execution result data by calling the placeholder object.

[0077] In the traditional model, an agent typically only perceives its own single operating environment, with tools, files, and context all organized around the same local or cloud workspace. When tasks involve multi-device, multi-machine, cross-environment collaboration, or remote server operations, the agent cannot naturally perceive the capabilities of tools, file status, and execution results on different devices. Users need to manually switch between different machines, copy data, synchronize files, or supplement the context.

[0078] Taking software development, automated testing, code review, and remote server operation as examples, a task may simultaneously depend on a local IDE, remote test machine, encryption machine, build machine, database, or business intranet environment. Traditional Claude Code is more like an intelligent assistant running on a single device. When facing such cross-device tasks, it is prone to problems such as fragmented device context, invisible tool capabilities, out-of-sync file states, and the need for manual transfer of execution results. Claude Code represents a terminal-based AI programming assistant. A local IDE represents a local integrated development environment.

[0079] This disclosure utilizes the native MCP tool access method to register tool capabilities from different devices or environments with the Claude Agent via a client. Dual WebSocket channels are used to carry tool call signaling and file synchronization data, respectively. For the Claude Agent, tool capabilities on each device are exposed in a unified MCP tool format. The Agent does not need to be aware of which device the tool is actually deployed on, nor does it require users to manually explain the device switching process, thus achieving seamless awareness and unified scheduling of multi-device execution environments.

[0080] Application scenarios include large-scale model agent-assisted software development, automated testing, remote server operation, code review, and other scenarios that require cross-device access to tools, files, and execution environments.

[0081] Figure 6 This is a schematic diagram illustrating an exemplary implementation of an intelligent agent tool invocation method disclosed herein, such as... Figure 6 As shown, the intelligent agent tool invokes a method executed by the client, which includes the following steps: S601 receives tool execution instructions carrying request identifiers sent by the server through the tool execution channel.

[0082] The server receives a tool invocation request from the agent. This request includes a session identifier and the identifier of the tool to be invoked. Based on the tool invocation request, the full-duplex WebSocket communication channel, and the coordination state of the WebSocket channel, the server sends a tool execution instruction carrying the request identifier to the client. The WebSocket channel consists of two independent full-duplex communication channels between the server and client: one for tool execution and one for file synchronization. The client receives the tool execution instruction carrying the request identifier from the server through the tool execution channel.

[0083] S602, according to the tool execution instructions, calls the tool in the local environment to execute the tool execution instructions and obtain the execution results.

[0084] The client parses the tool execution instructions sent to it, schedules the corresponding tool program to run the instructions based on the local runtime environment, and collects the complete output after the program finishes running, and organizes it into standardized tool execution results.

[0085] S603 sends the execution result, carrying the request identifier, to the server through the tool execution channel.

[0086] The client transmits a data packet containing a unique request identifier to the server through the tool execution channel, thus completing the receipt reporting.

[0087] In this embodiment, dual-channel parallel collaborative scheduling isolates tool execution from file data streams, preventing data congestion and packet corruption, and ensuring the orderly, stable, and efficient execution of the tool invocation process. Separating tool invocation signaling from file entity streams avoids the impact of large file synchronization on Agent tool invocation response, improves the efficiency of agent tool invocation, reduces the delay in Agent obtaining execution results, and improves the efficiency and accuracy of continuous inference and subsequent action planning.

[0088] Optionally, in this embodiment of the disclosure, asynchronous communication based on message queues can use a remote dictionary server Redis, a distributed event streaming platform Kafka, or other message queue tools to deliver requests, execution results, and file synchronization events. This solution has good peak-shaving capabilities.

[0089] Figure 7 This is a schematic diagram illustrating an exemplary implementation of an intelligent agent tool invocation method disclosed herein, such as... Figure 7 As shown, the intelligent agent tool invokes a method executed by the client, which includes the following steps: S701 calls the file system monitoring component to monitor local data files in order to obtain the status of file change events and the push path of file change events.

[0090] The following describes the bidirectional real-time synchronization mechanism for documents disclosed herein.

[0091] The client uses a file system monitoring component to continuously monitor the local working directory, capturing file change events such as file creation, modification, deletion, and movement, as well as the status of the push path for these file change events.

[0092] like Figure 8 As shown, to avoid repeated uploads triggered by the same file's repeated events within a short period, a differentiated debouncing strategy is adopted: the debouncing window for creation and deletion events is short (e.g., about 100ms), while the debouncing window for modification events is longer (e.g., about 300ms). Temporary files, system hidden files, and the compilation cache directory are also filtered to avoid invalid synchronization.

[0093] The two-way real-time synchronization mechanism allows files modified by the Agent to automatically appear on the user's local machine, while also ensuring that changes made locally by the user are promptly reflected back to the server Agent.

[0094] S702 determines whether to upload the file change event to the server based on the status of the push path of the file change event.

[0095] In some implementations, in response to receiving a push file from the server via the file synchronization channel, the local data file is updated according to the push file, and the push path of the push file is marked as a silent update state. In response to the file system monitoring component detecting a file change event on the push path and recognizing that the push path is in a silent update state, the upload of the file change event is skipped.

[0096] The silent update marking mechanism disclosed herein is described below, such as... Figure 8 As shown, when the server pushes file changes to the client from the file synchronization channel, the client marks that path as "silent update state" before writing the file. When the file system monitoring component detects a change event in this path, it recognizes the silent mark and skips the upload, thus avoiding the infinite loop of "server push → client write → client detects change → upload to server again". The mark is automatically cleared after a delay after the file is written, ensuring that subsequent real user modifications can trigger synchronization normally, thereby avoiding the loop of synchronous file upload.

[0097] In some implementations, the push path for file change events is not in a silent update state, and the file change event is determined to be uploaded to the server.

[0098] S703, in response to determining that a file change event has been uploaded to the server, sends the change operation and the changed data file associated with the file change event to the server through the file synchronization channel, so as to instruct the server to synchronize and update the data file.

[0099] Optionally, to enhance data security, each file transfer includes a hash digest (MD5) of the file content. Before writing, the receiver recalculates the hash of the received content and compares it with the transmitted value. If the hashes do not match, the write operation is rejected, and a failure acknowledgment is returned to the sender. This ensures file integrity. Specifically, when the server pushes file changes to the client from the file synchronization channel, the client is the receiver, and the server is the sender. When the client uploads a file change event to the server, the server is the receiver, and the client is the recipient.

[0100] The operation confirmation mechanism disclosed herein is described below. Each file operation carries a unique operation identifier. After the receiver completes the operation, it sends a confirmation message to the sender. The sender maintains a status tracking table for all operations to be confirmed and provides a synchronous status query interface to the outside world.

[0101] This disclosure exposes tool capabilities across multiple devices to ClaudeAgent via native MCP tool access, and then separates tool call signaling from file synchronization data through dual WebSocket channels. Clients on each device register their local tools as MCP tools. The server-side tool proxy module aggregates these tool capabilities by session and provides them to the Claude Agent. When the Claude Agent initiates a tool call, it only performs inference and invocation through the unified MCP tool interface. The server forwards the request to the corresponding device for execution based on the tool's binding relationship with the device, and returns the result through the tool execution channel. File content, code changes, log files, and test artifacts are not transmitted through the MCP tool call chain, but rather through an independent file synchronization channel.

[0102] In this solution, device differences are shielded by the MCP tool layer and the server-side routing layer. The Claude Agent does not need to know whether the tool is actually running on a local development machine, a remote test machine, or another business server, nor does it require the user to repeatedly describe the device switching process in the conversation. This solution can be applied to scenarios such as local code repository analysis and modification, cross-machine automated testing, remote command execution, encrypted test data generation, log reading, and code review.

[0103] The following describes the large file chunking transfer mechanism disclosed herein.

[0104] like Figure 9 As shown, a chunked transmission protocol is designed to address the default limitation on the size of a single WebSocket message. Files with a size equal to or smaller than the threshold are transmitted directly in a single-message mode.

[0105] When the file size exceeds a preset threshold (e.g., 5MB), the trigger condition is met, and large file chunk transmission is required. In this embodiment, after the trigger condition is met, the file automatically switches to chunk transmission mode. The file is divided according to preset chunking parameters, for example, each chunk is a fixed size of 512KB, and the file is divided into several chunks in sequence.

[0106] The transmission process is as follows: After detecting that the file size exceeds a threshold, the sender generates a unique file transfer identifier, calculates the total number of blocks, and sends the file transfer identifier block by block (each block carries the file transfer identifier, current block number, total number of blocks, block content encoding, and target file path). The receiver caches each block in a temporary storage area. Upon receiving the last block, it merges all blocks according to their sequence numbers, calculates a hash digest for the merged complete file, and verifies it. If the verification passes, it atomically writes the file to the target path. For example, it first writes the file to a temporary file and then moves it to the target path using an atomic replacement operation to avoid the file being read midway through the write process. Finally, it sends an operation completion confirmation to the sender.

[0107] Furthermore, the system extends the default message size limit of the WebSocket framework, supporting single messages up to 100MB on the client side and up to 50MB on the server side, breaking through the framework's default 1MB limit and extending the message size limit.

[0108] File chunking protocol can avoid the single message size limit of WebSocket, ensuring reliable transmission of large files such as log files, test reports, and compressed packages.

[0109] This disclosure extends Claude Code-like products from standalone intelligent units into intelligent execution systems capable of sensing multiple devices and environments. It enhances cross-device task completion capabilities; traditional Claude Code is better suited for code editing, command execution, and file reading within a single workspace. This disclosure unifies the tool capabilities of local development machines, remote testing machines, encryption machines, build machines, and other devices into an MCP tool, enabling Claude to continuously invoke capabilities from different devices within a single task, reducing the need for users to manually switch between multiple machines.

[0110] This disclosure reduces user operational costs, eliminating the need for users to repeatedly specify which machine to execute commands on, where to copy results from, and which file to paste them into. The server selects devices through device capability profiling and tool routing, providing Claude with a unified tool list; users only need to describe their task objectives.

[0111] This disclosure can improve the efficiency of automated testing and development. In scenarios such as interface testing, risk control testing, code building, and log investigation, tasks often need to be completed across multiple machines. This disclosure allows Claude to automatically complete a series of steps, including generating test data, executing scripts, reading logs, modifying files, and re-executing verification, reducing manual data handling and manual result recording.

[0112] This disclosure enhances the adaptability of enterprise intranets and private environments, as many enterprise tools, databases, test machines, or encryption services cannot be directly exposed to the public network. This disclosure allows tools to run within their original devices or network environments, registering only the standardized MCP tool capabilities with Claude, thus balancing tool callability and environment isolation.

[0113] This disclosure ensures the real-time nature of tool invocation. With the separation of the tool execution channel and the file synchronization channel, file streams such as large logs, code packages, and test reports will not crowd out the MCP tool invocation signaling. Claude can obtain the tool execution results in a timely manner and continue to the next round of inference and scheduling.

[0114] This disclosure can improve product scalability. When adding new devices or tools, the client only needs to register the capabilities using the MCP method, and the server can incorporate them into a unified device capability profile without needing to modify the Claude main process for each device.

[0115] Compared to existing local IDE plug-in agents, cloud sandbox agents, or ordinary remote command execution products, the advantage of this disclosure is not only remote command execution, but also that it allows Claude to obtain multi-device tool views in a seamless manner and maintain the consistency of tool invocation, file synchronization, and session state through a dual-channel mechanism.

[0116] Figure 10 This is a schematic diagram of an intelligent agent tool invocation device according to an exemplary embodiment of the present disclosure, such as... Figure 10 As shown, the intelligent agent tool invocation device 1000 disclosed herein is deployed on the server side and includes: The receiving module 1010 is used to receive a tool invocation request sent by the intelligent agent. The tool invocation request includes a session identifier and a tool identifier to be invoked. The processing module 1020 is used to send a tool execution instruction carrying a request identifier to the client based on the tool call request, the full-duplex communication WebSocket channel, and the coordination status of the WebSocket channel. The WebSocket channel consists of two independent full-duplex communication WebSocket channels between the server and the client, including the tool execution channel and the file synchronization channel. The receiving module 1010 is also used to receive the execution result sent by the client, and the execution result carries a request identifier.

[0117] In some implementations, the processing module 1020 is further configured to: The verification is performed based on the session identifier and the tool identifier. If the target session corresponding to the session identifier exists and the tool has been registered based on the tool registration message and the tool identifier, the verification is considered successful. Generate a request identifier and create an asynchronous placeholder object corresponding to the request identifier, and store it in the pending response mapping table; Based on the coordination state of the WebSocket channel, a tool execution command carrying a request identifier is sent to the client through the tool execution channel.

[0118] In some implementations, the processing module 1020 is further configured to: Based on the request identifier, establish an association between the execution result and the asynchronous placeholder object to support the server in querying the execution result based on the asynchronous placeholder object.

[0119] In some implementations, the processing module 1020 is further configured to: In response to a tool instruction being read-only or a status query type, a tool execution instruction carrying a request identifier is sent directly to the client through the tool execution channel; or, In response to the file synchronization channel transmitting data files, the channel status of the file synchronization channel is determined to be in the first state. Non-urgent tool execution instructions within the same session are temporarily stored in the waiting queue until the file synchronization channel responds with an indication message that the file transmission is complete. At this point, the channel status of the file synchronization channel is determined to be in the second state, and tool execution instructions carrying request identifiers are continued to be sent to the client through the tool execution channel.

[0120] In some implementations, the processing module 1020 is further configured to: The session state is determined based on the number of concurrent processes corresponding to the current session. In response to a specified session state, a tool execution command containing a request identifier is sent to the client based on the tool invocation request, the full-duplex communication WebSocket channel, and the coordination state of the WebSocket channel.

[0121] In some implementations, the processing module 1020 is further configured to: Receive channel establishment information sent by the client, which includes session identifier, startup path and user information; Based on the channel establishment information, two independent full-duplex WebSocket communication channels are established between the server and the client.

[0122] In some implementations, the processing module 1020 is further configured to: Through the tool execution channel, the system receives tool registration information sent by the client and maintains the device capability profile corresponding to the session identifier based on the tool registration information.

[0123] This disclosure receives a tool invocation request sent by an agent. The tool invocation request includes a session identifier and a tool identifier to be invoked. Based on the tool invocation request, the full-duplex communication WebSocket channel, and the coordination state of the WebSocket channel, a tool execution instruction carrying a request identifier is sent to the client. By separating the tool invocation signaling and the file entity stream, the impact of large file synchronization on the agent's tool invocation response can be avoided, thereby improving the efficiency of agent tool invocation, reducing the delay in the agent obtaining execution results, and improving the efficiency and accuracy of continuous inference and subsequent action planning.

[0124] Figure 11 This is a schematic diagram of an intelligent agent tool invocation device according to an exemplary embodiment of the present disclosure, such as... Figure 11 As shown, the intelligent agent tool invocation device 1100 disclosed herein, deployed on a client, includes: The receiving module 1110 is used to receive a tool execution instruction carrying a request identifier sent by the server through the tool execution channel; Processing module 1120 is used to call the tool to execute the tool execution instructions in the local environment according to the tool execution instructions, and obtain the execution results; The sending module 1130 is used to send the execution result carrying the request identifier to the server through the tool execution channel.

[0125] In some embodiments, the processing module 1120 is further configured to: Call the file system monitoring component to monitor local data files in order to obtain the status of file change events and the push path of file change events; Based on the status of the push path of the file change event, determine whether to upload the file change event to the server; In response to the confirmation that a file change event has been uploaded to the server, the change operation and the changed data file associated with the file change event are sent to the server through the file synchronization channel to instruct the server to synchronize and update the data file.

[0126] In some embodiments, the processing module 1120 is further configured to: In response to receiving a push file from the server via the file synchronization channel, update the local data file according to the push file, and mark the push path of the push file as a silent update state; In response to the file system monitoring component detecting a file change event in the push path and recognizing that the push path is in a silent update state, the upload of the file change event is skipped.

[0127] In this embodiment, dual-channel parallel collaborative scheduling isolates tool execution from file data streams, preventing data congestion and packet corruption, and ensuring the orderly, stable, and efficient execution of the tool invocation process. Separating tool invocation signaling from file entity streams avoids the impact of large file synchronization on Agent tool invocation response, improves the efficiency of agent tool invocation, reduces the delay in Agent obtaining execution results, and improves the efficiency and accuracy of continuous inference and subsequent action planning.

[0128] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.

[0129] Figure 12A schematic block diagram of an example electronic device 1200 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0130] like Figure 12 As shown, device 1200 includes a computing unit 1201, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1202 or a computer program loaded from storage unit 1208 into random access memory (RAM) 1203. The RAM 1203 may also store various programs and data required for the operation of device 1200. The computing unit 1201, ROM 1202, and RAM 1203 are interconnected via bus 1204. Input / output (I / O) interface 1205 is also connected to bus 1204.

[0131] Multiple components in device 1200 are connected to I / O interface 1205, including: input unit 1206, such as keyboard, mouse, etc.; output unit 1207, such as various types of monitors, speakers, etc.; storage unit 1208, such as disk, optical disk, etc.; and communication unit 1209, such as network card, modem, wireless transceiver, etc. Communication unit 1209 allows device 1200 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0132] The computing unit 1201 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1201 performs the various methods and processes described above, such as the agent tool invocation method. For example, in some embodiments, the agent tool invocation method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 1208. In some embodiments, part or all of the computer program may be loaded and / or installed on device 1200 via ROM 1202 and / or communication unit 1209. When the computer program is loaded into RAM 1203 and executed by the computing unit 1201, one or more steps of the agent tool invocation method described above may be performed. Alternatively, in other embodiments, the computing unit 1201 may be configured to execute agent tool invocation methods by any other suitable means (e.g., by means of firmware).

[0133] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0134] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0135] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0136] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0137] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0138] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0139] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0140] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A method for invoking an intelligent agent tool, wherein, Executed by the server, including: Receive a tool invocation request sent by the intelligent agent, wherein the tool invocation request includes a session identifier and a tool identifier to be invoked; Based on the tool invocation request, the full-duplex communication WebSocket channel, and the coordination state of the WebSocket channel, a tool execution instruction carrying a request identifier is sent to the client. The WebSocket channel consists of two independent full-duplex communication WebSocket channels between the server and the client, including a tool execution channel and a file synchronization channel. Receive the execution result sent by the client, the execution result carrying the request identifier.

2. The method according to claim 1, wherein, The step of sending a tool execution instruction carrying a request identifier to the client based on the tool invocation request, the full-duplex communication WebSocket channel, and the coordination state of the WebSocket channel includes: The verification is performed based on the session identifier and the tool identifier. If the target session corresponding to the session identifier exists and the tool is determined to be registered based on the tool registration message and the tool identifier, the verification is confirmed to be successful. Generate a request identifier and create an asynchronous placeholder object corresponding to the request identifier, and store it in the pending response mapping table; Based on the coordination state of the WebSocket channel, a tool execution instruction carrying a request identifier is sent to the client through the tool execution channel.

3. The method according to claim 2, wherein, After receiving the execution result sent by the client, the process further includes: Based on the request identifier, an association is established between the execution result and the asynchronous placeholder object, so that the server can query the execution result based on the asynchronous placeholder object.

4. The method according to claim 2 or 3, wherein, The step of sending a tool execution instruction carrying a request identifier to the client through the tool execution channel based on the coordination state of the WebSocket channel includes: In response to the tool instruction being read-only or status query type, the tool execution instruction carrying a request identifier is directly sent to the client through the tool execution channel; or, In response to the file synchronization channel being used to transfer data files, the channel status of the file synchronization channel is determined to be in the first state. Non-urgent tool execution instructions within the same session are temporarily stored in the waiting queue until the file synchronization channel responds with an indication message indicating that the file transfer is complete. The channel status of the file synchronization channel is then determined to be in the second state, and a tool execution instruction carrying a request identifier is sent to the client through the tool execution channel.

5. The method according to any one of claims 1-3, wherein, The step of sending a tool execution instruction containing a request identifier to the client based on the tool invocation request, the full-duplex communication WebSocket channel, and the coordination state of the WebSocket channel includes: The session state is determined based on the number of concurrent processes corresponding to the current session. In response to the session state being a specified state, a tool execution instruction containing a request identifier is sent to the client based on the tool invocation request, the full-duplex communication WebSocket channel, and the coordination state of the WebSocket channel.

6. The method according to any one of claims 1-3, wherein, Before receiving the tool invocation request sent by the intelligent agent, the method further includes: Receive channel establishment information sent by the client, the channel establishment information including the session identifier, startup path and user information; Based on the channel establishment information, two independent full-duplex WebSocket communication channels are established between the server and the client.

7. The method according to claim 2 or 3, wherein, After establishing two independent full-duplex WebSocket communication channels between the server and the client, the method further includes: The tool execution channel receives tool registration information sent by the client and maintains the device capability profile corresponding to the session identifier based on the tool registration information.

8. A method for invoking an intelligent agent tool, wherein, Executed by the client, including: Through the tool execution channel, receive tool execution instructions sent by the server, which carry a request identifier; According to the tool execution instructions, the tool is invoked in the local environment to execute the tool execution instructions and obtain the execution results; The execution result, carrying the request identifier, is sent to the server via the tool execution channel.

9. The method according to claim 8, wherein, Also includes: Call the file system monitoring component to monitor local data files in order to obtain file change events and the status of the push path of the file change events; Based on the status of the push path of the file change event, determine whether to upload the file change event to the server; In response to determining that the file change event has been uploaded to the server, the change operation and the changed data file associated with the file change event are sent to the server through the file synchronization channel to instruct the server to synchronize and update the data file.

10. The method according to claim 9, wherein, Also includes: In response to receiving a push file from the file synchronization channel from the server, the local data file is updated according to the push file, and the push path of the push file is marked as a silent update state; In response to the file system monitoring component detecting a file change event in the push path and identifying that the push path is in a silent update state, the upload of the file change event is skipped.

11. A device for invoking intelligent agent tools, wherein, Deployed on the server side, including: The receiving module is used to receive a tool invocation request sent by the intelligent agent, wherein the tool invocation request includes a session identifier and a tool identifier to be invoked; The processing module is used to send a tool execution instruction carrying a request identifier to the client based on the tool call request, the full-duplex communication WebSocket channel, and the coordination status of the WebSocket channel. The WebSocket channel consists of two independent full-duplex communication WebSocket channels between the server and the client, including a tool execution channel and a file synchronization channel. The receiving module is further configured to receive the execution result sent by the client, the execution result carrying the request identifier.

12. A device for invoking intelligent agent tools, wherein, Deployed on the client side, including: The receiving module is used to receive tool execution instructions carrying a request identifier sent by the server through the tool execution channel; The processing module is used to call the tool to execute the tool execution instructions in the local environment according to the tool execution instructions, and obtain the execution results; The sending module is used to send the execution result carrying the request identifier to the server through the tool execution channel.

13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7, or the method of any one of claims 8-10.

14. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-7, or to perform the method according to any one of claims 8-10.

15. A computer program product comprising a computer program that, when executed by a processor, implements the steps of the method according to any one of claims 1-7, or implements the steps of the method according to any one of claims 8-10.