A data processing method and device based on a file system form AI agent

CN122837859APending Publication Date: 2026-09-29WUHAN YINGFENG JUZHI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611350722.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-02
Publication Date
2026-09-29

AI Technical Summary

Technical Problem

3)智能体内部结构对非开发者不透明;

Benefits of technology

本申请创新性地引入基于文件系统的AI智能体部署/运行方式,定义了独立于任何特定运行时的智能体打包格式标准,使得AI智能体具备即插即用的可移植性和透明可审计性,并通过文件系统原语自然支持层级协作与安全控制,良好地克服了现有技术缺陷。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122837859A_ABST
    Figure CN122837859A_ABST
Patent Text Reader

Abstract

The application provides a data processing method and device based on an AI agent in the form of a file system, innovatively introduces an AI agent deployment / running mode based on a file system, defines an agent packaging format standard independent of any specific runtime, enables the AI agent to have portability and transparent auditability, and naturally supports hierarchical cooperation and security control through file system primitives, thereby overcoming the defects of the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence, specifically to a data processing method and apparatus for AI intelligent agents based on a file system. Background Technology

[0002] With the widespread application of Large Language Model (LLM) and Artificial Intelligence (AI Agent) technologies, developers face increasingly complex system integration challenges: heterogeneous application programming interfaces (APIs), fragmented tool ecosystems, and opaque black-box execution processes. Therefore, how to uniformly manage, audit, and distribute the configuration, skills, memory, knowledge, and other components of AI agents has become an urgent problem to be solved in this field.

[0003] In existing technologies, AI agent development mainly relies on code framework solutions such as LangChain, AutoGPT, and MetaGPT. Developers introduce framework dependency libraries and assemble prompt templates, tool call chains, and memory storage backends in the code to form runnable agent programs. Under this approach, agent configurations are scattered across code files and environment variables, and the agent's behavior is defined by program logic. This approach has the following drawbacks that limit the practical application value of AI agents: 1) The AI ​​agent is tightly coupled with the codebase and lacks self-descriptive capabilities; 2) Sharing intelligent agents requires a complete development environment deployment; 3) The internal structure of the intelligent agent is not transparent to non-developers; 4) Lack of a unified packaging format standard. Summary of the Invention

[0004] This application provides a data processing method and apparatus for AI agents based on a file system. It innovatively introduces a file system-based deployment / operation mode for AI agents, defines an agent packaging format standard that is independent of any specific runtime, and enables AI agents to have plug-and-play portability and transparent auditability. Furthermore, it naturally supports hierarchical collaboration and security control through file system primitives, effectively overcoming the shortcomings of existing technologies.

[0005] Firstly, this application provides a data processing method for AI agents based on a file system, the method comprising: Obtain the AI ​​agent deployment tasks that need to be executed for the target AI agent; The target AI agent is obtained by packaging the target folder under a standardized file directory structure. In the standardized file directory structure, the configuration directory contains metadata files, system prompt words files, skill directory, long-term memory directory, knowledge base directory, runtime state directory, graphical interface resource directory, backend service directory, and log directory. The metadata files contain basic information about the agent, the system prompt words files contain core behavioral instructions for the agent, the skill directory contains skill files, the long-term memory directory contains persistent agent information, the knowledge base directory contains a read-only knowledge base, the runtime state directory contains runtime information, the graphical interface resource directory contains front-end graphical interface resource information, the backend service directory contains backend service code, and the log directory contains work logs. Store the target folder in the specified deployment location of the AI ​​agent deployment task and run it to complete the deployment of the target AI agent.

[0006] Secondly, this application provides a data processing device for an AI agent based on a file system, the device comprising: The task acquisition unit is used to acquire the AI ​​agent deployment tasks that need to be executed currently for the target AI agent. The data acquisition unit is used to acquire the target AI agent packaged into a target folder under a standardized file directory structure. In the standardized file directory structure, the configuration directory contains metadata files, system prompt words files, skill directory, long-term memory directory, knowledge base directory, runtime state directory, graphical interface resource directory, backend service directory, and log directory. The metadata files contain basic information about the agent, the system prompt words files contain core behavioral instructions for the agent, the skill directory contains skill files, the long-term memory directory contains persistent agent information, the knowledge base directory contains a read-only knowledge base, the runtime state directory contains runtime information, the graphical interface resource directory contains front-end graphical interface resource information, the backend service directory contains backend service code, and the log directory contains work logs. The deployment unit is used to store the target folder in the specified deployment location of the AI ​​agent deployment task and run it to complete the deployment of the target AI agent.

[0007] Thirdly, this application provides a processing system for performing the method provided in the first aspect of this application.

[0008] Fourthly, this application provides a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute the method provided in the first aspect of this application.

[0009] From the above, it can be concluded that this application has the following beneficial effects: This application innovatively introduces a file system-based AI agent deployment / operation method, defines an agent packaging format standard independent of any specific runtime, enables AI agents to have plug-and-play portability and transparent auditability, and naturally supports hierarchical collaboration and security control through file system primitives, effectively overcoming the shortcomings of existing technologies. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a flowchart illustrating a data processing method for an AI agent based on a file system, as described in this application. Figure 2 This is a schematic diagram of a data processing device for an AI intelligent agent based on a file system, as described in this application. Figure 3 This is a schematic diagram of the processing equipment involved in the processing system of this application. Detailed Implementation

[0012] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0013] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those explicitly listed, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products, or devices. The naming or numbering of steps appearing in this application does not imply that the steps in the method flow must be performed in the chronological / logical order indicated by the naming or numbering. The execution order of named or numbered process steps can be changed according to the desired technical purpose, as long as the same or similar technical effect is achieved.

[0014] The module division described in this application is a logical division. In practical applications, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual coupling, direct coupling, or communication connections may be through interfaces, and the indirect coupling or communication connections between modules may be electrical or other similar forms, none of which are limited in this application. Moreover, the modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed across multiple circuit modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution in this application.

[0015] Before introducing the data processing method for AI agents based on a file system format provided in this application, we will first introduce the background content involved in this application.

[0016] The data processing method, apparatus, and computer-readable storage medium for AI agents based on a file system provided in this application can be applied to processing systems to innovatively introduce a file system-based deployment / operation mode for AI agents. It defines an agent packaging format standard that is independent of any specific runtime, enabling AI agents to have plug-and-play portability and transparent auditability. Furthermore, it naturally supports hierarchical collaboration and security control through file system primitives, effectively overcoming the shortcomings of existing technologies.

[0017] In this context, runtime specifically refers to the sum of the underlying environment, infrastructure, and context that support program execution. For existing technologies, the definition of an agent depends on a specific runtime environment; the logic code of the same agent can exhibit completely different capability boundaries and interaction patterns in different runtime environments. This is a major deficiency in existing technologies that the agent packaging format standard proposed in this application can overcome.

[0018] The data processing method for AI agents based on a file system mentioned in this application can be executed by a data processing device for AI agents based on a file system, or a processing system integrating such a data processing device. This processing system can include different types of processing devices such as servers, physical hosts, or even user equipment (UE). The user request processing device based on the AI ​​agent can be implemented in hardware or software. Specifically, the UE can be a smartphone, tablet, laptop, desktop computer, or personal digital assistant (PDA) or other terminal device. The processing system can be configured as a device cluster.

[0019] As an application example of the solution proposed in this application, the processing system can be a specific device node or any device within the company that is specifically responsible for executing the AI ​​agent deployment task. Through the solution proposed in this application, the deployment of AI agents can be achieved in a convenient, low-cost and high-quality manner. Furthermore, due to the file system-based AI agent operation mode introduced in this application, the deployed AI agents can also achieve better performance.

[0020] As another example, the processing system can be a corresponding device node or any device responsible for executing the AI ​​agent deployment task when the company provides AI agent application services to external parties. Alternatively, the processing system can also be a user-side device, which can be installed by the user or by a third party to enjoy the AI ​​agent application services provided by the company.

[0021] Clearly, the specific application scenarios involved in this application are quite flexible, including both internal and external applications (and may also involve commercial applications).

[0022] Furthermore, the AI ​​agent involved in this application can be either a general-purpose agent or a specialized agent, that is, an agent specifically configured for a particular application direction / scenario.

[0023] Taking database (or server) performance testing as an example, the AI ​​agent involved in this application can be used to perform database performance testing under specific test benchmarks to meet the performance testing needs of database products.

[0024] As another example, intelligent agents can also serve as intelligent image (specifically, pictures) processing assistants / tools, providing more user-friendly and intelligent image processing services based on AI intelligent agents.

[0025] In this context, it is clear that the specific application direction / scenario corresponding to a specialized intelligent agent can be adaptively configured according to the specific circumstances in practical applications.

[0026] As for the basic application services that the AI ​​agent itself can provide, it is easy to understand and is not the focus of this application. The focus of this application is how to deploy and run them under the innovative intelligent agent packaging format standard.

[0027] The following section introduces the data processing method for AI agents based on a file system, as provided in this application.

[0028] First, refer to Figure 1 , Figure 1 This paper illustrates a flowchart of a data processing method for an AI agent based on a file system, as described in this application. The data processing method for an AI agent based on a file system provided in this application may specifically include the following steps S101 to S103: Step S101: Obtain the AI ​​agent deployment task that needs to be executed for the target AI agent; Understandably, in relation to the deployment of AI agents, the processing of this application can be triggered by the deployment task of the AI ​​agent.

[0029] The AI ​​agent deployment task can be initiated manually, autonomously by the system under the corresponding task autonomous initiation strategy, or forwarded by other devices.

[0030] Task information can indicate the target AI agent for this task in a direct or indirect manner. In addition, it can also indicate the method of obtaining the target folder according to application requirements (corresponding to subsequent steps).

[0031] Furthermore, in response to the operational or application requirements of the target AI agent after deployment, the deployment task of the AI ​​agent itself can also be included as a subtask in the work tasks based on the target AI agent.

[0032] Step S102: Obtain the target folder of the target AI agent packaged under a standardized file directory structure. In the standardized file directory structure, the configuration directory contains metadata files, system prompt words files, skill directory, long-term memory directory, knowledge base directory, runtime state directory, graphical interface resource directory, backend service directory, and log directory. The metadata files contain basic information of the agent, the system prompt words files contain core behavioral instructions of the agent, the skill directory contains skill files, the long-term memory directory contains persistent agent information, the knowledge base directory contains a read-only knowledge base, the runtime state directory contains runtime information, the graphical interface resource directory contains front-end graphical interface resource information, the backend service directory contains backend service code, and the log directory contains work logs. As can be seen, this application innovatively introduces a file system-based AI agent deployment / running method and specifically defines an agent packaging format standard that is independent of any particular runtime, namely the standardized file directory structure configuration involved here.

[0033] In layman's terms, in the AI ​​agent packaging format based on a standardized directory structure defined in this application, a folder that conforms to the standard represents a complete AI agent. This folder contains a configuration directory, and all components of the agent are stored in the configuration directory as readable and writable ordinary files.

[0034] As an example, this configuration directory can be configured as a hidden directory named .agent.

[0035] This configuration directory contains specific files / directories such as metadata files, system prompt word files, skill directory, long-term memory directory, runtime state directory, graphical interface resource directory, backend service directory, and log directory.

[0036] Metadata files (which can be named agent.json) and system prompt files (which can be named system_prompt.md) are required files.

[0037] The skill directory, long-term memory directory, runtime state directory, graphical interface resource directory, backend service directory, and log directory constitute optional files / directories. In specific applications, optional configuration methods can be adopted. Correspondingly, unselected files / directories can be set to empty files / directories, hidden, ignored, or simply not exist.

[0038] Furthermore, the metadata file records basic agent information in JSON format, which may include information / fields such as name, version number, function description, standard version followed, minimum runtime version requirement, dependency declaration, UI window configuration (related to the graphical interface resource directory) and backend service configuration (related to the backend service directory).

[0039] UI stands for User Interface.

[0040] The system prompt word file is in Markdown format and can contain the core behavioral instructions of the agent. It is loaded as the initial system message of the dialogue and can support variable substitution in the format of variable_name.

[0041] The skills directory (which can be named skills) contains skill files, specifically storing standalone executable files or subdirectories that conform to skill specifications. For example, standard skills such as file reading (can be named read_file), file writing (can be named write_file), directory traversal (can be named list_directory), file searching (can be named search_files), directory scanning (list_subagents), and task delegation (can be named invoke_subagent) are automatically scanned, registered, and exposed to the large language model, supporting hot updates.

[0042] The long-term memory directory (which can be named memory) stores agent information that needs to be persisted. Agents can read and write this information, which includes user preferences, a structured fact database, and a dialogue history subdirectory (which can be named conversation).

[0043] The knowledge base directory (which can be named "knowledge") contains a read-only knowledge base directory, such as reference knowledge for image processing parameters. The agent can only read it, and writing to it is prevented at runtime.

[0044] The runtime / transient state directory (which can be named state) contains runtime / transient information (here referring to the runtime mentioned earlier, which is the sum of the underlying environment, infrastructure and context that support the program's operation; the content can be lost after a restart; it is also used to implement mutex locks to prevent the same directory from being accessed by multiple processes at the same time).

[0045] The graphical interface resource directory (which can be named ui) contains front-end graphical interface resource information. Specifically, it can store front-end resources of types such as HTML, CSS, or JS, such as front-end main page resources (which can be named index.html), style sheet resources (which can be named style.css), and front-end logic resources (which can be named main.js).

[0046] The backend service directory (which can be named backend) stores the backend service code that comes with the agent. It can be any programming language, such as the backend service code (which can be named server.py) and dependency declarations (which can be named requirements.txt).

[0047] The log directory (which can be named logs) contains work logs, specifically recording events in JSON Lines format, with each line containing at least the timestamp, log level, and event type fields.

[0048] Thus, under the complete self-describing agent packaging structure formed above, the target AI agent can be run compatiblely by different manufacturers, just as an HTML file can be opened by different browsers. Moreover, the agent does not depend on a centralized repository, and can even be shared by copying a folder.

[0049] It also boasts a high degree of transparency and auditability. All components of the agent are stored in the form of ordinary files, such as prompts in Markdown files, configurations in JSON files, and skills in executable scripts. Users can directly view the agent's internal workings using file managers and text editors without any special tools, making operation and management very convenient.

[0050] Step S103: Store the target folder in the specified deployment location of the AI ​​agent deployment task and run it to complete the deployment of the target AI agent.

[0051] After obtaining the target folder of the target AI agent through real-time configuration or existing data extraction, it can be stored in the deployment location directly or indirectly specified by the AI ​​agent deployment task, such as locally, and then loaded to enable the operation of the agent. In this way, the current AI agent deployment task can be completed, and the deployment of the target AI agent can be completed, laying the foundation for subsequent application services based on the target AI agent.

[0052] This may also involve data transfer operations through third-party platforms / channels. For example, the deployer can download the target folder through a code hosting platform when triggered by this application scheme.

[0053] As mentioned earlier, for the target AI agent after deployment, the method of this application may also include further application service processing or data analysis processing based on the target AI agent, depending on the actual situation.

[0054] Taking database performance testing as an example, if the target AI agent is specifically used to perform database performance testing, or in other words, the AI ​​agent deployment task is specifically a database performance testing deployment task, then the method of this application may further include the following after step S103: Based on the corresponding test benchmarks, database performance tests are performed on the target database by the target AI agent; Output the performance test results of the target database.

[0055] Furthermore, it is understandable that the dynamic processing of solutions such as deploying the target AI agent or performing performance testing on the target database may also involve corresponding output processing.

[0056] In specific dynamic output operations, the solutions may involve local storage, off-site storage, result display, result push, result forwarding, output completion notifications, or further data processing and analysis. These can be adaptively handled according to the specific output strategies configured in advance and in real time.

[0057] The output process can involve both the device's own configuration and external configuration. Taking result display as an example, content can be displayed through the device's own display screen (including touch screen), or through an external display device or other devices with a display screen. This is quite flexible.

[0058] At the same time, this application also considers situations where multiple agents may be involved in specific applications.

[0059] In further optimization settings, if the target AI agent contains multiple agents, the hierarchical calling relationship between the multiple agents can be naturally expressed through the parent-child relationship of the directory tree. The parent agent discovers its child agents by scanning the configuration directories contained in its own directory. The parent agent drives the child agents in its directory to perform corresponding tasks by delegating tasks, and obtains the task execution results returned by the child agents.

[0060] Specifically, in the agent configuration of this application, hierarchical agent collaboration can be achieved through folder nesting.

[0061] The hierarchical calling relationships between multiple agents are naturally expressed through the parent-child relationship of the operating system's directory tree, and the subfolders containing configuration directories (such as the hidden directory named .agent mentioned above) are the child agents. The parent agent uses the directory scanning skill (which can be named list_subagents) provided by the skill directory to scan the contained configuration directories to discover child agents (specifically, it can be configured with a single-level and non-recursive constraint), and then uses the task delegation skill (which can be named invoke_subagent) provided by the configuration directory to delegate tasks to the child agents. During execution, the child agents can read and write their own long-term memory directory, knowledge base directory, and runtime state directory, and return the processing results to the parent agent after execution.

[0062] In addition, for the aforementioned hierarchical collaboration, this application can also be configured with the following settings: Loop checking. Maintain the current call stack (or a list of child agent root directory paths). If a child agent to be called is found to be already in the stack, refuse to execute and throw an error. Depth limit. The default maximum nesting depth is 10 levels; execution will be refused if this is exceeded. Selective memory inheritance. The memory transfer parameter (which can be named inherit_memory) controls whether the parent's memory is passed to the child agent. It can be set to false by default to ensure memory isolation.

[0063] For ordinary subdirectories that do not contain configuration directories (such as the .agent directory mentioned above), the parent agent can determine the processing method based on the processing method field (which can be named default_policy) in the metadata file (which can be named agent.json). If a fallback skill (which can be named fallback_skill) is configured, the fallback skill can be automatically invoked for processing; otherwise, the parent agent will handle it manually. If a specific empty file (which can be named .no_agent) exists in a subdirectory, it means that the directory is configured not to be automatically processed by the parent agent at all. That is, it will not appear in the results of the directory scanning skill (which can be named list_subagents) and will not trigger the processing of the aforementioned processing method field.

[0064] In addition, this application also relates to declarative file-level access control to better implement file access control in directories.

[0065] Specifically, when the target AI agent of this application performs a request for file access, it may include the following processing content: Check if a file-level access control declaration file exists or is placed at the same level as the configuration directory in the standardized file directory structure; If it does not exist, then the specific directories and files to be denied access will be determined based on the built-in default rules; If they exist, the user rules and built-in default rules of the file-level access control declaration file record are merged, and the specific directories and specific files to be denied access are determined based on the rule merging result. Among them, the user rules have higher priority than the built-in default rules.

[0066] The file-level access control declaration file (which can be named .agentignore) in the configuration directory, which is placed together with the configuration directory in the standardized file directory structure (or root directory), is used to record user rules to specify the corresponding files and directories that should not be read, indexed, or included in the context when the agent is running.

[0067] When this file-level access control declaration file is run, it merges user rules with built-in default rules. The built-in default rules cover common patterns such as version control directories (which can be named .git), dependency caches (which can be named node_modules, __pycache__), temporary files (which can be named .tmp, .swp), and sensitive configuration files (which can be named .env, .pem, .key).

[0068] The merged rules can also perform unified filtering at the following three levels: At the file reading level, the file reading skill (which can be named read_file) refuses to return the contents of ignored files or returns a permission error; At the directory traversal level, the directory traversal skill (which can be named list_directory) and the file search skill (which can be named search_files) automatically filter out ignored entries; At the context building level, files that are ignored are skipped when automatically including them in the context.

[0069] User rules take precedence over built-in rules. Correspondingly, the parts of the built-in default rules that do not conflict with user rules will still be effective.

[0070] In addition, it can support negation patterns starting with !, which can then re-include specific paths excluded by the previous rules. Specifically, it can provide access control temporary bypass parameters (which can be named ignore_ignore_rules: true), thereby allowing agents with explicit bypass permissions (which can be named read_ignored_files) to temporarily bypass access control.

[0071] In this overall context, during the process of an agent requesting file access, the target path is matched and judged. If no ignore rule is matched, the negated pattern (!) is re-included, or there is explicit bypass permission, access is allowed; otherwise, access is denied, and a permission error or empty content is returned.

[0072] Furthermore, as mentioned earlier, for pre-built target AI agents, i.e. target folders, sharing can be easily accomplished by copying the folder.

[0073] To this end, step S103, obtaining the target folder packaged under a standardized file directory structure for the target AI agent, may include: Check if the target AI agent exists in a target folder packaged under a standardized file directory structure; If so, then perform a copy operation on the target folder.

[0074] The query processing involved can cover both the local device and the system side. It uses identifiers such as agent names as search terms to perform queries, thereby quickly achieving deployment by retrieving and copying ready-made folders containing agent packages. This is clearly something that existing agent deployment methods cannot achieve.

[0075] At the same time, this application also provides further configuration for the operating rules of intelligent agents.

[0076] Taking the currently deployed target AI agent as an example, the operation of the target AI agent may include the following in sequence: If the agent directory path is specified, the existence of a valid agent directory is verified based on the metadata file and the system prompt word file (for example, the validity can be determined based on the existence of the two necessary files). Version compatibility checks can be performed based on metadata files (for example, checks can be performed based on version requirements and dependency declarations recorded in the metadata files). Load system prompts (as system messages) based on the system prompt file. Based on the skill catalog, scan registered skills (such as standard skills like file reading, file writing, directory traversal, file searching, directory scanning, and task delegation). Based on the long-term memory directory, the memory is read to initialize the dialogue context; Backend services are started conditionally based on the backend service directory (e.g., if the backend enable control field (which can be named backend.enabled) is true, then the backend subprocess is started and the runtime internal API address is passed through an environment variable (which can be named AGFS_RUNTIME_URL). Based on the graphical interface resource directory, conditionally start the UI service and proxy forwarding (for example, if the UI is controllable field (which can be named ui.enabled) is true and it is started in UI mode, start the local HTTP service to provide UI resources and open the window; if the auto forwarding field (which can be named auto_forward) is true, then perform proxy forwarding).

[0077] It should be understood that the above only covers the main processing involved in a single operation. In practical applications, interactive loop processing is also involved.

[0078] In other words, after performing the above-mentioned stages, an interactive loop can be entered. During the interactive loop, changes in the configuration directory are continuously monitored, and adaptive responses are made. That is, hot updates are performed according to the changes / types of changes, for example: If the metadata file changes, hot reloading configuration will be implemented. If the backend service directory changes, the backend needs to be restarted. If the system message file changes, the message will be updated without requiring a restart; If the skill catalog changes, the skill catalog will be rescanned and the skills will be re-registered. If the long-term memory directory changes, the memory will be refreshed; If the graphical interface resource directory changes, refresh the front-end page.

[0079] Furthermore, the AI ​​intelligent agent involved in this application can also be self-contained in terms of front-end and back-end integration and distribution.

[0080] Taking the target AI agent as an example, it can carry its own front-end interface through the graphical interface resource directory and its own back-end service through the back-end service directory. The target AI agent can start the back-end subprocess according to the configuration of the back-end service directory, automatically allocate a port (when port is 0), and pass the port number in the startup parameters through the environment variable {PORT}. It supports proxy mode (auto_forward: true, all API requests are forwarded to the own back-end) and independent running mode (auto_forward: false, suitable for packaging the agent as an independent application). It supports further exporting the AI ​​agent as an independent executable file (.exe or .app format), embedding a streamlined runtime shell and all resources. Users can run it by double-clicking without installation, thus realizing the independent application distribution and running that existing methods cannot achieve.

[0081] Furthermore, this application can also be configured with agent version management. The agent root directory serves as a repository, bringing metadata files, system prompt words files, skill directories, and knowledge base directories under version control. The runtime state directory, log directory, and long-term memory directory are excluded from version control. It supports branch experimentation of different agent behaviors, allowing users to create branches, modify prompt words, add or remove skills, run tests, and merge back into the main branch once satisfied. This enhances the agent's version tracking and auditing capabilities.

[0082] Correspondingly, in the standardized file directory structure (or root directory), in addition to directly containing the configuration directory (which can be named .agent) and the file-level access control declaration file (which can be named .agentignore), you can also include the version control ignore file (which can be named .gitignore) set here, to declare the version control scope and store the files / directories involved in the version control process.

[0083] To better illustrate the above scheme setup, we can take the aforementioned target AI agent as an example, which can be an intelligent image processing assistant / tool. The following content will demonstrate how this application creates an intelligent image processing application (agent) with a graphical interface.

[0084] 1. Create a standardized file directory structure.

[0085] Create a folder named photo_processor (root directory) in any location. Its standardized file directory structure includes: The root directory contains the configuration directory (.agent), the file-level access control declaration file (.agentignore), and the version control ignore file (.gitignore).

[0086] The configuration directory (.agent) contains the metadata file (agent.json), the system prompt word file (system_prompt.md), the skills directory (skills, including the resize.py image scaling skill), the graphical interface resource directory (ui, including the index.html front-end main page, style.css style sheet, and main.js front-end logic), the backend service directory (backend, including server.py backend service and requirements.txt dependency declaration), the long-term memory directory (memory), the knowledge base directory (knowledge, including image processing parameter reference), the runtime state directory (state), and the log directory (logs).

[0087] Second: Write the metadata file.

[0088] The metadata file (agent.json) configures the agent name as photo_processor, version number 1.0.0, and standard version 1.4. The UI configuration sets enabled to true, the entry file to index.html, and the window size. The pixel count, title "Photo Processor", and backend configuration settings include enabled: true, entry script server.py, runtime python3, and auto_forward: true (proxy mode). Skill configuration settings include enabled: true and auto_discover: true.

[0089] 3. Compile the system prompt message file.

[0090] The system prompt file (system_prompt.md) defines the intelligent agent role as an intelligent image processing assistant. The available skill is image resizing (including parameters such as input path, target width, and target height). The processing flow is: understand user needs → call the corresponding skill to perform processing → report the processing results.

[0091] 4. Write a file-level access control declaration file.

[0092] The file-level access control declaration file (.agentignore) is configured to exclude sensitive files (files in .env and .key format) and dependency caches (files of type __pycache__ and .pyc type).

[0093] 5. Running the intelligent agent.

[0094] After the user starts the program via the command line, the following commands are executed: Verify directory structure → Check version compatibility → Load system prompts → Register image scaling skills and built-in standard skills → Initialize dialog context → Start backend subprocesses → Start UI service and open graphical interface window → Configure proxy to forward to the backend. Users can enter commands in the interface, the frontend sends messages, the backend calls skills to perform image processing, and the results are displayed through the UI.

[0095] Six: Hierarchical intelligent agent expansion.

[0096] If a user requires multiple specialized processing agents to collaborate, a parent agent directory, `workspace`, can be created as the project manager or root directory. Under this parent directory, sub-agent folders can be placed: `photo_processor / ` (image processing agent), `doc_processor / ` (document processing agent), and `video_processor / ` (video processing agent). Each sub-folder contains its own configuration directory (`.agent`), forming a hierarchical agent structure. The parent agent describes its default behavior in its system prompt file (`system_prompt.md`): it invokes the directory scanning skill (`list_subagents`) to obtain a list of all sub-agents, invokes the task delegation skill (`invoke_subagent`) for each sub-agent to execute file processing tasks in its directory, and summarizes the output. The collaboration relationships require no code writing and are entirely defined by the directory structure and natural language prompts.

[0097] In this scenario, the desired effects are as follows: agent creation only requires creating a folder and editing a text file, without writing framework code; sharing agents only requires copying the folder or pushing via a code hosting platform (such as Git), and the recipient can run it using a compatible runtime; users can view and modify the agent's prompts, skills, and configurations at any time using a text editor; hierarchical agents can be naturally expressed through directory nesting, without the need to write collaboration logic code; file-level access control declaration files (.agentignore) ensure that sensitive files are not read by agents; and every change in agent behavior can be fully recorded and tracked.

[0098] Meanwhile, the above application examples also demonstrate a preferred operating procedure for the real-time creation of target AI agents, i.e., target folders, as described in this application.

[0099] In conclusion, this application innovatively introduces a file system-based AI agent deployment / operation method, defines an agent packaging format standard independent of any specific runtime, enables AI agents to have plug-and-play portability and transparent auditability, and naturally supports hierarchical collaboration and security control through file system primitives, effectively overcoming the shortcomings of existing technologies.

[0100] In terms of details, the following beneficial effects can be achieved: 1) Standardization and runtime independence: Defines a standard packaging format for intelligent agents that is independent of any specific runtime. The same intelligent agent directory can be loaded and executed by compatible runtimes from different vendors, just as HTML files can be opened by different browsers. Intelligent agents do not depend on centralized repositories, and sharing is completed by copying the folder.

[0101] 2) Transparent and auditable: All components of the agent are stored in the form of ordinary files, such as prompts as Markdown files, configurations as JSON files, and skills as executable scripts. Users can directly view the "inner workings" of the agent using file managers and text editors without any special tools.

[0102] 3) Naturally express hierarchical collaboration through directory nesting: Use the operating system's native folder nesting to express the hierarchical relationship between agents - subdirectories are child agents, and parent agents discover and call child agents through a unified built-in interface. Developers do not need to write any collaboration code, and the complexity of multi-agent architecture is moved down from the code layer to the file system layer.

[0103] 4) Declarative file-level security control: Provides intuitive file-level access control. Users can precisely control the access boundaries of agents simply by editing text files. It is more granular than container-level sandboxes and has a learning cost of almost zero.

[0104] 5) Plug-and-play portability: Simply copying a folder completes the sharing of the intelligent agent. The recipient can place the folder anywhere and load and run it using a compatible runtime. If the intelligent agent includes a UI and backend, it automatically presents a complete graphical interface application at runtime and can also be exported as a standalone executable file, further reducing the distribution threshold.

[0105] 6) Complete version control and collaboration: All components of an agent are text files, which are naturally suitable for version management. Configuration changes can be committed, branched, merged and reviewed, realizing a complete audit chain, enabling agent development to adopt the same collaborative process as software engineering.

[0106] The above is an introduction to the data processing method of AI intelligent agents based on file system form provided in this application. In order to facilitate better implementation of the data processing method of AI intelligent agents based on file system form provided in this application, this application also provides a data processing device of AI intelligent agents based on file system form from the perspective of functional modules.

[0107] See Figure 2 , Figure 2 This is a schematic diagram of a data processing device for an AI agent based on a file system, as described in this application. Specifically, the data processing device 200 for an AI agent based on a file system may include the following structure: The task acquisition unit 201 is used to acquire the AI ​​agent deployment task that needs to be executed currently for the target AI agent; The data acquisition unit 202 is used to acquire the target folder of the target AI agent packaged under a standardized file directory structure. In the standardized file directory structure, the configuration directory contains metadata files, system prompt words files, skill directory, long-term memory directory, knowledge base directory, runtime state directory, graphical interface resource directory, backend service directory, and log directory. The metadata files contain basic information of the agent, the system prompt words files contain core behavioral instructions of the agent, the skill directory contains skill files, the long-term memory directory contains persistent agent information, the knowledge base directory contains a read-only knowledge base, the runtime state directory contains runtime information, the graphical interface resource directory contains front-end graphical interface resource information, the backend service directory contains backend service code, and the log directory contains work logs. Deployment unit 203 is used to store the target folder in the specified deployment location of the AI ​​agent deployment task and run it to complete the deployment of the target AI agent.

[0108] In one exemplary embodiment, the agent's basic information is in JSON format, including name, version number, function description, standard version followed, minimum runtime version requirement, dependency declaration, UI window configuration, and backend service configuration.

[0109] In another exemplary embodiment, if the target AI agent comprises multiple agents, the hierarchical calling relationship between the multiple agents is naturally expressed through the parent-child relationship of a directory tree. The parent agent discovers the child agent by scanning the configuration directories contained in its own directory. The parent agent drives the child agent to perform corresponding tasks by delegating tasks and obtains the task execution results returned by the child agent.

[0110] In yet another exemplary embodiment, when the target AI agent performs a request for file access, it includes: Check if a file-level access control declaration file exists at the same level as the configuration directory in the standardized file directory structure; If it does not exist, then the specific directories and files to be denied access will be determined based on the built-in default rules; If they exist, the user rules and built-in default rules of the file-level access control declaration file record are merged, and the specific directories and specific files to be denied access are determined based on the rule merging result. Among them, the user rules have higher priority than the built-in default rules.

[0111] In yet another exemplary embodiment, obtaining the target AI agent packaged in a standardized file directory structure into a target folder includes: Check if the target AI agent exists in a target folder packaged under a standardized file directory structure; If so, then perform a copy operation on the target folder.

[0112] In yet another exemplary embodiment, the operation of the target AI agent includes, in sequence: When the agent directory path is specified, the existence of a valid agent directory is verified based on the metadata file and the system prompt word file. Perform version compatibility checks based on metadata files; Load system prompts based on the system prompt file; Based on the skills catalog, scan and register skills; Based on the long-term memory directory, the memory is read to initialize the dialogue context; Start backend services based on the backend service directory and conditions. Based on the graphical interface resource catalog, conditionally start UI services and proxy forwarding.

[0113] In yet another exemplary embodiment, the AI ​​agent deployment task is a database performance test deployment task; The device also includes an application unit 204, for: Based on the corresponding test benchmarks, database performance tests are performed on the target database by the target AI agent; Output the performance test results of the target database; Alternatively, the target AI agent may be specifically used to perform image processing; The device also includes an application unit 204, for: Based on the corresponding image processing requirements, the target AI agent performs image processing on the target image data. Output the image processing results of the target image data.

[0114] This application also provides a processing system from a hardware architecture perspective. As mentioned earlier, the processing system may be configured as a single device or as a cluster of devices. In this case, all devices involved in the processing system can be referred to as processing devices. See [reference needed]. Figure 3 , Figure 3 This diagram illustrates a structural schematic of the processing device involved in the processing system of this application. Specifically, the processing device of this application may include a processor 301, a memory 302, and an input / output device 303. The processor 301 executes the computer program stored in the memory 302 to implement, for example... Figure 1 The corresponding embodiments describe the steps of the data processing method for AI agents based on a file system; or, when the processor 301 executes the computer program stored in the memory 302, it implements the following: Figure 2 Corresponding to the functions of each unit in the embodiment, the memory 302 is used to store the functions executed by the processor 301 as described above. Figure 1 The computer program required for the data processing method of the AI ​​agent based on the file system in the corresponding embodiment.

[0115] For example, a computer program may be divided into one or more modules / units, one or more of which are stored in memory 302 and executed by processor 301 to complete this application. One or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in a computer device.

[0116] The processing device includes, but is not limited to, processor 301, memory 302, and input / output device 303. Those skilled in the art will understand that the illustrations are merely examples of the processing device and do not constitute a limitation on the processing device. It may include more or fewer components than illustrated, or combine certain components, or different components. For example, the processing device may also include network access devices, buses, etc., and processor 301, memory 302, input / output device 303, etc., are connected via a bus.

[0117] Processor 301 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the processing device, connecting various parts of the device through various interfaces and lines.

[0118] The memory 302 can be used to store computer programs and / or modules. The processor 301 implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory 302 and by calling data stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function, etc.; the data storage area may store data created according to the use of the processing device, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device or other volatile solid-state storage device.

[0119] When processor 301 executes a computer program stored in memory 302, it can specifically perform the following functions: Obtain the AI ​​agent deployment tasks that need to be executed for the target AI agent; The target AI agent is obtained by packaging the target folder under a standardized file directory structure. In the standardized file directory structure, the configuration directory contains metadata files, system prompt words files, skill directory, long-term memory directory, knowledge base directory, runtime state directory, graphical interface resource directory, backend service directory, and log directory. The metadata files contain basic information about the agent, the system prompt words files contain core behavioral instructions for the agent, the skill directory contains skill files, the long-term memory directory contains persistent agent information, the knowledge base directory contains a read-only knowledge base, the runtime state directory contains runtime information, the graphical interface resource directory contains front-end graphical interface resource information, the backend service directory contains backend service code, and the log directory contains work logs. Store the target folder in the specified deployment location of the AI ​​agent deployment task and run it to complete the deployment of the target AI agent.

[0120] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the data processing device, processing system, and its corresponding units based on the file system form of AI intelligent agents described above can be found by referring to, for example... Figure 1 The description of the data processing method for AI agents based on the file system in the corresponding embodiments will not be repeated here.

[0121] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0122] Therefore, this application provides a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute the present application. Figure 1 The steps of the data processing method for AI agents based on a file system in the corresponding embodiment can be found in the following examples. Figure 1 The description of the data processing method for AI agents based on the file system in the corresponding embodiments will not be repeated here.

[0123] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0124] Because of the instructions stored in the computer-readable storage medium, the present application can be executed as described above. Figure 1 The steps of the data processing method for AI agents based on a file system in the corresponding embodiments can therefore achieve the results of this application. Figure 1 The beneficial effects that the data processing method based on the file system form of AI agent can achieve in the corresponding embodiment are detailed in the preceding description and will not be repeated here.

[0125] The foregoing has provided a detailed description of the data processing method, apparatus, processing system, and computer-readable storage medium for AI intelligent agents based on a file system format provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the core ideas of this application; furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A data processing method for AI agents based on a file system, characterized in that, The method includes: Obtain the AI ​​agent deployment tasks that need to be executed for the target AI agent; Obtain the target AI agent packaged into a target folder under a standardized file directory structure. Within this standardized file directory structure, the configuration directory contains metadata files, system prompt files, a skills directory, a long-term memory directory, a knowledge base directory, a runtime state directory, a graphical interface resource directory, a backend service directory, and a log directory. The metadata files contain basic agent information; the system prompt files contain core agent behavior instructions; the skills directory contains skills files; the long-term memory directory contains persistent agent information; the knowledge base directory contains a read-only knowledge base; the runtime state directory contains runtime information; the graphical interface resource directory contains front-end graphical interface resource information; the backend service directory contains backend service code; and the log directory contains work logs. The target folder is stored in the designated deployment location of the AI ​​agent deployment task and run to complete the deployment of the target AI agent.

2. The method according to claim 1, characterized in that, The basic information of the intelligent agent is in JSON format, including name, version number, function description, standard version followed, minimum runtime version requirement, dependency declaration, UI window configuration, and backend service configuration.

3. The method according to claim 1, characterized in that, If the target AI agent contains multiple agents, the hierarchical calling relationship between the multiple agents is naturally expressed through the parent-child relationship of a directory tree; The parent agent discovers the child agent by scanning the configuration directory contained in its own directory. The parent agent drives the child agent to perform corresponding work tasks in a delegated task manner and obtains the task execution results returned by the child agent.

4. The method according to claim 1, characterized in that, When the target AI agent executes a request for file access, it includes: Check if a file-level access control declaration file at the same level as the configuration directory exists in the standardized file directory structure; If it does not exist, then the specific directories and files to be denied access will be determined based on the built-in default rules; If they exist, the user rules and the built-in default rules of the file-level access control declaration file record are merged, and the specific directories and specific files to be denied access are determined based on the rule merging result, wherein the user rules have higher priority than the built-in default rules.

5. The method according to claim 1, characterized in that, The step of obtaining the target folder, which is packaged in a standardized file directory structure, of the target AI agent includes: Check if the target AI agent exists in a target folder packaged under a standardized file directory structure; If so, then perform a copy operation on the target folder.

6. The method according to claim 1, characterized in that, The operation of the target AI agent includes, in sequence: If a valid agent directory path is specified, the existence of a valid agent directory is verified based on the metadata file and the system prompt word file. Based on the aforementioned metadata file, a version compatibility check is performed; Based on the system prompt word file, load the system prompt words; Based on the skill catalog, scan and register skills; Based on the long-term memory directory, the memory is read to initialize the dialogue context; Based on the aforementioned backend service directory, start the backend services conditionally; Based on the aforementioned graphical interface resource catalog, conditionally start UI services and proxy forwarding.

7. The method according to claim 1, characterized in that, The AI ​​agent deployment task is a database performance test deployment task. The method further includes: Based on the corresponding test benchmarks, the target AI agent performs database performance tests on the target database. Output the performance test results of the target database.

8. A data processing device for an AI intelligent agent based on a file system, characterized in that, The device includes: The task acquisition unit is used to acquire the AI ​​agent deployment tasks that need to be executed currently for the target AI agent. The data acquisition unit is used to acquire the target AI agent packaged into a target folder under a standardized file directory structure. Within this standardized file directory structure, the configuration directory includes metadata files, system prompt words files, a skills directory, a long-term memory directory, a knowledge base directory, a runtime state directory, a graphical interface resource directory, a backend service directory, and a log directory. The metadata files contain basic agent information; the system prompt words files contain core agent behavior instructions; the skills directory contains skills files; the long-term memory directory contains persistent agent information; the knowledge base directory contains a read-only knowledge base; the runtime state directory contains runtime information; the graphical interface resource directory contains front-end graphical interface resource information; the backend service directory contains backend service code; and the log directory contains work logs. The deployment unit is used to store the target folder in the designated deployment location of the AI ​​agent deployment task and run it to complete the deployment of the target AI agent.

9. A processing system, characterized in that, Used to perform the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the method of any one of claims 1 to 7.