AI multi-agent session management method, system and electronic equipment of cross-language hierarchical stateless architecture

By adopting a cross-language layered stateless architecture, we have achieved layered isolation of scheduling and inference and physical decomposition of data. This solves the problems of cross-language architecture coupling, chaotic form management, and cross-service transmission bottlenecks in existing technologies, improves the system's concurrency performance and scalability, and ensures data consistency and resource utilization efficiency.

CN123035243APending Publication Date: 2026-11-03CHANGSHA GUOKUAN ZHIYUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611299626.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-26
Publication Date
2026-11-03

AI Technical Summary

Technical Problem

Existing distributed multi-agent session management solutions suffer from multiple technical shortcomings, including cross-language architecture coupling, bottlenecks in cross-service large message transmission, mixed storage of dynamic and static forms, chaotic data read and write permission control, and insufficient cache resource reclamation capabilities. These shortcomings make it impossible to simultaneously meet the needs of high concurrency and convenient iterative AI inference.

Method used

It adopts a cross-language layered stateless architecture, which achieves lightweight interaction and unified management by layering and isolating scheduling-type stateless intelligent agents and AI inference-type stateless intelligent agents, using a distributed key-value cache cluster for data sharing, configuring dual-layer physical isolation storage and dual cache reclamation mechanism.

Benefits of technology

It improves the system's fault tolerance and concurrent performance, reduces network overhead, ensures data consistency and resource utilization efficiency, and supports flexible task orchestration modes and horizontal scaling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123035243A_ABST
    Figure CN123035243A_ABST
Patent Text Reader

Abstract

The application discloses an AI multi-agent conversation management method and system of a cross-language hierarchical heterogeneous stateless architecture and electronic equipment, aiming at the technical defects of multi-agent close-coupling networking scheduling reasoning confusion, conversation preloading redundancy, large message volume and single resource recycling strategy, and constructs a collaborative operation architecture of dynamic and static data hierarchical isolation and strict separation of rights and responsibilities. Through the cross-language heterogeneous hierarchical deployment of two types of stateless agents, namely scheduling type and AI reasoning type, and star topology isolation communication, the static structure template is stored in the persistent library, the conversation and business dynamic information table are instantiated in the cache as needed, and data correlation is completed through indexing. Only the conversation identifier is transmitted between nodes in a lightweight manner, and the operation permission isolation and double cache recycling mechanism are matched, so that various task arrangements can be flexibly adapted. Unlike the existing single-point optimization scheme, the application integrally solves the communication, storage, resource management and control interlocking short board, and effectively improves the system fault tolerance, concurrent bearing and horizontal elastic expansion performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of distributed scheduling of multi-agent AI systems with cross-language hierarchical heterogeneous deployment, long-term human-machine dialogue management of large models, and collaborative storage of distributed cached data. Specifically, it relates to a cross-language hierarchical stateless architecture AI multi-agent dialogue management method, system, and electronic device. Background Technology

[0002] As large-scale modeling technology and multi-agent collaborative solutions are deployed in business scenarios such as intelligent customer service, intelligent work order processing, and multimodal long-term interaction, distributed session management, as the underlying supporting component for multi-agent context flow and collaborative computation of business data, continues to expand in application scale. Currently, mainstream multi-agent development frameworks and enterprise-developed distributed session platforms generally adopt traditional cross-language microservice architectures to achieve the integrated deployment of scheduling and AI inference capabilities. However, existing architectures lack standardized layered constraints, and multiple interrelated architectural-level technical shortcomings exist during implementation. Optimizing any single aspect alone cannot completely eliminate all problems. First, cross-language services lack rigid hierarchical separation of responsibilities, and multiple agents use mesh-coupled communication, resulting in a high degree of mixing between scheduling logic and inference operations. Existing cross-language microservices simply rely on remote calls to split service interfaces, without separating the two core capabilities of session scheduling and AI inference at the architectural level. In most solutions, point-to-point communication channels are set up between inference agents to forward tasks and transmit business data, making it easy for faults to propagate and limiting the horizontal scaling capability of the cluster. At the same time, the entire system can only use the same development technology stack, and it is impossible to deploy technology stacks with different characteristics in a layered manner: the technology stack focusing on high-concurrency scheduling lacks a complete large-scale model and vector retrieval AI development ecosystem, while the technology stack adapted for AI algorithm development has the inherent weakness of low concurrency capacity. The two types of core performance are mutually restrictive, making it difficult to simultaneously meet the dual requirements of massive long-term session concurrency and convenient iteration of AI inference logic.

[0003] Second, the current solution pre-creates and transmits all session forms across services, but lacks a master-controlled index form and an on-demand instantiation mechanism, resulting in network and storage bottlenecks in high-concurrency scenarios. Existing solutions pre-generate all business operation forms corresponding to a session during session initialization and transmit large-capacity form messages during agent interaction, which easily leads to network I / O blocking and interface call timeouts in high-concurrency scenarios. Furthermore, the system lacks a global master-controlled form storage for indexes of each business form and a scheduling mechanism for on-demand instantiation of business forms based on static structure templates. All inference data is stored in a mixed manner, making it prone to session crosstalk and data overwriting during multi-task parallel read / write operations, and hindering the stable maintenance of the complete context of multi-turn continuous human-machine dialogues.

[0004] Third, existing technologies generally pre-set form structure templates and generate runtime forms that carry single-session data during session execution. However, most solutions do not implement storage logic isolation or hierarchical control of data access permissions between the two. Static structure template metadata defining form field structures and real-time session runtime form data usually reuse the same set of storage resources. Various service components have the default ability to read template configurations and modify form fields. When business iteratively updates inference logic or adds new agent types, it is very easy for code to accidentally call and modify the underlying form structure definition, causing parsing errors in existing historical session forms. This results in a high risk of online failure and high costs for subsequent iterations and maintenance.

[0005] Fourth, the lack of hierarchical read / write control over session data makes it difficult to guarantee data consistency during concurrent multi-agent operations. The inference service can directly read the underlying static form templates and, in some scenarios, can even delete session data in the cache itself. However, the lack of a unified scheduling and control entry point for parallel multi-agent operations and the absence of unified constraints on concurrent updates of session data by multiple nodes frequently lead to data conflicts, dirty cached data, and issues such as context loss and content corruption in long-session, multi-turn interaction scenarios.

[0006] Fifth, the methods for reclaiming session resources are limited, and expired cached data occupies storage resources for extended periods. Currently, industry session cleanup solutions rely solely on either an automatic cache expiration mechanism or periodic service checks. In scenarios such as extremely long conversations, abnormal network interruptions, or abnormal terminal offline events, a single reclamation mechanism is prone to failure. All cached entries corresponding to expired sessions cannot be released in a timely manner, continuously occupying distributed storage resources and reducing the overall business throughput performance of the cluster.

[0007] In summary, existing distributed multi-agent session management solutions suffer from multiple overlapping engineering shortcomings, including cross-language architecture coupling, bottlenecks in cross-service large message transmission, mixed storage of dynamic and static forms, chaotic data read / write permission control, and insufficient cache resource reclamation capabilities. Currently, there is no integrated layered architecture solution in the industry that can simultaneously solve all of the above technical shortcomings. Even if a few solutions make local optimizations to a single communication, storage, or permission link, they cannot systematically eliminate the entire chain of problems. There is an urgent need for a brand-new session management architecture that integrates scheduling and inference layered isolation, physical splitting of dynamic and static forms, and lightweight interaction and dual cache cleanup through a three-layer collaborative innovation system. Summary of the Invention

[0008] This invention provides a multi-agent session management method and system with a cross-language layered architecture, which simultaneously solves a series of interconnected technical problems in the existing architecture, such as high coupling, chaotic form control, large cross-service transmission overhead, poor concurrent data consistency, and a single cache recycling mechanism.

[0009] According to one aspect of the present invention, an embodiment of the present invention provides a multi-agent session management method with a cross-language layered stateless architecture, wherein the architecture includes a scheduling-type stateless agent and at least one AI inference-type stateless agent; the method includes: the scheduling-type stateless agent receiving an original session service request issued by a terminal, parsing and identifying the service scenario and creating a session, generating a globally unique session identifier bound to the current session, reading a static structure template from a persistent relational database, instantiating and generating a session dynamic information table, and writing it to a distributed key-value cache cluster; the scheduling-type stateless agent scheduling the AI ​​inference-type stateless agent according to a scheduling task, instantiating and generating a corresponding service dynamic information table, wherein the service dynamic information table loads the pending task information corresponding to the current scheduling during the instantiation process, and writes it to the distributed key-value cache cluster; the scheduling-type stateless agent storing the cache address of the service dynamic information table... The index is written to the session dynamic information table; the AI ​​inference stateless agent reads the task information in the business dynamic information table within the distributed key-value cache cluster to perform inference operations. After the operation is completed, the inference result is backfilled and saved to the business dynamic information table. The overall session process is uniformly managed by the scheduling stateless agent. There is no point-to-point communication link between the AI ​​inference stateless agents, and they do not have the permission to access static structure template data in the persistent relational database. The scheduling stateless agent and the AI ​​inference stateless agent only transmit a globally unique session identifier. Session forms and complete inference data are not directly transmitted across agents, but are uniformly shared through the distributed key-value cache cluster. The scheduling stateless agent uniformly configures the lifecycle for all cache entries corresponding to the current session, and periodically checks and cleans up idle sessions, forming a dual session resource reclamation mechanism based on the automatic cache expiration rule.

[0010] In one embodiment, the persistent relational database has a built-in globally unified session dynamic table structure template and a business dynamic table structure template. The session dynamic table structure template and the business dynamic table structure template are only open to read permissions by the stateless intelligent agent of the scheduling class. All business scenarios share the same session dynamic table structure template. A single session reuses the same session dynamic information table from creation to destruction. After each round of user interaction is completed, the temporary scheduling mark of this round in the session dynamic information table is cleared. The next round of interaction directly reuses the table to update the interaction round, scheduling steps, and business dynamic information table cache address index. The session dynamic information table only stores lightweight scheduling metadata and indexes, and does not store AI inference results. The inference results are uniformly stored in the dedicated business dynamic information table of the corresponding stateless intelligent agent of the AI ​​inference class. During the session initialization phase, only an index position is reserved in the session dynamic information table, and the business dynamic information table is not generated yet. When the scheduling-type stateless agent schedules the AI ​​inference-type stateless agent to execute a task, the scheduling-type stateless agent first reads the business dynamic table structure template specific to this type of agent from the persistent relational database, and then instantiates and generates the corresponding business dynamic information table. During the instantiation and generation process, the business dynamic information table loads the task information to be executed corresponding to this scheduling and writes it to the distributed key-value cache cluster. Then, the cache address of the business dynamic information table is written to the reserved index position of the session dynamic information table. When the scheduling-type stateless agent writes to the session dynamic information table, it simultaneously configures the lifetime for all subsequent cache entries in this session as a fallback mechanism for automatic cache data cleanup.

[0011] In one embodiment, a three-layer, hierarchically supported, interdependent, and indispensable collaborative operation mechanism is adopted. The first layer, a star-shaped scheduling architecture, serves as the overall operational foundation; the second layer, a two-layer isolated storage system, serves as the architecture's implementation carrier; and the third layer, a lightweight interaction and dual recycling mechanism, serves as the session operation management means. The three-layer mechanism works together to complete the entire session process management, with the following specific constraints: A cross-language dual-agent hierarchical isolated star-topic scheduling architecture is adopted. The scheduling-class stateless agent and the AI ​​inference-class stateless agent are rigidly isolated in terms of rights and responsibilities. The scheduling-class stateless agent is responsible for session creation, generating a globally unique session identifier, reading static structure templates, generating session dynamic information tables and business dynamic information tables based on template instantiation, multi-branch task orchestration, unified configuration of cache entry lifecycle, session inspection and resource cleanup, but does not participate in AI inference or multi-source data fusion operations. The AI ​​inference-class stateless agent can only read and write its own dedicated business dynamic information table within the distributed key-value cache cluster and backfill inference results, and does not have permission to access static structure template data in the persistent relational database. There are no point-to-point communication interfaces between the AI ​​inference-class stateless agents. All task distribution, timing control, and abnormal retry processes are uniformly coordinated and scheduled by the scheduling-class stateless agent. A dual-layer physical isolation storage system is configured for static structure templates and session runtime data; both types of static structure templates are stored only in a persistent relational database and are not written to a distributed key-value cache cluster; the session dynamic information table, as a global master form, is instantiated and generated first during the session initialization phase, while the business dynamic information table is loaded and created according to the requirements of the inference task; both types of runtime forms are stored in a distributed key-value cache cluster, and the session dynamic information table is associated with all business dynamic information tables of this session through a cache address index; during the session initialization phase, the stateless intelligent agent of the scheduling class uniformly configures the lifetime for all cache entries corresponding to the current session; A lightweight cross-service interaction mechanism with credential-based authentication and a dual-backup session lifecycle management mechanism are configured. The scheduling-type stateless agent and the AI ​​inference-type stateless agent only transmit a globally unique session identifier and a lightweight execution notification. The session dynamic information table is a lightweight master control table, storing only cache address indexes, session rounds, and scheduling step metadata. Large-capacity inference data is stored separately in the business dynamic information table. Neither type of table is directly transmitted between the two types of agents; all data is stored in a distributed key-value cache cluster. Each agent independently reads and writes the corresponding cache data using a globally unique session identifier. After a single AI operation is completed, only the temporary cache corresponding to that operation is cleared; the session dynamic information table and the business dynamic information table are retained. The scheduling-type stateless agent periodically inspects to proactively clean up idle sessions, forming a dual resource reclamation mechanism combined with the automatic expiration of cache entries upon expiration.

[0012] In one embodiment, a scheduling-type stateless agent orchestrates tasks for the AI ​​inference-type stateless agents according to preset logic, issuing multiple inference tasks serially or in parallel. After each AI inference-type stateless agent completes its corresponding pre-inference task, it reports an execution completion notification to the scheduling-type stateless agent. Upon receiving completion notifications for all pre-tasks, the scheduling-type stateless agent schedules the AI ​​inference-type stateless agents undertaking data fusion tasks. The AI ​​inference-type stateless agents undertaking data fusion tasks read the session dynamic information table based on the globally unique session identifier, extract the cache address index recorded in the table, and read the inference intermediate data from all the business dynamic information tables generated by each AI inference-type stateless agent in this session according to the index, complete the multi-source data fusion operation, and write the fusion operation result into its corresponding business dynamic information table. After receiving the fusion completion notification, the scheduling-type stateless agent reads the final business result in the business dynamic information table and sends it to the terminal.

[0013] In one embodiment, the message exchange between the scheduling-type stateless intelligent agent and the AI ​​inference-type stateless intelligent agent includes a globally unique session identifier and an execution notification; the session dynamic information table, the business dynamic information table, and the inference data within the table are not directly transmitted between intelligent agents through the interface, and each intelligent agent accesses the distributed key-value cache cluster for data reading and writing based on the globally unique session identifier.

[0014] In one embodiment, when a session is established, the scheduling-type stateless agent reads a template from a persistent relational database and instantiates it to generate a session dynamic information table, then writes the session dynamic information table to a distributed key-value cache cluster. Only when the scheduling-type stateless agent issues an inference task to the corresponding AI inference-type stateless agent does it read the dedicated template corresponding to the AI ​​inference-type stateless agent from the persistent relational database, instantiate it, and generate a business dynamic information table. During the instantiation phase, the scheduling-type stateless agent writes preset task configuration and task description information, and then writes the business dynamic information table to... A distributed key-value cache cluster; the session dynamic information table and the generated business dynamic information table within the distributed key-value cache cluster are retained during the session's duration, and the inference results are stored in the business dynamic information table; the scheduling-type stateless intelligent agent periodically inspects all sessions and counts the session idle time; when a session meets any of the following conditions—idle timeout, terminal issuing an end command, or system determining that the session is abnormal—the session dynamic information table and the business dynamic information table corresponding to that session are cleaned up together; the distributed key-value cache cluster has a lifecycle, and the session data is dually recycled by a combination of timed inspection and automatic cleanup upon expiration.

[0015] According to another aspect of the present invention, one embodiment provides an AI multi-agent conversation management system with a cross-language layered stateless architecture. The system includes: a scheduling-type stateless agent, at least one AI inference-type stateless agent, a persistent relational database, and a distributed key-value cache cluster. The persistent relational database stores static structure templates, including a conversation dynamic table structure template and a business dynamic table structure template corresponding to each of the AI ​​inference-type stateless agents. The static structure templates are only stored in the persistent relational database and are not written to the distributed key-value cache cluster during initialization and operation. The scheduling-type stateless agent has a table instantiation management function. Management Functions: During the session initialization phase, the system reads the session dynamic table structure template, instantiates and generates a session dynamic information table, and writes it to the distributed key-value cache cluster. The session dynamic information table is the main control table, containing the address indexes of all cached entries corresponding to the business dynamic information tables. Only when an inference task needs to be issued to the corresponding AI inference-type stateless agent, the scheduling-type stateless agent reads the dedicated business dynamic table structure template, instantiates and generates a business dynamic information table as needed, stores it in the distributed key-value cache cluster, and writes the cache address of this business dynamic information table into the index of the session dynamic information table. When a session is created, the scheduling-type stateless agent uniformly configures a lifetime for all cached entries of that session. The AI ​​inference-type stateless agents do not have permission to access static structure template data in persistent relational databases and cannot read arbitrary static structure templates. They only read the session dynamic information table in the distributed key-value cache cluster based on the globally unique session identifier, locate their own dedicated business dynamic information table through address indexing, perform inference operations, and populate the inference results back to the corresponding business dynamic information table. There is no communication interaction between the various AI inference-type stateless agents. Only the scheduling-type stateless agent establishes a star communication channel with the AI ​​inference-type stateless agents. The interaction between the two only transmits the globally unique session identifier and lightweight execution notifications. Large-volume business data is not transmitted through communication. The channel transmission relies on a distributed key-value cache cluster as a shared storage carrier to achieve data sharing. The stateless intelligent agent of the scheduling class also has session inspection and active cleanup functions. It periodically inspects all sessions and determines the idle time of the session. When a session meets any of the following conditions: idle timeout, terminal issues a termination command, or session abnormality, all cache entries corresponding to the globally unique session identifier are cleared. The stateless intelligent agent of the scheduling class uniformly configures the life-time of cache entries. The distributed key-value cache cluster automatically cleans up cache entries that have reached the TTL as a fallback. This fallback cleanup method and the active cleanup by the stateless intelligent agent of the scheduling class cooperate to form a dual recycling mechanism for session data.

[0016] According to another aspect of the present invention, one embodiment of the present invention provides an electronic device, including a memory and a processor; the memory stores executable computer program code; the processor calls and runs the computer program code to execute the AI ​​multi-agent conversation management method with a cross-language hierarchical stateless architecture as described in any of the foregoing embodiments.

[0017] According to another aspect of the present invention, one embodiment of the present invention provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed, performs the AI ​​multi-agent conversation management method with a cross-language hierarchical stateless architecture described in any of the foregoing embodiments.

[0018] This invention provides a cross-language, layered, stateless AI multi-agent session management method, system, and electronic device. It utilizes two types of stateless agents—a scheduling class and an AI inference class—deployed in a layered manner using a cross-language heterogeneous technology stack and isolated communication via a star topology. Based on two types of structural templates stored in a persistent relational database, session dynamic information tables and business dynamic information tables are instantiated on demand in the cache, and data association and binding are completed through index pointers. Only lightweight session identifiers are transmitted between nodes, and a mechanism for isolating operation permissions and dual cache reclamation is provided. This allows for flexible adaptation to various task orchestration modes, helping to improve system fault tolerance, significantly enhancing concurrency performance, and horizontal elastic scalability. Attached Figure Description

[0019] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0020] Figure 1 A schematic diagram of the overall application environment of the AI ​​multi-agent conversation management system with a cross-language hierarchical stateless architecture provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the hierarchical module structure of the AI ​​multi-agent conversation management system provided in an embodiment of the present invention; Figure 3 A schematic diagram of the overall process of the AI ​​multi-agent conversation management method with a cross-language hierarchical stateless architecture provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

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

[0022] In exemplary embodiments, the same reference numerals represent the same structural components or the same method steps. If one embodiment has been described, the remaining embodiments only describe distinguishing features. Throughout this invention, "comprising" is an open-ended term, and "connection" includes both direct connection and indirect electrical connection through intermediate components, without exclusive interpretation unless otherwise stated.

[0023] Existing single-language AI multi-agent systems cannot simultaneously leverage Java's high-concurrency scheduling capabilities and Python's large-scale model ecosystem; session lifecycles, data read / write operations, and business computations are highly coupled, making horizontal scaling difficult and prone to blocking and crashes under high concurrency; cross-language architectures lack a unified state storage isolation scheme, easily leading to session serial number and concurrent update conflicts; dynamic table structure templates and session runtime data are stored together, resulting in severe module coupling, requiring modifications to the underlying architecture for business iterations, leading to high maintenance costs and poor operational stability. This invention aims to solve all of the above-mentioned defects.

[0024] Given that existing multi-agent session management platforms built on cross-language microservice architectures have multiple interrelated architectural-level technical shortcomings, and optimizing any one aspect alone cannot completely eliminate all problems, this invention aims to provide a multi-agent session management method and system with a cross-language layered architecture to simultaneously solve a series of interconnected technical problems in the existing architecture, such as high coupling, chaotic form control, large cross-service transmission overhead, poor concurrent data consistency, and a single cache recycling mechanism.

[0025] Existing solutions cannot rigidly isolate scheduling and inference capabilities in a hierarchical manner. Most agents use point-to-point mesh communication, which makes faults easy to spread and difficult to deploy in a layered manner to adapt to different development technology stacks. Session forms are uniformly pre-created and transmitted across services in full, lacking a global master form and an on-demand instantiation mechanism. Static form templates and session runtime data are stored together, and there is no hierarchical control of permissions. Business iterations can easily cause historical session parsing anomalies. Concurrent read and write operations by multiple agents lack unified constraints, frequently resulting in data conflicts and dirty cache data. Relying on only a single cache cleanup method, invalid cache occupies storage resources for a long time in ultra-long sessions and abnormal offline scenarios.

[0026] To address all the aforementioned shortcomings, this invention establishes a three-layered, mutually supportive and collaborative support system: a hierarchical star-shaped scheduling architecture for scheduling and inference, a dual-layered isolated storage system for dynamic and static forms, and a lightweight interaction and dual cache reclamation mechanism. These three elements work synergistically to eliminate the multiple overlapping engineering shortcomings of existing technologies. This invention employs a three-layered, hierarchically supported, interdependent, and indispensable collaborative operation mechanism. The first layer, the star-shaped scheduling architecture, serves as the overall operational foundation; the second layer, the dual-layered isolated storage system, serves as the architecture's implementation carrier; and the third layer, the lightweight interaction and dual cache reclamation mechanism, serves as the session operation management means. These three mechanisms work together to complete the entire session process management, with the following specific constraints: A cross-language dual-agent hierarchical isolated star-topic scheduling architecture is adopted. The scheduling-class stateless agent and the AI ​​inference-class stateless agent are rigidly isolated in terms of rights and responsibilities. The scheduling-class stateless agent is responsible for session creation, generating a globally unique session identifier, reading static structure templates, generating session dynamic information tables and business dynamic information tables based on template instantiation, multi-branch task orchestration, unified configuration of cache entry lifecycle, session inspection and resource cleanup, but does not participate in AI inference or multi-source data fusion operations. The AI ​​inference-class stateless agent can only read and write its own dedicated business dynamic information table within the distributed key-value cache cluster and backfill inference results. It does not have permission to access static structure template data in the persistent relational database and cannot read any static structure template. There are no point-to-point communication interfaces between the AI ​​inference-class stateless agents. All task distribution, timing control, and abnormal retry processes are uniformly coordinated and scheduled by the scheduling-class stateless agent. A dual-layer physical isolation storage system is configured for static structure templates and session runtime data. Both types of static structure templates are stored only in a persistent relational database and are not written to the distributed key-value cache cluster during initialization and runtime. The session dynamic information table, as the global master form, is instantiated and generated preferentially during session initialization. The business dynamic information table is loaded and created according to the requirements of inference tasks. Both types of runtime forms are stored in the distributed key-value cache cluster. The session dynamic information table is associated with all business dynamic information tables for this session through a cache address index. During session initialization, the stateless intelligent agent of the scheduling class uniformly configures the lifetime for all cache entries corresponding to the current session. A lightweight, credential-based cross-service interaction and dual-backup session lifecycle management mechanism are configured. The scheduling-type stateless agent and the AI ​​inference-type stateless agent only transmit a globally unique session identifier and a lightweight execution notification. The session dynamic information table is a lightweight master control table, storing only cache address indexes, session rounds, and scheduling step metadata. Large-capacity inference data is stored separately in the business dynamic information table. Neither type of table is directly transmitted between the two types of agents; all are stored in a distributed key-value cache cluster. Each agent independently reads and writes the corresponding cache data using a globally unique session identifier. After a single AI operation is completed, only the temporary cache corresponding to that operation is cleared; the session dynamic information table and the business dynamic information table are retained. The scheduling-type stateless agent periodically inspects to proactively clean up idle sessions, forming a dual resource reclamation mechanism combined with the automatic expiration of cache entries upon expiration. These three mechanisms work together and are indispensable, achieving a comprehensive technical effect of low-coupling scheduling, stable context management, reduced network overhead, guaranteed concurrent data consistency, and timely release of invalid cache resources.

[0027] Figure 1 This is a schematic diagram of the overall application environment of the cross-language layered stateless AI multi-agent conversation management system according to an embodiment of the present invention. The cross-language layered stateless AI multi-agent conversation management system provided in this embodiment can be deployed on server 104, with terminal 102 communicating with the server via a network. Data storage is divided into two categories: persistent relational database and distributed key-value cache cluster. Terminals include mobile phones, computers, IoT devices, wearable devices, etc., and the server can be deployed as a single machine or in a cluster. The scheduling stateless agent and each AI inference stateless agent can be deployed on the same server or distributed across multiple servers. The terminal sends conversation service requests to the scheduling stateless agent through the communication network. The scheduling stateless agent and each AI inference stateless agent form a star communication topology, with no point-to-point communication links between the AI ​​inference stateless agents. All conversation execution data is uniformly stored in the distributed key-value cache cluster, and static structure templates are stored in the persistent relational database. The persistent relational database can be set within the scheduling stateless agent.

[0028] Figure 2 This diagram illustrates the layered modular architecture of a cross-language, stateless AI multi-agent conversation management system. The system comprises four core components: a scheduling-type stateless agent, at least one AI inference-type stateless agent, a persistent relational database, and a distributed key-value cache cluster. All agents do not store their own session state data, adopting a stateless design. The complete session context is uniformly hosted on the distributed key-value cache cluster. It supports multi-instance deployment and load balancing, and can dynamically add or remove service instances based on the number of concurrent online sessions. Session context is not lost during scaling or node restarts.

[0029] A persistent relational database stores static structure templates, which include session dynamic table structure templates and business dynamic table structure templates corresponding to each stateless AI inference agent. The static structure templates are stored only in the persistent relational database and are not written to the distributed key-value cache cluster during the initialization and operation phases.

[0030] The stateless intelligent agent of the scheduling class has table instantiation management function: during the session initialization phase, it reads the session dynamic table structure template, instantiates and generates a session dynamic information table and writes it to the distributed key-value cache cluster. The session dynamic information table is the main control table and has built-in cache entry address indexes corresponding to all business dynamic information tables. Only when it is necessary to issue an inference task to the corresponding stateless intelligent agent of the AI ​​inference class, the stateless intelligent agent of the scheduling class reads the exclusive business dynamic table structure template, instantiates and generates a business dynamic information table as needed and stores it in the distributed key-value cache cluster, and writes the cache address of the business dynamic information table into the index of the session dynamic information table. When a session is created, the stateless intelligent agent of the scheduling class uniformly configures the time-to-live (TTL) for all cache entries of the session.

[0031] The AI ​​inference stateless agent does not have permission to access static structure template data in a persistent relational database and cannot read arbitrary static structure templates. It only reads the session dynamic information table in the distributed key-value cache cluster based on the globally unique session identifier, locates its own exclusive business dynamic information table through address index, performs inference operations, and fills the inference results back into the corresponding business dynamic information table. There is no communication interaction between the AI ​​inference stateless agents. Only the scheduling stateless agent establishes a star communication channel with the AI ​​inference stateless agent. The interaction between the two only transmits the globally unique session identifier and lightweight execution notifications. Large-capacity business data is not transmitted through the communication channel. Data sharing is achieved by relying on the distributed key-value cache cluster as a shared storage carrier.

[0032] The stateless intelligent agent for scheduling also has session inspection and active cleanup functions. It periodically inspects all sessions and determines the idle time of the sessions. When a session meets any of the following conditions: idle timeout, terminal issues a termination command, or session abnormality, all cache entries corresponding to the globally unique session identifier are cleared. The stateless intelligent agent for scheduling uniformly configures the life-time of cache entries. The distributed key-value cache cluster automatically cleans up cache entries that have reached the TTL as a fallback. This fallback cleanup method works in conjunction with the active cleanup by the stateless intelligent agent for scheduling to form a dual recycling mechanism for session data.

[0033] All agents adopt a stateless design, supporting multi-instance deployment and load balancing. Service instances can be dynamically added or removed based on the number of concurrent online sessions, and session context is not lost during scaling or node restarts. For example, MySQL can be used as the persistent relational database; a distributed key-value cache cluster can use a Redis master-slave architecture with a sentinel structure to achieve high availability; the scheduling-type stateless agent can be built on a high-concurrency asynchronous development framework within the Java ecosystem, leveraging its excellent concurrent scheduling and service cluster deployment capabilities to support large-scale session management; the AI ​​inference-type stateless agent can be built on an AI development framework within the Python ecosystem, utilizing its mature large-model invocation and algorithm toolchain to adapt to various complex inference and data fusion computation needs. A detailed description follows.

[0034] The scheduling-type stateless agent is the sole management unit for the entire system process. It is only responsible for session creation, generating globally unique session identifiers, instantiating static structure templates, orchestrating multi-branch tasks, uniformly configuring and renewing cached entry TTLs, and performing scheduled session inspection and cleanup. It does not participate in AI inference or multi-source data fusion operations. Each AI inference-type stateless agent is independent, with no point-to-point communication links between them. They only establish star-shaped communication channels with the scheduling-type stateless agent. The scheduling-type stateless agent and each AI inference-type stateless agent only transmit lightweight globally unique session identifiers and execution notifications. Large-capacity inference intermediate data, session dynamic information tables, and business dynamic information tables are all uniformly stored in a distributed key-value cache cluster and are not directly transmitted between service interfaces. This reduces the pressure of cross-service message transmission and improves the concurrency blocking and transmission latency defects caused by large message interactions in existing technologies. The scheduling-type stateless agent can be built based on Spring Boot and configured with a fixed thread pool and asynchronous non-blocking forwarding logic.

[0035] AI inference-type stateless agents can leverage the FastAPI asynchronous I / O framework, supporting multi-instance load balancing. They read only the dynamically generated session instance tables within the distributed key-value cache cluster based on a globally unique session identifier (sessionId), completing AI inference, large model interaction, and business numerical calculations using form fields and validation rules as a basis. The results, session status, and progress information are uniformly populated into the session instance dynamic table. After the data is completely written back to the distributed key-value cache cluster and the write is verified as successful, a lightweight execution completion notification carrying the globally unique session identifier (sessionId) and task status is pushed only to the scheduling-type stateless agent. The AI ​​inference-type stateless agent has no data deletion permissions within the distributed key-value cache cluster and does not read or store any dynamic table structure templates throughout the entire process.

[0036] The persistent relational database internally stores two types of static structure templates: one is a globally unified session dynamic table structure template, and the other is a business dynamic table structure template that matches each AI inference stateless agent one-to-one. These two static structure templates are only accessible to scheduling stateless agents; all AI inference stateless agents do not have access to the static structure template data within the persistent relational database. Only a globally unique session identifier is transmitted between scheduling and AI inference stateless agents. Session forms and complete inference data are not directly transmitted across agents; data sharing is uniformly achieved through a distributed key-value cache cluster. The scheduling stateless agent uniformly configures the lifecycle for all cache entries corresponding to the current session and periodically checks and cleans up idle sessions, forming a dual session resource reclamation mechanism based on automatic cache expiration rules.

[0037] For example, the system defines the basic specifications of two types of runtime forms through two types of static structure templates. The session dynamic information table is instantiated in a distributed key-value cache based on the session dynamic table structure template. It is created only once during the session initialization phase and reused during the session's lifecycle without repeated creation. The session dynamic information table carries a globally unique session identifier, a record of cumulative interaction rounds, a list of agents to be scheduled in the current round and their execution order, and the session's running status. It also maintains index pointers pointing to each business dynamic information table, and binds all created business dynamic information tables under the same session through pointer association. Each round of interaction only updates the round number value, the scheduling queue for the current round, and the association relationship between the corresponding pointer. The business dynamic information table is loaded and generated only when the corresponding inference task is triggered by scheduling. During the instantiation phase, the scheduling-class stateless agent uniformly writes the task configuration, Prompt execution rules, model output constraints, inference input data, and other parameters corresponding to this inference. During the inference operation, intermediate operation data and the final output result are filled in. After reading the business dynamic information table, the AI ​​inference-class stateless agent directly executes the model operation based on the built-in parameters. Different business scenarios can be extended with custom content based on the basic specifications of the static structure template. The static structure template only defines the overall data structure constraints and does not populate real-time session running data.

[0038] Static structure templates are only persistently stored in a persistent relational database and are not written to a distributed key-value cache cluster. This achieves physical layering and isolation between statically defined metadata and session runtime business data, avoiding pollution of online runtime session data when business iteratively modifies form structures and Prompt rules. It also alleviates the problems of mixed storage of static structure templates and runtime data and high risks of iterative optimization in existing technologies.

[0039] The distributed key-value cache cluster employs a master-slave replication + sentinel high-availability architecture. The master node handles writes, and the slave nodes handle read backups. The sentinel automatically handles master node failover. It stores only the dynamic table of session instances corresponding to each globally unique session identifier (sessionId), session metadata, and intermediate temporary cache for AI operations. A Time-to-Live (TTL) is configured for each session's storage entry. The distributed key-value cache cluster automatically cleans up entries after the TTL expires, serving as a fallback mechanism. Idle time determination is handled by a stateless, scheduling agent. The distributed key-value cache cluster can be any distributed cache cluster, such as a Redis cluster.

[0040] Each AI inference-type stateless agent completes calculations and updates form data based on its own dedicated business dynamic information table. The specific process is as follows: The scheduling-type stateless agent executes the scheduling process sequentially according to the pre-configured task arrangement order; when a specific AI inference-type stateless agent needs to be scheduled to perform a business task, the scheduling-type stateless agent reads the agent's dedicated business dynamic table structure template and instantiates the corresponding business dynamic information table as needed; simultaneously, the scheduling-type stateless agent writes the preset inference task configuration bound to the table into the table, with each business dynamic information table uniquely corresponding to a type of inference task; the AI ​​inference-type stateless agent reads the session dynamic information table based on the globally unique session identifier, locates its own corresponding business dynamic information table through the cache address index stored in the table, and uses the data agreed upon in the business dynamic information table. Based on format, field constraints, and built-in task configurations, the system performs at least one operation among AI inference, large model interaction, and business logic calculation to obtain branch inference results. Inference output content, business calculation values, session running status, task execution progress, and other status information are all populated back into the business dynamic information table corresponding to the current stateless AI inference agent. The session dynamic information table only stores lightweight metadata required for scheduling and index addresses of various business forms, and does not store business data generated by inference calculations. The same session dynamic information table is reused within the same session lifecycle. During multiple rounds of human-computer interaction, the main control form is not repeatedly created. Each round of interaction only updates the interaction round, step identifier, and business form index address in the session dynamic information table. Historical related data is retained, and inference data for each round is independently stored in the corresponding business dynamic information table.

[0041] After a user initiates a session service request through the terminal, the scheduling-type stateless intelligent agent receives the service request, parses and identifies the service scenario and generates a globally unique session identifier (sessionId), reads the session dynamic table structure template in the persistent relational database, instantiates and generates a session dynamic information table and writes it to the distributed key-value cache cluster. The session dynamic information table is a global master control table and reserves the address index of the service dynamic information table. The service dynamic information table is not generated during the session initialization phase.

[0042] According to the orchestration scheme, the scheduling-type stateless intelligent agent reads the business dynamic table structure template dedicated to the corresponding AI inference-type stateless intelligent agent as needed, instantiates and generates a business dynamic information table and stores it in the cache. During the session initialization phase, the lifetime is uniformly configured for all cache entries corresponding to the session, and the cache address of the table is written into the session dynamic information table.

[0043] The scheduling-type stateless intelligent agent only issues a globally unique session identifier to each AI inference-type stateless intelligent agent. The two types of intelligent agents form a star scheduling topology. All AI inference-type stateless intelligent agents are independent of each other and have no communication interface. The entire process of tasks is uniformly managed by the scheduler.

[0044] AI inference-type stateless agents read the session dynamic information table, locate their own exclusive business dynamic information table through the built-in address index, and can only read and write the running business dynamic information table in the cache and backfill the inference results. After the operation is completed, they send an execution notification to the scheduling-type stateless agents. AI inference-type stateless agents do not have the permission to read various static structure templates in persistent storage.

[0045] The scheduling-type stateless intelligent agent follows the execution notification process. After all the preliminary inference tasks are completed, the scheduling-type stateless intelligent agent responsible for the aggregation and fusion task is assigned. This agent reads all business dynamic information tables, completes the fusion inference, stores the final result in its own business dynamic information table, and reports the completion notification. After receiving the aggregation completion notification, the scheduling-type stateless intelligent agent extracts the final result from the corresponding business dynamic information table and pushes it to the terminal.

[0046] The specific steps for a stateless scheduling agent to receive execution completion notifications from various stateless AI inference agents, read business results, and push them to the terminal are as follows: The stateless scheduling agent schedules the corresponding stateless AI inference agents according to pre-configured task orchestration logic, receives lightweight execution completion notifications reported by each agent, and the notifications only carry a globally unique session identifier and the current task running status; if this session only orchestrates a single AI inference task, the stateless scheduling agent directly accesses the distributed key-value cache cluster based on the globally unique session identifier to read the specific business dynamics of that single inference agent. The inference data in the information table is packaged into standardized business execution results and then sent to the terminal. If two or more types of AI inference tasks are scheduled for this session, after all the preceding branch inference tasks have been completed, the scheduling stateless agent schedules the AI ​​inference stateless agent undertaking the aggregation and fusion task to complete the multi-source data fusion operation. The scheduling stateless agent then reads the integrated complete business data from the exclusive business dynamic information table of the aggregation and fusion agent, packages the standardized business execution results, and sends them to the terminal. The business execution results include at least a task execution success or failure indicator and the integrated business output content.

[0047] The scheduling-type stateless intelligent agent periodically inspects sessions, and, in conjunction with cache lifetime, achieves hierarchical and dual-cached resource cleanup.

[0048] Among them, the scheduling-type stateless intelligent agent is fully responsible for session management, template reading, task orchestration, cache maintenance and resource cleanup, and does not participate in any AI inference or data fusion operation; the AI ​​inference-type stateless intelligent agent only has the ability to read and write cache and inference backfill, and has no permissions to delete cache or read template.

[0049] By employing a hierarchical dual-agent star-topology isolation scheduling, dual-layer physical isolation storage for dynamic and static data, lightweight credential interaction, and a dual cache reclamation mechanism, the system simultaneously addresses cross-language service coupling, session data conflicts, high-concurrency transmission bottlenecks, accumulation of dirty cached data, and compatibility defects in business iterations, thereby enhancing the system's concurrent carrying capacity.

[0050] After the stateless intelligent agent pushes the standardized business execution results to the terminal, it performs a hierarchical cache cleanup operation. The specific rules are as follows: After a single AI inference task is completed, only the temporary cache data generated by this operation in the distributed key-value cache cluster is deleted. The session dynamic information table corresponding to this session and the exclusive business dynamic information table of each AI inference stateless intelligent agent are all retained to ensure the context continuity of multi-round human-computer interaction. If the stateless intelligent agent detects and determines that the current session is in an abnormal state, it clears all stored data corresponding to the globally unique session identifier in the distributed key-value cache cluster. The session abnormality determination conditions include at least one of the following situations: the idle and static duration of the session exceeds the preset duration threshold, the terminal issues a session exit command, or the system determines that the session is invalid.

[0051] This application provides a cross-language, layered, stateless architecture-based AI multi-agent session management method, applied to a server. Figure 3 This is a flowchart illustrating the AI ​​multi-agent conversation management method based on a cross-language hierarchical stateless architecture according to the present invention. Figure 3 As shown, this cross-language hierarchical stateless architecture AI multi-agent conversation management method includes: Step S11: The scheduling-type stateless intelligent agent receives the original session service request sent by the terminal, parses and identifies the service scenario and creates a session, generates a globally unique session identifier bound to this session, reads the static structure template in the persistent relational database, instantiates and generates a session dynamic information table, and writes it to the distributed key-value cache cluster.

[0052] When a session is needed, the end user initiates a session service request through their user terminal. A stateless scheduling agent receives the session service request from the end user, parses and identifies the service scenario, and generates a globally unique session identifier (sessionId). This globally unique session identifier (sessionId) indicates the current session corresponding to the session service request. Subsequently, the stateless scheduling agent and the stateless AI inference agent can perform read and write operations on data associated with the current session based on this globally unique session identifier (sessionId). The stateless scheduling agent reads the session dynamic table structure template from the persistent database, binds this dynamic table structure template to the globally unique session identifier (sessionId), instantiates a session dynamic information table, and writes it to the distributed key-value cache cluster. An independent storage space is allocated in the distributed key-value cache cluster, and the stateless scheduling agent stores the generated session dynamic information table in this independent storage space. The session dynamic information table is a globally controlled table, and a reserved address index for the business dynamic information table is provided. The business dynamic information table is not generated during the session initialization phase.

[0053] Step S12: The scheduling-type stateless agent schedules the AI ​​inference-type stateless agent according to the scheduling task, instantiates and generates the corresponding business dynamic information table. During the instantiation process, the business dynamic information table loads the task information to be executed corresponding to this scheduling and writes it into the distributed key-value cache cluster. The scheduling-type stateless agent writes the cache address index of the business dynamic information table into the session dynamic information table.

[0054] According to the orchestration scheme, the scheduling-type stateless agent reads the business dynamic table structure template specific to the corresponding AI inference-type stateless agent as needed, instantiates and generates a business dynamic information table, stores it in the cache, and uniformly configures the lifetime for all cached entries corresponding to the session during the session initialization phase, writing the cache address of the table into the session dynamic information table. The scheduling-type stateless agent writes the cache address index of the business dynamic information table into the session dynamic information table.

[0055] The stateless AI inference agent reads the session dynamic information table from the distributed key-value cache cluster based on the globally unique session identifier (sessionId). Based on the built-in specifications of the session dynamic information table, it performs AI inference, large model interaction, business logic calculation, etc., and instantiates the corresponding business dynamic information table by storing the inference output, session progress, state values, etc., and writes it into the distributed key-value cache cluster. At the same time, it writes the cache address index of the business dynamic information table into the session dynamic information table.

[0056] Step S13: The AI ​​inference-type stateless agent reads the task information in the business dynamic information table in the distributed key-value cache cluster and performs inference operations. After the operation is completed, the inference results are backfilled and saved to the business dynamic information table. The overall process of the session is uniformly managed by the scheduling-type stateless agent.

[0057] AI inference-type stateless agents read the session dynamic information table, locate their own exclusive business dynamic information table through the built-in address index, and can only read and write the running business dynamic information table in the cache and backfill the inference results. After the operation is completed, they send an execution notification to the scheduling-type stateless agents. AI inference-type stateless agents do not have the permission to read various static structure templates in persistent storage.

[0058] The scheduling-type stateless intelligent agent advances the process according to the execution notification. After all the pre-inference tasks are completed, the scheduling-type stateless intelligent agent undertaking the summary and fusion task is scheduled. The AI ​​reasoning-type stateless intelligent agent reads all business dynamic information tables to complete the fusion reasoning, stores the final result in its own business dynamic information table and reports the completion notification.

[0059] The cross-language layered stateless architecture AI multi-agent session management method of this invention uses two types of stateless agents, scheduling class and AI inference class, and deploys them in a layered manner with a cross-language heterogeneous technology stack and isolates communication with a star topology. Relying on two types of static structure templates stored in a persistent relational database, the session dynamic information table and business dynamic information table are instantiated on demand in the cache, and data association and binding are completed through index pointers. Only the session identifier is transmitted between nodes in a lightweight manner, and it is equipped with operation permission isolation and dual cache reclamation mechanism. It can flexibly adapt to a variety of task orchestration modes, which helps to improve the fault tolerance of system operation, significantly enhance the concurrent bearing performance and horizontal elastic scalability.

[0060] To more clearly illustrate the technical solutions provided in the embodiments of this application, the following further explains the AI ​​multi-agent conversation management method with a cross-language hierarchical stateless architecture provided in this application.

[0061] In this embodiment, the persistent relational database has a globally unified session dynamic table structure template and a business dynamic table structure template built-in. The session dynamic table structure template and the business dynamic table structure template only grant read access to the stateless intelligent agent of the scheduling class. All business scenarios share the same session dynamic table structure template. A single session reuses the same session dynamic information table from creation to destruction. After each round of user interaction, the temporary scheduling flag for that round is cleared in the session dynamic information table, and the next round of interaction directly reuses this table to update the interaction round, scheduling steps, and the cache address index of the business dynamic information table. The session dynamic information table only stores lightweight scheduling metadata and indexes, and does not store AI inference results. The inference results are uniformly stored in the dedicated business dynamic information of the corresponding stateless intelligent agent of the AI ​​inference class. During the session initialization phase, only an index position is reserved in the session dynamic information table, and the business dynamic information table is not generated yet. When the scheduling-type stateless agent schedules the AI ​​inference-type stateless agent to execute a task, the scheduling-type stateless agent first reads the business dynamic table structure template specific to this type of agent from the persistent relational database, and then instantiates and generates the corresponding business dynamic information table. During the instantiation and generation process, the business dynamic information table loads the task information to be executed corresponding to this scheduling and writes it to the distributed key-value cache cluster. Then, the cache address of the business dynamic information table is written to the reserved index position of the session dynamic information table. When the scheduling-type stateless agent writes to the session dynamic information table, it simultaneously configures the lifetime for all subsequent cache entries in this session as a fallback mechanism for automatic cache data cleanup.

[0062] All business scenarios share the same session dynamic table structure template; a single session reuses the same session dynamic information table from creation to destruction; after each round of user interaction, the temporary scheduling flag for this round in the session dynamic information table is cleared, and the next round of interaction directly reuses the table to update the interaction round, scheduling steps, and business dynamic information table cache address index; the session dynamic information table only stores lightweight scheduling metadata and indexes, and does not store AI inference results, which are uniformly stored in the dedicated business dynamic information table of the corresponding stateless intelligent agent of the AI ​​inference class.

[0063] During the session initialization phase, only an index position is reserved in the session dynamic information table; the business dynamic information table is not generated yet. When the scheduling-type stateless agent schedules the AI ​​inference-type stateless agent to execute a task, the scheduling-type stateless agent first reads the business dynamic table structure template specific to its type from the persistent relational database, then instantiates and generates the corresponding business dynamic information table. During the instantiation process, the business dynamic information table loads the task information to be executed corresponding to this scheduling and writes it to the distributed key-value cache cluster. Then, the cache address of the business dynamic information table is written to the reserved index position in the session dynamic information table. When the scheduling-type stateless agent writes to the session dynamic information table, it simultaneously configures a unified lifecycle for all subsequent cached entries in this session as a fallback mechanism for automatic cache data cleanup.

[0064] Stateless agents that can be scheduled can flexibly choose between single-agent serial execution, multiple-agent sequential execution, or multiple-agent parallel synchronous execution modes by configuring a list of agents to be scheduled and their execution order. The following uses two typical application scenarios to illustrate the execution process. Both scenarios share the same set of instance creation and cache lifecycle management logic: Scenario 1: Single-agent serial scheduling and execution process 1. The terminal sends a session service request to the scheduling-type stateless intelligent agent. The scheduling-type stateless intelligent agent generates a globally unique session identifier bound to this session; reads the unified session dynamic table structure template in the persistent relational database, instantiates and generates a session dynamic information table, writes it to the distributed key-value cache cluster, and reserves the index pointer bit of the service dynamic information table in the session dynamic information table. 2. When the scheduling-type stateless intelligent agent recognizes that only one type of AI inference task needs to be started at present, it reads the dedicated business dynamic table structure template of the corresponding AI inference-type stateless intelligent agent, loads and instantiates the business dynamic information table as needed, stores it in the cache cluster, and writes the cache address of this instance into the reserved index pointer bit of the session dynamic information table. When the session dynamic information table and the business dynamic information table are written to the cache, the scheduling-type stateless intelligent agent uniformly configures the TTL fallback duration for all cache entries of this session, with an example preset of 2 hours. 3. The scheduling-type stateless intelligent agent only issues a globally unique session identifier to the corresponding AI inference-type stateless intelligent agent. The AI ​​inference-type stateless intelligent agent reads the session dynamic information table based on the globally unique session identifier, locates its own exclusive business dynamic information table through the built-in index pointer, reads the pre-stored task configuration and Prompt parameter in the table to complete the inference calculation, and fills the generated inference result back into the business dynamic information table. 4. After the inference operation is completed, the AI ​​inference stateless agent sends a lightweight execution completion notification to the scheduling stateless agent; the scheduling stateless agent reads the inference results from the business dynamic information table, encapsulates them into standardized business messages, and pushes them to the terminal. 5. After each round of user interaction and inference task is completed, the scheduling-type stateless agent actively calls the cache interface to refresh the TTL countdown of all cached entries in the current session; in the continuous human-computer dialogue scenario, the TTL is reset in a loop, and the cache cluster will not trigger expiration cleanup, ensuring the complete retention of long session context.

[0065] Scenario 2: Parallel Scheduling and Result Fusion Execution Process of Multi-Agent Systems 1. The process of session initialization, creation of session dynamic information table, loading of multiple sets of business dynamic information tables, and unified TTL configuration for full caching is completely consistent with scenario one. 2. The scheduling-type stateless intelligent agent distributes multiple independent inference tasks to different AI inference-type stateless intelligent agents in parallel according to the preset arrangement rules. Each AI inference-type stateless intelligent agent is isolated from each other, completes the calculation independently and fills back the intermediate inference data. After the calculation is completed, it reports the execution completion notification to the scheduling-type stateless intelligent agent. 3. After the stateless intelligent agent of the scheduling class verifies that all the pre-inference tasks have been completed, it schedules the stateless intelligent agent of the AI ​​inference class that undertakes the data fusion function; it also reads the index pointers of all business dynamic information tables stored in the session dynamic information table, batch pulls the intermediate data of multi-way inference to complete the multi-source data fusion calculation, and stores the integrated final business result into its own corresponding business dynamic information table. 4. After receiving the fusion completion notification, the scheduling-type stateless agent reads the fusion result and pushes it to the terminal. Upon completion of the interaction, it synchronously refreshes the TTL of all cached entries for this session.

[0066] In this embodiment, the scheduling-type stateless intelligent agent is fully responsible for session management, template reading, task orchestration, cache maintenance, and resource cleanup, and does not participate in any AI inference or data fusion operations; the AI ​​inference-type stateless intelligent agent only has cache read / write and inference backfilling capabilities, and has no cache deletion or template reading permissions; through the coordinated efforts of hierarchical dual-intelligent agent star-shaped isolation scheduling, dual-layer physical isolation storage of dynamic and static data, lightweight credential interaction, and dual cache reclamation mechanisms, the system simultaneously solves cross-language service coupling, session data conflict, high-concurrency transmission bottleneck, cache dirty data accumulation, and business iteration compatibility defects, thereby improving the system's concurrent carrying capacity.

[0067] The scheduling-type stateless agent orchestrates tasks for the AI ​​inference-type stateless agents according to preset logic, issuing multiple inference tasks serially or in parallel. After each AI inference-type stateless agent completes its corresponding pre-inference task, it reports an execution completion notification to the scheduling-type stateless agent. Upon receiving completion notifications for all pre-tasks, the scheduling-type stateless agent schedules the AI ​​inference-type stateless agents undertaking data fusion tasks. The AI ​​inference-type stateless agents undertaking data fusion tasks read the session dynamic information table based on the globally unique session identifier, extract the cache address index recorded in the table, and read the inference intermediate data from all the business dynamic information tables generated by each AI inference-type stateless agent in this session according to the index. They then complete the multi-source data fusion operation and write the fusion operation result into their corresponding business dynamic information table. After receiving the fusion completion notification, the scheduling-type stateless agent reads the final business result in the business dynamic information table and sends it to the terminal.

[0068] The message exchange between the scheduling-type stateless intelligent agent and the AI ​​inference-type stateless intelligent agent includes a globally unique session identifier and an execution notification; the session dynamic information table, the business dynamic information table, and the inference data in the table are not directly transmitted between intelligent agents through the interface. Each intelligent agent accesses the distributed key-value cache cluster for data reading and writing based on the globally unique session identifier.

[0069] When a session is established, the scheduling-type stateless agent reads a static structure template from a persistent relational database and instantiates it to generate a session dynamic information table, which is then written to a distributed key-value cache cluster. Only when the scheduling-type stateless agent issues a reasoning task to the corresponding AI reasoning-type stateless agent does it read the dedicated static structure template corresponding to the AI ​​reasoning-type stateless agent from the persistent relational database, instantiate it, and generate a business dynamic information table. During the instantiation phase, the scheduling-type stateless agent writes preset task configuration and task description information, and then writes the business dynamic information table to the distributed key-value cache cluster. The session dynamic information table and the generated business dynamic information table in the distributed key-value cache cluster are retained during the session's duration, and the reasoning results are stored in the business dynamic information table. The scheduling-type stateless agent periodically inspects all sessions and calculates the session idle time. When a session meets any of the following conditions—idle timeout, terminal issuing a termination command, or system determining a session abnormality—the session dynamic information table and the business dynamic information table corresponding to that session are cleaned up together. The distributed key-value cache cluster sets a lifecycle, which consists of a dual recycling mechanism for session data, consisting of scheduled inspection and cleanup and automatic cleanup upon expiration.

[0070] This solution employs a layered and collaborative dual cache resource reclamation mechanism. The two mechanisms work together and complement each other. A single mechanism cannot achieve complete session lifecycle management, and the collaboration of multiple mechanisms can prevent invalid zombie sessions from occupying cache memory for a long time. First, the business layer proactive cleanup mechanism: The scheduling-type stateless intelligent agent has a built-in timed inspection task, with an example inspection cycle set to 3 minutes. Each inspection traverses all online sessions in the system, reads the last interaction time of each session to calculate the idle inactivity duration, and sets a preset idle timeout threshold of 10 minutes. If a session meets any of the following conditions: idle timeout, terminal issuing a session exit command, or system determining that the session is abnormal, the scheduling-type stateless intelligent agent proactively calls the cache cluster interface to clear all session dynamic information tables and business dynamic information tables associated with the globally unique session identifier, and under normal circumstances, promptly reclaims idle session storage resources. Specifically, the scheduling-type stateless intelligent agent traverses all sessions in the system according to a preset cycle, reads the last access record corresponding to each globally unique session identifier, and calculates the current idle inactivity duration of each session. When it is determined that the idle inactivity duration of any session exceeds the system's preset duration threshold, the scheduling-type stateless intelligent agent calls the distributed key-value cache cluster operation interface to uniformly clear the session dynamic information table and all associated business dynamic information tables corresponding to the globally unique session identifier, releasing cluster storage resources.

[0071] Second, the underlying cache cleanup mechanism: The distributed key-value cache cluster natively carries two sets of expired data cleanup logic: access-triggered lazy deletion and background periodic random sampling detection. If the scheduling service crashes or goes offline, the scheduled inspection and interactive renewal TTL functions will all fail, and the cache entries will continue to be timed until the preset TTL duration is reached. The cache cluster will automatically clean up expired cache data through access verification and background batch sampling, forming a backup guarantee in failure scenarios and improving the shortcomings of existing technologies that rely on a single recycling mechanism and accumulate dirty data after failure.

[0072] When a stateless agent of the scheduling class binds a globally unique session identifier based on a static structure template, instantiates and generates a session dynamic information table, and writes it to a distributed key-value cache cluster, it simultaneously configures a preset total lifetime (TTL) for all cached storage entries corresponding to the current session. It also builds a fallback cleanup mechanism based on the native expiration and eviction capabilities of the distributed key-value cache cluster. This TTL is the maximum lifespan of a cache entry after a single renewal. Regular read and write operations on the session dynamic information table and the business dynamic information table will not reset the TTL. Only the stateless agent of the scheduling class has the operation permission to refresh the cache TTL. The scheduling-type stateless agent has an active session renewal rule: after each round of user interaction and inference task is completed, it actively calls the cache interface to refresh the TTL of all cache entries in the current session. Continuously active sessions can be renewed in cycles, and automatic cache cleanup will not be triggered in normal continuous interaction scenarios. Under normal system operation, the system relies on a periodic, timed inspection mechanism by a stateless, scheduling agent to identify and proactively clean up idle, timed-out sessions. Only when the scheduling service crashes or goes offline, rendering the inspection mechanism ineffective and unable to perform proactive cleanup and TTL renewal operations, does the distributed key-value cache cluster's TTL expiration mechanism act as a fallback. The distributed key-value cache cluster has built-in dual expiration detection logic, including an access-triggered lazy deletion mechanism and a background periodic random sampling proactive detection mechanism. When any cache entry is detected to have reached its preset total lifetime without renewal, the system automatically cleans up the session dynamic information table associated with that globally unique session identifier, all business dynamic information tables, and related cache data. The automatic cache TTL expiration fallback mechanism and the scheduling periodic inspection proactive cleanup mechanism work together to construct a hierarchical dual session cache resource reclamation system. During normal system operation, the scheduling proactive inspection cleanup is the primary method, while the automatic cache TTL expiration cleanup serves as a fallback guarantee; the two are not interchangeable.

[0073] This invention enhances system security and data reliability through a rigid permission isolation mechanism: only scheduling-type stateless agents possess full control permissions to read static structure templates, create session dynamic information tables and business dynamic information tables, refresh cache TTL, and actively delete cached data; AI inference-type stateless agents only have permissions to read and populate their own dedicated business dynamic information tables, and cannot modify session dynamic information table index pointers, adjust cache TTL duration, or actively delete cached data. This strict separation of rights and responsibilities prevents AI inference-type stateless agents from accidentally tampering with global scheduling metadata, reducing the probability of data conflicts and dirty cached data.

[0074] The overall architecture relies on a star-shaped isolated scheduling topology, hierarchical storage of dynamic and static data, lightweight credential interaction, and a multi-layered mechanism for dual cache reclamation to achieve integrated collaborative operation. This simultaneously addresses several technical shortcomings of existing multi-agent architectures, including high coupling, bottlenecks in large message transmission concurrency, high risks associated with form iteration, a single session resource reclamation strategy, and the susceptibility to loss of long session context. All component responsibilities are completely separated and decoupled. The scheduling layer focuses on scheduling massive concurrent sessions, while the inference layer concentrates on AI model computation, with the performance of the two layers independent of each other. This architecture adopts a layered design that decouples stateless agents for scheduling from stateless agents for AI inference, offering superior horizontal scalability compared to tightly coupled, integrated architectures. The architecture inherently supports horizontal scaling, allowing for independent expansion of scheduling or inference instances as needed through cluster deployment. This flexibly adapts to the growth in business concurrency and inference computing power requirements, ensuring overall system stability and secure and reliable project implementation.

[0075] The overall execution process is divided into six stages: session initialization, form loading, lightweight task distribution, branch inference operation, aggregation and fusion, and session resource reclamation. The scheduling-type stateless agent receives session service requests from the terminal, identifies the corresponding business scenario, and generates a globally unique session identifier. During session initialization, the scheduling-type stateless agent reads the session dynamic table structure template from the persistent relational database, instantiates and generates a session dynamic information table, and writes it to the distributed key-value cache cluster. This session dynamic information table serves as the address index for the reserved business dynamic information table in the global master control form. No business dynamic information table is generated during this stage. Simultaneously, the scheduling-type stateless agent configures a lifetime for all cached entries in the current session. The time-to-live (TTL) is limited; throughout all rounds of human-computer interaction within the same session from creation to destruction, the session's dynamic information table is continuously reused, eliminating the need to repeatedly read the static structure template and create a new master control form. Each round of interaction only updates the interaction round, scheduling steps, and cache index of the business dynamic information table within the table, while retaining historical association information of the form. The scheduling-type stateless agent advances business according to a preset task orchestration scheme. Only when a certain type of AI inference task is issued does it read the business dynamic table structure template specific to the corresponding AI inference-type stateless agent, instantiate and generate the business dynamic information table as needed, store it in the cache, and write the cache address of the form into the index area of ​​the session dynamic information table to achieve business form loading. The scheduling-type stateless agent... The system and various stateless AI inference agents form a star-shaped scheduling topology. These stateless AI inference agents operate independently, without point-to-point communication links. Interactions between them only involve transmitting a globally unique session identifier as a lightweight credential; complete forms are not transmitted across agents. Each stateless AI inference agent reads the session dynamic information table based on its globally unique session identifier, locates its own dedicated business dynamic information table using a built-in address index, and only has read / write permissions for this table, unable to access persistent relational databases to read static structure templates. After completing branch inference operations, it fills the form with the results and sends a lightweight execution notification to the scheduling stateless agent. The scheduling stateless agent sequentially receives notifications of each branch inference completion. Knowing that after all the pre-inference tasks are completed, the AI ​​inference stateless agent responsible for aggregation and fusion will perform comprehensive calculations. This aggregation agent will read all form indexes in the session dynamic information table, pull intermediate inference data from all business dynamic information tables to complete the fusion, store the final business results in its own dedicated business dynamic information table, and report the aggregation completion notification. The scheduling stateless agent will not participate in any AI inference or data fusion calculations. After receiving the aggregation completion notification, it will only read the final data in the form corresponding to the aggregation agent and push it to the terminal. At the same time, the scheduling stateless agent will periodically check the idle time of all session identifications and form a dual cache resource reclamation system in combination with the automatic expiration mechanism of cache entry TTL.

[0076] Compared to existing multi-agent scheduling architectures, this invention has the following beneficial technical effects: 1. Flexible and configurable scheduling modes: Based on the list of agents to be scheduled and the execution order field in the session dynamic information table, three execution modes can be configured as needed: single agent serial, multi-agent serial queuing, and multi-agent parallel operation. One underlying architecture can adapt to different business scenarios such as lightweight single inference and multi-model collaborative fusion, and reuse the same session cache and lifecycle management logic to reduce the cost of repeated development in multiple scenarios.

[0077] 2. Physical isolation of static and dynamic data reduces iteration risk: Session dynamic table structure templates and business dynamic table structure templates are persistently stored in a persistent relational database. Session dynamic information tables and business dynamic information tables are only temporarily instantiated in a distributed key-value cache. Modifying the configuration of the static structure template will not disturb the online running session, significantly reducing the business risks of version iteration and Prompt rule updates. At the same time, the session dynamic information table is only created once during initialization, and subsequent interactions update it in place, avoiding memory fragmentation and addressing overhead caused by frequently creating new cache keys.

[0078] 3. Lightweight cross-service communication with stronger concurrency throughput: Only a unique session identifier is transmitted between intelligent agents. All data in the session dynamic information table and the business dynamic information table are hosted in a public cache cluster, avoiding blocking and timeout issues caused by large packets transmitted through the interface. The system throughput limit is higher in high-concurrency scenarios.

[0079] 4. Dual cache reclamation mechanism for more robust resource management: The business side conducts regular proactive inspections and cleanups, with cache TTL expiration as a fallback cleanup. During normal operation, idle session resources can be reclaimed in a timely manner. When the service crashes, dirty data is automatically released by the native cache expiration mechanism to avoid zombie sessions occupying memory resources for a long time.

[0080] 5. Rigid isolation of permissions, higher data security: Strictly separate data operation permissions between scheduling-type stateless intelligent agents and each AI inference-type stateless intelligent agent. AI inference-type stateless intelligent agents can only read and populate their own corresponding business dynamic information tables, and have no right to modify global session scheduling information and session index pointers (i.e., the cache storage address of each business dynamic information table). This can avoid data corruption and abnormal index pointing caused by unauthorized operations at the runtime mechanism level.

[0081] 6. Layered and decoupled architecture with outstanding horizontal scalability: The scheduling-type stateless intelligent agent and each AI inference-type stateless intelligent agent are completely decoupled and deployed in a stateless manner. The scheduling cluster or inference computing power cluster can be independently expanded according to business pressure. Compared with the traditional integrated coupled system, it has a stronger degree of freedom and elastic adaptability for expansion and can be smoothly upgraded with the scale of business.

[0082] In one embodiment, an electronic device is provided, which may be a server. Figure 4This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. The electronic device includes a processor 1001, a memory 1002, a network interface 1004, and a data bus 1005. The memory stores the operating system and a computer program implementing the method of the present invention. The data bus 1002 is used to realize data communication between the processor 1001, the memory 1005, and the network interface 1004. The processor runs the computer program to execute the multi-agent session management process described in any of the preceding embodiments. The memory has a built-in persistent relational database and a distributed key-value cache cluster. The network interface 1004 is used for communication between the terminal and the server.

[0083] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0084] This embodiment can divide the electronic device into functional modules according to the above method embodiment. For example, each module can correspond to a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and is only a logical functional division. In actual implementation, there may be other division methods.

[0085] It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0086] The electronic device provided in this embodiment is used to execute the above-described cross-language hierarchical stateless architecture AI multi-agent session management method, and thus can achieve the same effect as the above implementation method.

[0087] When using integrated units, the electronic device may include a processing module and a storage module. The processing module is used to control and manage the operation of the electronic device. The storage module is used to support the execution of program code and data by the electronic device.

[0088] The processing module may be a processor or a controller, which can implement or execute various exemplary logic blocks, modules, and circuits as disclosed in this application. The processor may also be a combination of computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and microprocessors, etc., and the storage module may be a memory.

[0089] This embodiment also provides a computer-readable storage medium (including but not limited to disk storage, CD-ROM, optical storage, etc.) storing computer program code. When the computer program code is run on a computer, the computer executes the above-mentioned related method steps to implement the AI ​​multi-agent conversation management method with a cross-language hierarchical stateless architecture provided in the above embodiment. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, Digital Video Discs (DVDs), Compact Disc Read Only Memory (CDROM), microdrives, and magneto-optical disks, Read Only Memory (ROM), Random Access Memory (RAM), Erasable Programmable Read Only Memory (EPROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Dynamic Random Access Memory (DRAM), Video Random Access Memory (VRAM), flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0090] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the AI ​​multi-agent conversation management method with a cross-language hierarchical stateless architecture provided in the above embodiment.

[0091] The beneficial effects of the above embodiments can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0092] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.

[0093] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0094] It should also be noted that in the systems and devices of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.

[0095] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0096] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.

Claims

1. A cross-language, hierarchical, stateless architecture method for AI multi-agent conversation management, characterized in that, The architecture includes a stateless intelligent agent for scheduling and at least one stateless intelligent agent for AI inference; the method includes: The stateless intelligent agent of the scheduling class receives the original session service request sent by the terminal, parses and identifies the service scenario and creates a session, generates a globally unique session identifier bound to this session, reads the static structure template in the persistent relational database, instantiates and generates a session dynamic information table, and writes it to the distributed key-value cache cluster. The stateless intelligent agent of the scheduling class schedules the stateless intelligent agent of the AI ​​inference class according to the scheduling task, instantiates and generates the corresponding business dynamic information table, and loads the task information to be executed corresponding to this scheduling during the instantiation process of the business dynamic information table and writes it into the distributed key-value cache cluster; the stateless intelligent agent of the scheduling class writes the cache address index of the business dynamic information table into the session dynamic information table. The AI ​​inference-type stateless intelligent agent reads the task information in the business dynamic information table in the distributed key-value cache cluster and performs inference operations. After the operation is completed, the inference results are backfilled and saved to the business dynamic information table. The overall process of the session is uniformly managed by the scheduling-type stateless intelligent agent. Specifically, there are no point-to-point communication links between the various AI inference stateless agents, and they do not have the permission to access static structure template data in the persistent relational database; the scheduling stateless agents and the AI ​​inference stateless agents only transmit a globally unique session identifier, and the session forms and complete inference data are not directly transmitted across agents, but are uniformly shared by a distributed key-value cache cluster; the scheduling stateless agents uniformly configure the life cycle for all cache entries corresponding to the current session, and periodically inspect and clean up idle sessions, forming a dual session resource reclamation mechanism based on the automatic cache expiration rule.

2. The AI ​​multi-agent conversation management method with a cross-language hierarchical stateless architecture according to claim 1, characterized in that, The persistent relational database has built-in globally unified session dynamic table structure templates and business dynamic table structure templates; the session dynamic table structure templates and the business dynamic table structure templates are only open to read permissions for the scheduling-type stateless intelligent agents; the AI ​​inference-type stateless intelligent agents do not have permission to access static structure template data in the persistent relational database. All business scenarios share the same dynamic table structure template for sessions; The same session dynamic information table is reused throughout the entire process from creation to destruction of a single session; After each round of user interaction is completed, the temporary scheduling flag for this round in the session dynamic information table is cleared. The next round of interaction directly reuses this table to update the interaction round, scheduling steps, and cache address index of the business dynamic information table. The session dynamic information table only stores lightweight scheduling metadata and indexes, and does not store AI inference results. The inference results are uniformly stored in the dedicated business dynamic information table of the corresponding stateless intelligent agent of the AI ​​inference class. During the session initialization phase, only an index position is reserved in the session dynamic information table, and the business dynamic information table is not generated yet. When the scheduling class stateless agent schedules the AI ​​inference class stateless agent to execute a task, the scheduling class stateless agent first reads the business dynamic table structure template exclusive to this type of agent from the persistent relational database, and then instantiates and generates the corresponding business dynamic information table. During the instantiation and generation process, the business dynamic information table loads the task information to be executed corresponding to this scheduling and writes it to the distributed key-value cache cluster. Then, the cache address of the business dynamic information table is written to the reserved index position of the session dynamic information table. When the stateless intelligent agent of the scheduling class writes to the session dynamic information table, it synchronously configures the lifetime for all subsequent cached entries of this session as a fallback mechanism for automatic cache data cleanup.

3. The AI ​​multi-agent conversation management method with a cross-language hierarchical stateless architecture according to claim 1, characterized in that, A three-tiered, interdependent, and indispensable collaborative operation mechanism is adopted. The first tier, a star-topology scheduling architecture, serves as the overall operational foundation. The second tier, a dual-layer isolated storage system, serves as the architecture's implementation carrier. The third tier, a lightweight interaction and dual recycling mechanism, serves as the session operation management method. The three-tiered mechanism works together to complete the entire session process management. Specific constraints are as follows: A cross-language dual-agent hierarchical isolated star-topic scheduling architecture is adopted. The scheduling-class stateless agent and the AI ​​inference-class stateless agent are rigidly isolated in terms of rights and responsibilities. The scheduling-class stateless agent is responsible for session creation, generating a globally unique session identifier, reading static structure templates, generating session dynamic information tables and business dynamic information tables based on template instantiation, multi-branch task orchestration, unified configuration of cache entry lifecycle, session inspection and resource cleanup, and does not participate in AI inference or multi-source data fusion operations. The AI ​​inference-class stateless agent can only read and write its own exclusive business dynamic information table within the distributed key-value cache cluster and backfill inference results. There are no point-to-point communication interfaces between the AI ​​inference-class stateless agents. All task distribution, timing control, and abnormal retry processes are uniformly coordinated and scheduled by the scheduling-class stateless agent. A dual-layer physical isolation storage system is configured for static structure templates and session runtime data; both types of static structure templates are stored only in a persistent relational database and are not written to a distributed key-value cache cluster; the session dynamic information table, as a global master form, is instantiated and generated first during the session initialization phase, while the business dynamic information table is loaded and created according to the requirements of the inference task; both types of runtime forms are stored in a distributed key-value cache cluster, and the session dynamic information table is associated with all business dynamic information tables of this session through a cache address index; during the session initialization phase, the stateless intelligent agent of the scheduling class uniformly configures the lifetime for all cache entries corresponding to the current session; A lightweight cross-service interaction mechanism with credential-based authentication and a dual-backup session lifecycle management mechanism are configured. The scheduling-type stateless agent and the AI ​​inference-type stateless agent only transmit a globally unique session identifier and a lightweight execution notification. The session dynamic information table is a lightweight master control table, storing only cache address indexes, session rounds, and scheduling step metadata. Large-capacity inference data is stored separately in the business dynamic information table. Neither type of table is directly transmitted between the two types of agents; all data is stored in a distributed key-value cache cluster. Each agent independently reads and writes the corresponding cache data using a globally unique session identifier. After a single AI operation is completed, only the temporary cache corresponding to that operation is cleared; the session dynamic information table and the business dynamic information table are retained. The scheduling-type stateless agent periodically inspects to proactively clean up idle sessions, forming a dual resource reclamation mechanism combined with the automatic expiration of cache entries upon expiration.

4. The AI ​​multi-agent conversation management method with a cross-language hierarchical stateless architecture according to claim 1, characterized in that, The scheduling-type stateless agent orchestrates tasks for the AI ​​inference-type stateless agents according to preset logic, issuing multiple inference tasks serially or in parallel. After each AI inference-type stateless agent completes its corresponding pre-inference task, it reports an execution completion notification to the scheduling-type stateless agent. Upon receiving completion notifications for all pre-inference tasks, the scheduling-type stateless agent schedules the AI ​​inference-type stateless agents undertaking data fusion tasks. The AI ​​inference-type stateless agents undertaking data fusion tasks read the session dynamic information table based on the globally unique session identifier, extract the cache address index recorded in the table, read the inference intermediate data from all business dynamic information tables generated by each AI inference-type stateless agent in this session based on the index, complete the multi-source data fusion operation, and write the fusion operation result into its corresponding business dynamic information table. After receiving the fusion completion notification, the stateless intelligent agent of the scheduling class reads the final business result in the business dynamic information table and sends it to the terminal.

5. The AI ​​multi-agent conversation management method with a cross-language hierarchical stateless architecture according to claim 1, characterized in that, The message exchange between the stateless intelligent agent of the scheduling class and the stateless intelligent agent of the AI ​​inference class includes a globally unique session identifier and an execution notification; the session dynamic information table, the business dynamic information table and the inference data in the table are not directly transmitted between intelligent agents through the interface, and each intelligent agent accesses the distributed key-value cache cluster for data reading and writing based on the globally unique session identifier.

6. The AI ​​multi-agent conversation management method with a cross-language hierarchical stateless architecture according to claim 1, characterized in that: When a session is established, the stateless agent of the scheduling class reads a template from a persistent relational database and instantiates and generates a session dynamic information table, and then writes the session dynamic information table into a distributed key-value cache cluster. Only when the scheduling-class stateless agent issues an inference task to the corresponding AI inference-class stateless agent, the dedicated template corresponding to the AI ​​inference-class stateless agent is read from the persistent relational database for instantiation, generating a business dynamic information table. The scheduling-class stateless agent writes preset task configuration and task description information during the instantiation stage, and then writes the business dynamic information table into the distributed key-value cache cluster. The session dynamic information table and the generated business dynamic information table in the distributed key-value cache cluster are retained during the session life, and the inference results are stored in the business dynamic information table. The stateless intelligent agent of the scheduling class periodically inspects all sessions and counts the idle time of the sessions; When a session meets any of the following conditions: idle timeout, terminal issues termination command, or system determines session abnormality, the session dynamic information table and the business dynamic information table corresponding to that session will be cleared together. The distributed key-value cache cluster sets a lifecycle, which consists of a dual recycling mechanism for session data, consisting of scheduled inspection and cleanup and automatic cleanup upon expiration.

7. A cross-language, layered, stateless AI multi-agent conversation management system, characterized in that, include: The system consists of a scheduling-type stateless intelligent agent, at least one AI reasoning-type stateless intelligent agent, a persistent relational database, and a distributed key-value cache cluster. The persistent relational database stores static structure templates, which include session dynamic table structure templates and business dynamic table structure templates corresponding to each stateless AI inference agent. The static structure templates are stored only in the persistent relational database and are not written to the distributed key-value cache cluster during the initialization and operation phases. The stateless intelligent agent of the scheduling class has table instantiation management function: during the session initialization phase, it reads the session dynamic table structure template, instantiates and generates a session dynamic information table and writes it into the distributed key-value cache cluster. The session dynamic information table is the main control table and has built-in cache entry address indexes corresponding to all business dynamic information tables. Only when it is necessary to issue an inference task to the corresponding stateless intelligent agent of the AI ​​inference class, the stateless intelligent agent of the scheduling class reads the exclusive business dynamic table structure template, instantiates and generates a business dynamic information table as needed and stores it in the distributed key-value cache cluster, and writes the cache address of the business dynamic information table into the index of the session dynamic information table. When a session is created, the stateless intelligent agent of the scheduling class configures the lifetime for all cache entries of the session. The AI ​​inference stateless agents do not have permission to access static structure template data in persistent relational databases and cannot read arbitrary static structure templates. They only read the session dynamic information table in the distributed key-value cache cluster based on the globally unique session identifier, locate their own exclusive business dynamic information table through address indexing, perform inference operations, and fill the inference results back into the corresponding business dynamic information table. There is no communication interaction between the AI ​​inference stateless agents. Only the scheduling stateless agent establishes a star communication channel with the AI ​​inference stateless agent. The interaction between the two only transmits the globally unique session identifier and lightweight execution notifications. Large-capacity business data is not transmitted through the communication channel. Data sharing is achieved by relying on the distributed key-value cache cluster as a shared storage carrier. The stateless intelligent agent for scheduling also has session inspection and active cleanup functions. It periodically inspects all sessions and determines the idle time of the sessions. When a session meets any of the following conditions: idle timeout, terminal issues a termination command, or session abnormality, all cache entries corresponding to the globally unique session identifier are cleared. The stateless intelligent agent for scheduling uniformly configures the life-time of cache entries. The distributed key-value cache cluster automatically cleans up cache entries that have reached the TTL as a fallback. This fallback cleanup method works in conjunction with the active cleanup by the stateless intelligent agent for scheduling to form a dual recycling mechanism for session data.

8. An electronic device, characterized in that, Including the processor and memory; The memory is used to store computer programs; When the processor executes the computer program, it implements the AI ​​multi-agent session management method with a cross-language hierarchical stateless architecture as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the AI ​​multi-agent session management method with a cross-language hierarchical stateless architecture as described in any one of claims 1 to 6.