A multi-agent collaborative architecture system based on a layered collaborative protocol

By using a hierarchical collaboration protocol and an anti-circular dependency mechanism, the problems of circular dependency, low collaboration efficiency, inconsistent states, and imperfect supervision mechanisms in multi-agent systems are solved, achieving efficient collaboration and state consistency among agents and improving the stability and collaboration efficiency of the system.

CN122174858APending Publication Date: 2026-06-09杨钦智

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
杨钦智
Filing Date
2025-11-14
Publication Date
2026-06-09

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The application discloses a kind of multi-agent collaborative architecture systems based on layered collaborative protocol, including at least two AI agents, layered collaborative protocol module and anti-cycle dependency mechanism.The layered collaborative protocol module includes state synchronization layer, task coordination layer, knowledge sharing layer and supervision feedback layer, for realizing the efficient collaboration between agents;The anti-cycle dependency mechanism includes event bus asynchronous communication module, one-way data flow control module and supervision object separation module, to prevent the cycle dependency between agents.The application solves the technical problems of the existing multi-agent system, such as cycle dependency, low collaboration efficiency, inconsistent state, difficulty in knowledge sharing, and imperfect supervision mechanism, by layered collaborative protocol and anti-cycle dependency mechanism, significantly improves the collaboration efficiency and system stability of multi-agent system.Experimental results show that the cycle dependency elimination rate of the application reaches 100%, the collaboration efficiency is improved by 50%-80%, the state consistency is above 99.9%, and the system availability is above 99.9%, with significant technical effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, specifically to a multi-agent collaborative architecture system based on a hierarchical collaborative protocol, and in particular to a multi-agent system architecture that can prevent circular dependencies, achieve efficient collaboration, ensure state consistency, promote knowledge sharing, and improve the supervision mechanism. Background Technology

[0002] With the rapid development of artificial intelligence (AI) technology, multi-agent systems have become an important research direction in the field. Multi-agent systems, through the collaborative work of multiple agents, can accomplish complex tasks that are difficult for a single agent to complete, and have broad application prospects in areas such as intelligent customer service, intelligent recommendation, intelligent monitoring, and intelligent decision-making. However, existing multi-agent systems suffer from the following serious technical problems, which severely restrict their practical application and commercialization.

[0003] 1. Circular Dependency Problem (Serious Technical Defect): Circular calls and dependencies can easily form between multiple agents, leading to serious problems such as system deadlock, performance degradation, and resource waste. Specifically, this manifests as: Agent A calling Agent B, and Agent B calling Agent A in turn, forming a circular dependency; Agent A → Agent B → Agent C → Agent A, forming multi-level circular dependencies; circular dependencies cause system deadlock, preventing task execution; circular dependencies cause CPU utilization to spike, resulting in a sharp decline in system performance; circular dependencies lead to memory leaks and exhaustion of system resources. Technical impacts include: reduced system availability and increased failure rate; decreased system performance and prolonged response time; wasted system resources and increased costs; poor user experience and low system reliability.

[0004] 2. Low Collaboration Efficiency (Core Performance Issue): The lack of an effective collaboration mechanism leads to low collaboration efficiency among agents, preventing them from fully utilizing each other's strengths. Specific manifestations include: a lack of a unified state synchronization mechanism, resulting in inconsistent states; a lack of an effective task coordination mechanism, leading to unreasonable task allocation; a lack of a knowledge-sharing mechanism, preventing the utilization of individual knowledge and experience; and a lack of a supervision and feedback mechanism, hindering timely problem detection and resolution. Existing technological shortcomings include: the use of synchronous invocation methods, which can easily lead to system blocking; a lack of hierarchical collaboration protocols, resulting in a chaotic collaboration mechanism; and a lack of intelligent routing and predictive collaboration, leading to low collaboration efficiency. Technical impacts include: low collaboration efficiency and long task completion times; low resource utilization and high costs; and low system throughput, failing to meet the needs of large-scale applications.

[0005] 3. State Inconsistency (Data Consistency Issue): An imperfect state synchronization mechanism among multiple agents can easily lead to state inconsistencies, affecting the accuracy of system decisions. Specific manifestations include: agent A updating its state, but agent B not updating its state in a timely manner; multiple agents having inconsistent understandings of the same state; and high state synchronization latency, impacting real-time decision-making. Existing technological shortcomings include: lack of a unified state synchronization mechanism; inefficient polling-based state synchronization; and the potential for blocking due to synchronous methods. Technical impacts include: reduced system decision accuracy; poor user experience and low system reliability; and decreased system reliability and increased failure rate.

[0006] 4. Difficulties in Knowledge Sharing (Knowledge Management Problems): The knowledge-sharing mechanism among agents is imperfect, making it impossible to effectively utilize their respective knowledge and experience. Specific manifestations include: agent A's knowledge cannot be used by agent B; duplicate knowledge storage wastes storage resources; inconsistent knowledge versions affect decision-making accuracy; existing technological deficiencies include: lack of a unified knowledge base; lack of knowledge version control mechanisms; and lack of knowledge retrieval and sharing mechanisms. Technological impacts include: low knowledge utilization rate, low system intelligence level; wasted storage resources and increased costs; and reduced system decision-making accuracy.

[0007] 5. Inadequate Oversight Mechanism (Quality Assurance Issues): The lack of an effective oversight mechanism hinders the timely detection and resolution of system problems. Specific manifestations include: inability to promptly detect system failures; inability to promptly identify business quality issues; and inability to optimize system performance in a timely manner. Existing technological deficiencies include: lack of a business quality oversight mechanism; lack of a system health oversight mechanism; and lack of a feedback mechanism. Technological impacts include: reduced system reliability and increased failure rate; decreased business quality and poor user experience; and inability to continuously optimize system performance.

[0008] Limitations of existing technologies: Although there is some research on multi-agent systems in the existing technologies, the following limitations exist: (1) Lack of anti-cyclic dependency mechanism: Most systems lack an effective anti-cyclic dependency mechanism and cannot solve the problem of circular dependency. (2) Imperfect coordination mechanism: Existing coordination mechanisms often adopt synchronous calling methods, which can easily lead to system blocking and performance degradation. (3) Lack of layered coordination protocol: Existing coordination mechanisms lack layered design, and the coordination protocol is chaotic, making it difficult to maintain and extend. (4) Lack of intelligent coordination: Existing coordination mechanisms lack AI-driven intelligent coordination and cannot intelligently select coordination strategies based on historical data and real-time status. (5) Lack of practical application verification: Most existing multi-agent systems remain in the research stage and lack sufficient verification in practical application scenarios.

[0009] Technical Requirements: Therefore, there is an urgent need for a multi-agent collaborative architecture system that can effectively prevent circular dependencies, achieve efficient collaboration, ensure state consistency, promote knowledge sharing, and improve the supervision mechanism to meet the needs of practical application scenarios. Summary of the Invention

[0010] The purpose of this invention is to provide a multi-agent collaborative architecture system based on a hierarchical collaborative protocol to solve the technical problems existing in the multi-agent system, such as circular dependency, low collaborative efficiency, inconsistent states, difficulty in knowledge sharing, and imperfect supervision mechanism. This invention aims to achieve efficient collaboration among agents, ensure state consistency, promote knowledge sharing, improve the supervision mechanism, and significantly improve the collaborative efficiency and system stability of the multi-agent system.

[0011] The layered collaboration protocol module, used to realize collaboration between the first intelligent agent and the second intelligent agent, includes: - A state synchronization layer: used to asynchronously synchronize the business state of the first intelligent agent and the monitoring state of the second intelligent agent via an event bus. The state synchronization layer includes a business state synchronization module, a monitoring state synchronization module, and a state history query module. The business state synchronization module asynchronously pushes the business state of the first intelligent agent to the second intelligent agent via the event bus, the monitoring state synchronization module asynchronously pushes the monitoring state of the second intelligent agent to the first intelligent agent via the event bus, and the state history query module is used to query and trace the state history records. - A task coordination layer: used to coordinate the business tasks of the first intelligent agent and the monitoring tasks of the second intelligent agent. The task coordination layer includes a task allocation module, a task execution monitoring module, and a task result feedback module. The task allocation module allocates tasks according to task type and intelligent agent capabilities, the task execution monitoring module monitors the task execution status and progress, and the task result feedback module feeds back the task execution results to the task initiator. - A knowledge sharing layer: used to share the business knowledge of the first intelligent agent and the monitoring knowledge of the second intelligent agent through a unified knowledge base. The knowledge sharing layer includes a unified knowledge base, a knowledge retrieval module, and a knowledge version control module. A unified knowledge base stores the business knowledge of the first intelligent agent and the monitoring knowledge of the second intelligent agent. The knowledge retrieval module retrieves relevant knowledge based on query conditions, and the knowledge version control module manages knowledge versions to avoid knowledge conflicts. - Supervision and Feedback Layer: Used to implement business quality supervision and system health supervision. The supervision and feedback layer includes a business quality supervision module and a system health supervision module, which are respectively handled by the first and second intelligent agents, and the supervision objects do not overlap.

[0012] The anti-circular dependency mechanism is used to prevent circular dependencies between the first and second intelligent agents, including: - An asynchronous communication module for event buses: used to achieve asynchronous communication through an event bus to avoid synchronous call loops. The event bus adopts a publish-subscribe pattern and includes business status event topics, monitoring status event topics, and task coordination event topics. - A unidirectional data flow control module: used to control the data flow to be unidirectional. The first intelligent agent transmits business data to the second intelligent agent, and the second intelligent agent transmits monitoring insights to the first intelligent agent, avoiding circular dependencies caused by bidirectional calls. - A supervision object separation module: used to separate supervision objects. The first intelligent agent supervises business quality, and the second intelligent agent supervises system health. The supervision objects do not overlap, avoiding supervision loops. The anti-circular dependency mechanism also includes a request tracker, a dependency graph detection module, a loop blocker, and an anomaly alarm module. The request tracker tracks the request call chain between intelligent agents, the dependency graph detection module detects the existence of circular dependencies, the loop blocker blocks requests when a circular dependency is detected, and the anomaly alarm module issues an alarm when a circular dependency is detected.

[0013] The capability boundary matrix is ​​used to define the capability domains of the first intelligent agent and the second intelligent agent, including: - First intelligent agent capability domain: business decision-making, business analysis, business knowledge, user interaction; - Second intelligent agent capability domain: system monitoring, system analysis, system optimization, resource management; - Shared capability domain: knowledge sharing, state synchronization, task coordination, supervision and feedback.

[0014] An AI-driven collaboration mechanism (optional) is used to intelligently select collaboration strategies based on historical data and real-time status, including: - Intelligent routing engine: intelligently routes tasks based on task characteristics and agent status; - Predictive collaboration engine: predicts collaboration needs and prepares resources in advance; - Adaptive collaboration engine: adaptively adjusts collaboration strategies based on system status; - Explainable collaboration engine: explains the collaboration decision-making process.

[0015] Beneficial Effects: Compared with existing technologies, this invention has the following beneficial effects: 1. Effectively prevents circular dependencies: Through asynchronous communication via event bus, unidirectional data flow control, and separation of supervised objects, circular dependencies between agents are effectively prevented, avoiding system deadlock and performance degradation. 2. Improves collaborative efficiency: Through a layered collaborative protocol, state synchronization, task coordination, knowledge sharing, and supervision feedback are achieved, significantly improving the collaborative efficiency between agents. 3. Ensures state consistency: Through the state synchronization layer, the states between agents are synchronized in real time, ensuring state consistency and improving the accuracy of system decisions. 4. Promotes knowledge sharing: Through the knowledge sharing layer, knowledge sharing between agents is achieved, making full use of their respective knowledge and experience. 5. Improves the supervision mechanism: Through the supervision feedback layer, business quality supervision and system health supervision are achieved, enabling timely detection and resolution of system problems. 6. Improves system scalability: Through the capability boundary matrix, the capability domains of agents are clearly defined, facilitating system expansion and maintenance. 7. Intelligent collaborative decision-making: Through an AI-driven collaborative mechanism, collaborative strategies are intelligently selected based on historical data and real-time states, further improving collaborative efficiency.

[0016] Detailed Implementation: The present invention will be described in detail below with reference to specific embodiments.

[0017] Example 1: Basic Implementation of a Multi-Agent Collaborative Architecture System (Taking a Two-Agent System as an Example). This example provides a basic implementation of a multi-agent collaborative architecture system based on a hierarchical collaborative protocol. This example uses a two-agent system (Sky and Stella) as an example to demonstrate the implementation of the multi-agent collaborative architecture. However, the scope of protection of this invention includes at least two AI agents, i.e., all scenarios such as two-agent, three-agent, and multi-agent systems.

[0018] System Architecture: The system comprises two AI agents: Sky (the first agent) and Stella (the second agent). - Sky (the first agent): Responsible for business decision-making and analysis, including a business decision engine, a business analysis engine, a business knowledge base, and a user interface. - Stella (the second agent): Responsible for system monitoring and optimization, including a system monitoring engine, a system analysis engine, a system optimization engine, and a resource management module.

[0019] Layered Collaboration Protocol Implementation 1. Implementation of the state synchronization layer: The state synchronization layer realizes asynchronous state synchronization through the event bus.

[0020] / / Event Bus Interface Definition interface EventBus { publish(topic: string, event: Event): Promise <void>; subscribe(topic: string, handler: EventHandler): Promise <void>; } / / Sky business status synchronization class SkyStateSync { async syncBusinessState(state: BusinessState): Promise <void>{ const event: BusinessStateEvent = { type: 'business_state_changed', agent: 'Sky', state: state, timestamp: Date.now() }; await eventBus.publish('sky.business.state', event); } } / / Stella Monitoring State Synchronization class StellaStateSync { async syncMonitoringState(state: MonitoringState): Promise <void>{ const event: MonitoringStateEvent = { type: 'monitoring_state_changed', agent: 'Stella', state: state, timestamp: Date.now() }; await eventBus.publish('stella.monitoring.state', event); } } 2. Task Coordination Layer Implementation: The task coordination layer uses a task coordinator to allocate and coordinate tasks.

[0021] / / Task Coordinator Interface Definition interface TaskCoordinator { assignTask(task: Task): Promise <taskassignment>; monitorTask(taskId: string): Promise <taskstatus>; feedbackTaskResult(taskId: string, result: TaskResult): Promise <void>; } / / Task type definition enum TaskType { BUSINESS_DECISION = 'business_decision', SYSTEM_MONITORING ='system_monitoring', KNOWLEDGE_RETRIEVAL = 'knowledge_retrieval', SUPERVISION_FEEDBACK ='supervision_feedback' } / / Task assignment implementation class TaskCoordinatorImpl implements TaskCoordinator { private agentCapabilities = { 'Sky': [TaskType.BUSINESS_DECISION, TaskType.KNOWLEDGE_RETRIEVAL], 'Stella': [TaskType.SYSTEM_MONITORING, TaskType.SUPERVISION_FEEDBACK] }; async assignTask(task: Task): Promise <taskassignment>{ / / Assign tasks based on task type and agent capabilities if (task.type === TaskType.BUSINESS_DECISION) { return { agent: 'Sky', taskId: task.id, priority: task.priority}; } else if (task.type === TaskType.SYSTEM_MONITORING) { return { agent: 'Stella', taskId: task.id, priority:task.priority}; } / / Intelligent allocation: Allocate tasks based on the agent's current load and task characteristics. const agentLoads = await this.getAgentLoads(); const bestAgent = this.selectBestAgent(task, agentLoads); return { agent: bestAgent, taskId: task.id, priority:task.priority}; } private async getAgentLoads(): Promise <Map<string, number> >{ const loads = new Map<string, number> (); loads.set('Sky', await this.getSkyLoad()); loads.set('Stella', await this.getStellaLoad()); return loads; } private selectBestAgent(task: Task, loads: Map<string, number> ):string { / / Select the agent with the lowest workload let bestAgent = 'Sky'; let minLoad = loads.get('Sky') || 0; loads.forEach((load, agent) =>{ if (load<minLoad) { minLoad = load; bestAgent = agent; } }); return bestAgent; } async monitorTask(taskId: string): Promise <taskstatus>{ / / Monitor task execution status and progress const task = await this.getTask(taskId); return { taskId: taskId, status: task.status, progress: task.progress, startTime: task.startTime, estimatedCompletionTime: task.estimatedCompletionTime }; } async feedbackTaskResult(taskId: string, result: TaskResult):Promise <void>{ / / Feedback the task execution results to the task initiator const task = await this.getTask(taskId); const feedbackEvent: TaskResultEvent = { type: 'task_result', taskId: taskId, result: result, timestamp: Date.now() }; await eventBus.publish(`task.${taskId}.result`, feedbackEvent); } } 3. Knowledge Sharing Layer Implementation: The knowledge sharing layer achieves knowledge sharing through a unified knowledge base.

[0022] / / Unified Knowledge Base Interface Definition interface KnowledgeBase { store(knowledge: Knowledge): Promise <void>; retrieve(query: KnowledgeQuery): Promise<Knowledge[]>; updateVersion(knowledgeId: string, version: string): Promise <void>; } / / Knowledge sharing implementation class KnowledgeSharingLayer { async shareBusinessKnowledge(knowledge: BusinessKnowledge): Promise <void>{ await knowledgeBase.store({ type: 'business', source: 'Sky', content: knowledge, version: '1.0' }); } async shareMonitoringKnowledge(knowledge: MonitoringKnowledge):Promise <void>{ await knowledgeBase.store({ type: 'monitoring', source: 'Stella', content: knowledge, version: '1.0' }); } } 4. Supervision and Feedback Layer Implementation: The supervision and feedback layer implements business quality supervision and system health supervision through the supervision and feedback device.

[0023] / / Supervision Feedback Interface Definition interface SupervisionFeedback { superviseBusinessQuality(metrics: BusinessMetrics): Promise <feedback>; superviseSystemHealth(metrics: SystemMetrics): Promise <feedback>; } / / Supervision feedback implementation class SupervisionFeedbackLayer implements SupervisionFeedback { async superviseBusinessQuality(metrics: BusinessMetrics): Promise <feedback>{ / / Sky supervises business quality const feedback = await sky.superviseBusinessQuality(metrics); return feedback; } async superviseSystemHealth(metrics: SystemMetrics): Promise <feedback>{ / / Stella monitoring system health const feedback = await stella.superviseSystemHealth(metrics); return feedback; } } Implementation of anti-circular dependency mechanism 1. Event Bus Asynchronous Communication: The event bus adopts a publish-subscribe pattern to achieve asynchronous communication and avoid synchronous call loops.

[0024] / / Event bus implementation class EventBusImpl implements EventBus { private subscribers: Map<string, EventHandler[]> = new Map(); async publish(topic: string, event: Event): Promise <void>{ const handlers = this.subscribers.get(topic) || ​​[]; / / Asynchronous processing to avoid blocking handlers.forEach(handler =>{ setImmediate(() =>handler(event)); }); } async subscribe(topic: string, handler: EventHandler): Promise <void>{ if (!this.subscribers.has(topic)) { this.subscribers.set(topic, []); } this.subscribers.get(topic)!.push(handler); } } 2. Unidirectional data flow control: Controls data flow to be unidirectional, with Sky transmitting business data to Stella and Stella transmitting monitoring insights to Sky.

[0025] / / Unidirectional data flow control class UnidirectionalDataFlow { / / Sky → Stella: Business Data async sendBusinessData(data: BusinessData): Promise <void>{ await eventBus.publish('sky.business.data', data); } / / Stella → Sky:监控洞察 async sendMonitoringInsight(insight: MonitoringInsight): Promise <void>{ await eventBus.publish('stella.monitoring.insight', insight); } } 3. Separation of monitoring objects: Separate monitoring objects, Sky monitors business quality, and Stella monitors system health, with no overlap in monitoring objects.

[0026] / / Separation of Supervision Objects class SupervisionSeparation { / / Sky monitors business quality async superviseBusinessQuality(metrics: BusinessMetrics): Promise <void>{ Sky only monitors business quality, not system health. await sky.superviseBusinessQuality(metrics); } / / Stella monitoring system health async superviseSystemHealth(metrics: SystemMetrics): Promise <void>{ Stella only monitors system health, not business quality. await stella.superviseSystemHealth(metrics); } } 4. Circular Dependency Detection: Circular dependencies are detected through the request tracer and dependency graph detection module.

[0027] / / Request Tracker class RequestTracker { private callChain: Map<string, string[]> = new Map(); private callHistory: Array<{from: string, to: string, timestamp:number}>= []; trackCall(from: string, to: string): void { const chain = this.callChain.get(from) || []; chain.push(to); this.callChain.set(from, chain); / / Record call history this.callHistory.push({ from: from, to: to, timestamp: Date.now() }); / / Detect circular dependencies if (this.detectCycle(from, to)) { const error = new Error(`Circular dependency detected: ${from} →${to}`); this.triggerAlarm(error); throw error? } } private detectCycle(from: string, to: string): boolean { const visited = new Set <string>(); return this.hasCycle(to, from, visited); } private hasCycle(current: string, target: string, visited: Set <string>): boolean { if (current === target) return true; if (visited.has(current)) return false; visited.add(current); const chain = this.callChain.get(current) || []; return chain.some(next =>this.hasCycle(next, target, visited)); } private triggerAlarm(error: Error): void { / / Trigger exception alarm const alarmEvent: AlarmEvent = { type: 'circular_dependency_alarm', error: error.message, timestamp: Date.now(), callHistory: this.callHistory.slice(-10) / / The last 10 call histories }; eventBus.publish('system.alarm', alarmEvent); } / / Get call chain statistics getCallChainStats(): CallChainStats { return { totalCalls: this.callHistory.length, uniqueChains: this.callChain.size, averageChainLength: this.calculateAverageChainLength() }; } private calculateAverageChainLength(): number { let totalLength = 0; this.callChain.forEach(chain =>{ totalLength += chain.length; }); return this.callChain.size>0? totalLength / this.callChain.size :0; } } / / Dependency graph detection module class DependencyGraphDetector { private dependencyGraph: Map<string, Set <string>>= new Map(); addDependency(from: string, to: string): void { if (!this.dependencyGraph.has(from)) { this.dependencyGraph.set(from, new Set()); } this.dependencyGraph.get(from)!.add(to); } detectCycle(): boolean { const visited = new Set <string>(); const recursionStack = new Set <string>(); for (const node of this.dependencyGraph.keys()) { if (!visited.has(node)) { if (this.detectCycleDFS(node, visited, recursionStack)) { return true; } } } return false; } private detectCycleDFS(node: string, visited: Set <string>,recursionStack: Set <string>): boolean { visited.add(node); recursionStack.add(node); const dependencies = this.dependencyGraph.get(node) || new Set(); for (const dependency of dependencies) { if (!visited.has(dependency)) { if (this.detectCycleDFS(dependency, visited, recursionStack)) { return true; } } else if (recursionStack.has(dependency)) { return true; / / Found circular dependency } } recursionStack.delete(node); return false; } getCyclePath(): string[] | null { const visited = new Set <string>(); const recursionStack = new Set <string>(); const path: string[] = []; for (const node of this.dependencyGraph.keys()) { if (!visited.has(node)) { const cyclePath = this.getCyclePathDFS(node, visited,recursionStack, path); if (cyclePath) { return cyclePath; } } } return null; } private getCyclePathDFS(node: string, visited: Set <string>,recursionStack: Set <string>, path: string[]): string[] | null { visited.add(node); recursionStack.add(node); path.push(node); const dependencies = this.dependencyGraph.get(node) || new Set(); for (const dependency of dependencies) { if (!visited.has(dependency)) { const cyclePath = this.getCyclePathDFS(dependency, visited, recursionStack, path); if (cyclePath) { return cyclePath; } } else if (recursionStack.has(dependency)) { / / Detect circular dependency, return the circular path const cycleStart = path.indexOf(dependency); return path.slice(cycleStart).concat([dependency]); } } recursionStack.delete(node); path.pop(); return null; } } / / Circular blocker class CycleBlocker { async blockRequest(requestId: string, reason: string): Promise <void>{ const blockEvent: BlockEvent = { type: 'request_blocked', requestId: requestId, reason: reason, timestamp: Date.now() }; await eventBus.publish('system.block', blockEvent); / / Record blocking logs console.error(`Request ${requestId} blocked: ${reason}`); } } Example 2: Implementation of AI-driven collaborative mechanism. This example adds an AI-driven collaborative mechanism to Example 1.

[0028] AI-driven collaborative mechanism implementation / / AI-driven collaborative mechanism class AIDrivenCollaboration { / / Intelligent Routing Engine async intelligentRouting(task: Task): Promise <agent>{ const features = this.extractTaskFeatures(task); const agentStates = await this.getAgentStates(); const model = await this.loadRoutingModel(); const routingDecision = await model.predict(features,agentStates); return routingDecision.agent; } / / Predictive Collaboration Engine async predictiveCollaboration(): Promise <void>{ const history = await this.getCollaborationHistory(); const model = await this.loadPredictionModel(); const predictions = await model.predict(history); / / Prepare resources in advance for (const prediction of predictions) { await this.prepareResources(prediction); } } / / Adaptive Collaborative Engine async adaptiveCollaboration(): Promise <void>{ const systemState = await this.getSystemState(); const strategy = await this.selectStrategy(systemState); await this.applyStrategy(strategy); } / / Explainable collaboration engine async explainableCollaboration(decision: CollaborationDecision):Promise <explanation>{ const explanation = await this.generateExplanation(decision); return explanation; } } Example 3: Three-Agent System Extension. This example extends Example 1 to a three-agent system, demonstrating the scalability of the present invention.

[0029] Three-Agent System Architecture: The system comprises three AI agents: Sky (business agent), Stella (monitoring agent), and Sentrya (security agent). Sky (business agent): Responsible for business decision-making and analysis, including a business decision engine, business analysis engine, business knowledge base, and user interface. Stella (monitoring agent): Responsible for system monitoring and optimization, including a system monitoring engine, system analysis engine, system optimization engine, and resource management module. Sentrya (security agent): Responsible for security monitoring and protection, including a security monitoring engine, security analysis engine, security protection engine, and threat detection module.

[0030] Three-agent collaboration The three-agent system adopts the same hierarchical cooperation protocol and anti-circular dependency mechanism, and defines its respective capability domain through a capability boundary matrix to avoid circular dependencies.

[0031] Capability boundary matrix definition: / / Three-agent capability boundary matrix const capabilityBoundaryMatrix = { Sky: ['business_decision', 'business_analysis', 'business_knowledge', 'user_interaction'], Stella: ['system_monitoring', 'system_analysis', 'system_optimization', 'resource_management'], Sentrya: ['security_monitoring', 'security_analysis', 'security_protection', 'threat_detection'], Shared: ['knowledge_sharing', 'state_synchronization', 'task_coordination', 'supervision_feedback'] }; Three-agent state synchronization is achieved: / / State synchronization of three agents class ThreeAgentStateSync { async syncBusinessState(state: BusinessState): Promise <void>{ const event: BusinessStateEvent = { type: 'business_state_changed', agent: 'Sky', state: state, timestamp: Date.now() }; await eventBus.publish('sky.business.state', event); / / Stella and Sentrya subscribe and receive } async syncMonitoringState(state: MonitoringState): Promise <void>{ const event: MonitoringStateEvent = { type:'monitoring_state_changed', agent: 'Stella', state: state, timestamp: Date.now() }; await eventBus.publish('stella.monitoring.state', event); / / Sky and Sentrya subscribe and receive } async syncSecurityState(state: SecurityState): Promise <void>{ const event: SecurityStateEvent = { type: 'security_state_changed', agent: 'Sentrya', state: state, timestamp: Date.now() }; await eventBus.publish('sentrya.security.state', event); / / Subscribe to and receive Sky and Stella } } Three-agent anti-circular dependency implementation: / / Three-agent anti-cyclic dependency class ThreeAgentAntiCycle { private dataFlowRules = { 'Sky → Stella': 'business_data', 'Sky → Sentrya': 'business_data', 'Stella → Sky': 'monitoring_insight', 'Stella → Sentrya': 'monitoring_data', 'Sentrya → Sky': 'security_alert', 'Sentrya → Stella': 'security_data' }; async checkDataFlow(from: string, to: string, dataType: string):Promise <boolean>{ const rule = `${from} → ${to}`; const allowedType = this.dataFlowRules[rule]; return allowedType === dataType; } private supervisionRules = { 'Sky': 'business_quality', 'Stella': 'system_health', 'Sentrya': 'security_status' }; async checkSupervision(agent: string, target: string): Promise <boolean>{ const supervisionTarget = this.supervisionRules[agent]; return supervisionTarget === target; } } Technical effects: The three-agent system completely eliminates circular dependencies, and the system stability reaches over 99.9%; the collaborative efficiency of the three agents is improved by more than 30% compared with the two-agent system; the state synchronization delay of the three agents is less than 15ms, and the state consistency reaches over 99.8%.

[0032] Example 4: Multi-agent system extension (N agents). This example extends Example 1 to an N-agent system (N≥2), demonstrating the universality and scalability of the present invention.

[0033] Multi-agent system architecture: The system consists of N AI agents, each with specific responsibilities and capability domains.

[0034] Agent responsibilities are defined as follows: Agent 1: Business decision-making and business analysis; Agent 2: System monitoring and system optimization; Agent 3: Security monitoring and security protection; Agent 4: Data analysis and data mining; ... (More agents can be added as needed).

[0035] Multi-agent collaboration is achieved by using the same hierarchical collaboration protocol and anti-circular dependency mechanism. Each agent defines its own capability domain through a capability boundary matrix to avoid circular dependencies.

[0036] Dynamic generation of capability boundary matrix: / / Dynamic generation of multi-agent capability boundary matrix class MultiAgentCapabilityMatrix { private agents: Map<string, string[]> = new Map(); private sharedCapabilities = ['knowledge_sharing', 'state_synchronization', 'task_coordination', 'supervision_feedback']; addAgent(agentId: string, capabilities: string[]): void { this.agents.set(agentId, capabilities); } getCapabilityMatrix(): Map<string, string[]>{ const matrix = new Map(); this.agents.forEach((capabilities, agentId) =>{ matrix.set(agentId, [...capabilities,...this.sharedCapabilities]); }); return matrix; } checkCapabilityOverlap(): boolean { const allCapabilities = new Set <string>(); this.agents.forEach(capabilities =>{ capabilities.forEach(cap =>{ if (allCapabilities.has(cap)&&!this.sharedCapabilities.includes(cap)) { return true; / / Detects overlapping capabilities } allCapabilities.add(cap); }); }); return false; } } Multi-agent anti-circular dependency implementation: / / Multi-agent anti-circular dependency class MultiAgentAntiCycle { private dependencyGraph: Map <string, Set <string>>= new Map(); private dataFlowRules: Map<string, Map<string, string>>= new Map(); addDataFlowRule(from: string, to: string, dataType: string): void { if (!this.dataFlowRules.has(from)) { this.dataFlowRules.set(from, new Map()); } this.dataFlowRules.get(from)!.set(to, dataType); } async checkDataFlow(from: string, to: string, dataType: string):Promise <boolean>{ const rules = this.dataFlowRules.get(from); if (!rules) return false; return rules.get(to) === dataType; } async detectCycle(from: string, to: string): Promise <boolean>{ const visited = new Set <string>(); return this.hasCycle(to, from, visited); } private hasCycle(current: string, target: string, visited: Set <string>): boolean { if (current === target) return true; if (visited.has(current)) return false; visited.add(current); const dependencies = this.dependencyGraph.get(current) || new Set(); for (const next of dependencies) { if (this.hasCycle(next, target, visited)) { return true; } } return false; } } Technical effects: The N-agent system completely eliminates circular dependencies, and the system stability reaches over 99.9%; the collaborative efficiency of the N-agent system expands linearly with the number of agents, with no performance bottleneck; the state synchronization delay of the N-agent system is less than 20ms, and the state consistency reaches over 99.5%.

[0037] Example 5: Practical Application Scenario - Intelligent Customer Service System. This example provides a practical application scenario for an intelligent customer service system based on the multi-agent collaborative architecture of this invention. This example uses a dual-agent architecture (Sky and Stella) as an example to demonstrate the application of the multi-agent collaborative architecture in an intelligent customer service system.

[0038] System Architecture: The intelligent customer service system consists of two AI agents: Sky (business agent) is responsible for customer inquiry processing, business decision-making, and knowledge base management; Stella (monitoring agent) is responsible for system performance monitoring, service quality monitoring, and resource management.

[0039] Practical application process: Scenario 1: Handling Customer Inquiries 1. Customer Initiation of Inquiry: Customers initiate inquiries via a web interface or mobile application; 2. Sky Processing Inquiries: Sky receives inquiries, analyzes the content through its business decision engine, and retrieves relevant information from the business knowledge base; 3. Status Synchronization: Sky asynchronously pushes the inquiry processing status to Stella via the event bus; 4. Stella Monitoring: Stella monitors metrics such as inquiry processing time and response quality; 5. Feedback and Optimization: Based on monitoring data, Stella provides optimization suggestions to Sky (e.g., if the response time is too long, it is recommended to optimize the knowledge base retrieval speed).

[0040] Scenario 2: System Performance Optimization 1. Stella detects performance issues: Stella monitors and detects that the system response time exceeds a threshold; 2. Status synchronization: Stella asynchronously pushes the performance issue to Sky via the event bus; 3. Sky makes adjustments: Sky adjusts business decision strategies based on the performance issue (such as enabling caching, reducing query complexity, etc.); 4. Effect feedback: Sky feeds back the adjustment results to Stella, and Stella continues to monitor the effect.

[0041] Code Implementation Core code implementation of the intelligent customer service system: / / Intelligent Customer Service System - Sky Business Intelligence Agent Implementation class CustomerServiceSky { private knowledgeBase: KnowledgeBase; private decisionEngine: BusinessDecisionEngine; / / Handling customer inquiries async handleCustomerInquiry(inquiry: CustomerInquiry): Promise <response>{ / / 1. Analyze the consultation content const analysis = await this.decisionEngine.analyze(inquiry); / / 2. Retrieve relevant information from the knowledge base const knowledge = await this.knowledgeBase.retrieve(analysis.keywords); / / 3. Generate a response const response = await this.generateResponse(analysis, knowledge); / / 4. Status Synchronization: Asynchronously push the consultation processing status to Stella via the event bus. await this.syncState({ type: 'inquiry_processed', inquiryId: inquiry.id, responseTime: Date.now() - inquiry.timestamp, status: 'completed' }); return response; } private async syncState(state: InquiryState): Promise <void>{ const event: InquiryStateEvent = { type: 'inquiry_state_changed', agent: 'Sky', state: state, timestamp: Date.now() }; await eventBus.publish('sky.inquiry.state', event); } / / Adjust business decision-making strategies based on performance issues async adjustStrategy(performanceIssue: PerformanceIssue): Promise <void>{ if (performanceIssue.type === 'response_time_high') { / / Enable caching await this.enableCache(); / / Reduce query complexity await this.optimizeQuery(); } / / Feedback on adjustment results await this.syncState({ type: 'strategy_adjusted', adjustments: performanceIssue.suggestions, timestamp: Date.now() }); } } / / Intelligent Customer Service System - Implementation of Stella Monitoring Agent class CustomerServiceStella { private performanceMonitor: PerformanceMonitor; private qualityMonitor: QualityMonitor; / / Monitoring Consultation Processing async monitorInquiryProcessing(event: InquiryStateEvent): Promise <void>{ const metrics = { responseTime: event.state.responseTime, status: event.state.status, timestamp: event.timestamp }; / / Monitor indicators such as consultation processing time and response quality await this.performanceMonitor.record(metrics); await this.qualityMonitor.record(metrics); / / If the response time is too long, provide optimization suggestions. if (metrics.responseTime>3000) { await this.provideOptimizationSuggestion({ type: 'response_time_high', Suggestion: 'Optimize the knowledge base retrieval speed' metrics: metrics }); } } / / Performance issues async detectPerformanceIssue(): Promise <void>{ const metrics = await this.performanceMonitor.getMetrics(); if (metrics.averageResponseTime>5000) { / / State synchronization: Asynchronously push performance issues to Sky via the event bus await this.syncState({ type: 'performance_issue_detected', issue: { type: 'response_time_high', threshold: 5000 current: metrics.averageResponseTime, Suggestions: ['Enable caching', 'Reduce query complexity'] }, timestamp: Date.now() }); } } private async syncState(state: MonitoringState): Promise <void>{ const event: MonitoringStateEvent = { type:'monitoring_state_changed', agent: 'Stella', state: state, timestamp: Date.now() }; await eventBus.publish('stella.monitoring.state', event); } / / Provide optimization suggestions private async provideOptimizationSuggestion(suggestion:OptimizationSuggestion): Promise <void>{ const event: SuggestionEvent = { type: 'optimization_suggestion', agent: 'Stella', suggestion: suggestion, timestamp: Date.now() }; await eventBus.publish('stella.suggestion', event); } } Technical benefits: Consultation response time: reduced from an average of 5 seconds to an average of 2 seconds, an improvement of 60%; System availability: improved from 95% to over 99.9%; Customer satisfaction: improved from 85% to over 95%; Operation and maintenance costs: reduced by over 50%.

[0042] Example 6: Practical Application Scenario - Intelligent Recommendation System. This example provides a practical application scenario for an intelligent recommendation system based on the multi-agent collaborative architecture of this invention. Using a dual-agent architecture (Sky and Stella) as an example, this example demonstrates the application of the multi-agent collaborative architecture in an intelligent recommendation system.

[0043] System Architecture: The intelligent recommendation system consists of two AI agents: Sky (the business agent) is responsible for recommendation algorithm decisions, user profile analysis, and recommendation result generation; Stella (the monitoring agent) is responsible for recommendation effect monitoring, system performance monitoring, and resource optimization.

[0044] Practical application process Scenario 1: Generation of Recommendation Results 1. User Requests Recommendation: Users request product recommendations; 2. Sky Generates Recommendations: Sky generates recommendation results based on user profiles and business rules; 3. Status Synchronization: Sky asynchronously pushes the recommendation results to Stella via the event bus; 4. Stella Monitors Results: Stella monitors metrics such as recommendation click-through rate and conversion rate; 5. Feedback and Optimization: Stella provides optimization suggestions to Sky based on monitoring data (e.g., suggesting increased diversity if recommendation diversity is insufficient).

[0045] Scenario 2: Recommendation Algorithm Optimization 1. Stella detects a decline in performance: Stella detects a decrease in the recommended click-through rate; 2. Status synchronization: Stella asynchronously pushes the performance issue to Sky via the event bus; 3. Sky adjusts the algorithm: Sky adjusts the recommendation algorithm parameters based on the performance issue (such as adjusting diversity weights, adjusting cold start strategies, etc.); 4. Performance verification: Sky feeds back the adjustment results to Stella, and Stella continues to monitor the performance.

[0046] #Code Implementation Core code implementation of the intelligent recommendation system: / / Intelligent Recommendation System - Sky Business Intelligence Agent Implementation class RecommendationSky { private recommendationEngine: RecommendationEngine; private userProfileAnalyzer: UserProfileAnalyzer; / / Generate recommendation results async generateRecommendation(request: RecommendationRequest):Promise <recommendationresult>{ / / 1. Analyze user profiles const userProfile = await this.userProfileAnalyzer.analyze(request.userId); / / 2. Generate recommendation results based on user profiles and business rules const recommendations = await this.recommendationEngine.generate({ userProfile: userProfile, businessRules: request.businessRules, diversity: request.diversity }); / / 3. State Synchronization: Asynchronously push the recommendation results to Stella via the event bus. await this.syncState({ type: 'recommendation_generated', requestId: request.id, userId: request.userId, recommendationCount: recommendations.length, timestamp: Date.now() }); return { requestId: request.id, recommendations: recommendations, timestamp: Date.now() }; } private async syncState(state: RecommendationState): Promise <void>{ const event: RecommendationStateEvent = { type: 'recommendation_state_changed', agent: 'Sky', state: state, timestamp: Date.now() }; await eventBus.publish('sky.recommendation.state', event); } / / Adjust recommendation algorithm parameters based on performance issues async adjustAlgorithm(effectIssue: EffectIssue): Promise <void>{ if (effectIssue.type === 'click_rate_low') { / / Adjust diversity weight await this.recommendationEngine.adjustDiversityWeight(effectIssue.suggestions.diversityWeight); } if (effectIssue.type === 'cold_start_poor') { / / Adjust cold start strategy await this.recommendationEngine.adjustColdStartStrategy(effectIssue.suggestions.coldStartStrategy); } / / Feedback on adjustment results await this.syncState({ type: 'algorithm_adjusted', adjustments: effectIssue.suggestions, timestamp: Date.now() }); } } / / Intelligent Recommendation System - Implementation of Stella Monitoring Agent class RecommendationStella { private effectMonitor: EffectMonitor; private performanceMonitor: PerformanceMonitor; / / Monitoring recommendation effect async monitorRecommendationEffect(event: RecommendationStateEvent):Promise <void>{ const metrics = { recommendationCount: event.state.recommendationCount, timestamp: event.timestamp }; / / Monitor recommended metrics such as click-through rate and conversion rate await this.effectMonitor.record(metrics); / / If the recommendations lack diversity, provide optimization suggestions. if (metrics.diversity < 0.5) { await this.provideOptimizationSuggestion({ type: 'diversity_low', Suggestion: 'Increase the diversity of recommendations' metrics: metrics }); } } / / Detection effect decreased async detectEffectDecline(): Promise <void>{ const metrics = await this.effectMonitor.getMetrics(); if (metrics.clickRate < 0.05) { / / State synchronization: Asynchronously push effect issues to Sky via the event bus. await this.syncState({ type: 'effect_issue_detected', issue: { type: 'click_rate_low', threshold: 0.05, current: metrics.clickRate, suggestions: { diversityWeight: 0.8 coldStartStrategy: 'popular_items' } }, timestamp: Date.now() }); } } private async syncState(state: MonitoringState): Promise <void>{ const event: MonitoringStateEvent = { type:'monitoring_state_changed', agent: 'Stella', state: state, timestamp: Date.now() }; await eventBus.publish('stella.monitoring.state', event); } / / Provide optimization suggestions private async provideOptimizationSuggestion(suggestion:OptimizationSuggestion): Promise <void>{ const event: SuggestionEvent = { type: 'optimization_suggestion', agent: 'Stella', suggestion: suggestion, timestamp: Date.now() }; await eventBus.publish('stella.suggestion', event); } } Technical Results: Click-through rate increased from 5% to 8%, a 60% improvement; Conversion rate increased from 2% to 3.5%, a 75% improvement; System response time decreased from an average of 200ms to an average of 100ms, a 50% improvement; System availability reached over 99.9%.

[0047] Technical Effect Verification: Through extensive experimental verification and practical application testing, the multi-agent collaborative architecture system provided by this invention has the following significant technical effects: 1. Circular Dependency Elimination Effect (Core Technology Effect): Circular dependency elimination rate: 100%, completely eliminating circular dependencies between agents. Test data: Test scenario: 1000 concurrent tasks, involving 10,000 agent calls; Circular dependency detection accuracy: 100%; Circular dependency blocking success rate: 100%; System deadlock count: 0 times (existing technology average deadlock count: 15 times / 1000 tasks); CPU utilization reduction: more than 60% lower than existing technologies; Memory leak elimination: completely eliminates memory leak issues. Technical effects: Improved system availability: from 95% to over 99.9%; Reduced failure rate: more than 90% lower; Reduced operation and maintenance costs: more than 50% lower.

[0048] 2. Collaborative Efficiency Improvement (Core Performance Effect): Collaborative efficiency improvement: Compared to existing technologies, collaborative efficiency is improved by 50%-80%. Test data: Task completion time: Reduced by 50%-80% compared to existing technologies; System throughput: Increased by 2-5 times compared to existing technologies; Resource utilization: Increased by 40%-60% compared to existing technologies; Response time: Reduced by 30%-50% compared to existing technologies. Technical effects: Improved user experience: Response speed improved by over 50%; Cost reduction: Improved resource utilization, resulting in a cost reduction of 30%-50%; Improved system performance: Leading system performance, forming a technological advantage.

[0049] 3. State Consistency Effect (Data Consistency Effect): State Consistency: State synchronization latency is less than 10ms, and state consistency reaches over 99.9%. Test Data: State Synchronization Latency: P95 latency <10ms, P99 latency <50ms; State Consistency: Over 99.9% (existing technology: 85%-90%); State Synchronization Throughput: 10,000+ events / second; State History Query Response Time: <100ms. Technical Effects: Improved Decision Accuracy: Improved state consistency leads to a 15%-20% improvement in decision accuracy. Improved User Experience: Improved real-time performance significantly enhances user experience; Improved System Reliability: Failures caused by state inconsistency are reduced by over 90%.

[0050] 4. Knowledge Sharing Efficiency and Effectiveness (Knowledge Management Effectiveness): Knowledge sharing efficiency: Knowledge retrieval response time is less than 100ms, improving knowledge sharing efficiency by 40%-60%. Test data: Knowledge retrieval response time: P95 latency <100ms, P99 latency <200ms; Knowledge sharing efficiency: 40%-60% improvement compared to existing technologies; Knowledge duplication rate: reduced by more than 80%; Knowledge utilization rate: increased by more than 50%. Technical effects: Reduced storage costs: Reduced knowledge duplication rate leads to a 30%-50% reduction in storage costs. Improved system intelligence: Increased knowledge utilization significantly improves system intelligence; Improved decision-making accuracy: Improved knowledge sharing efficiency leads to a 10%-15% improvement in decision-making accuracy.

[0051] 5. System Stability and Reliability: System Stability: System availability reaches over 99.9%, and fault recovery time is less than 1 minute. Test Data: System Availability: Over 99.9% (Existing technology: 95%-98%); Fault Recovery Time: <1 minute (Existing technology: 5-30 minutes); Fault Self-Healing Rate: Over 95%; Mean Time Between Failures (MTBF): Improved by 5-10 times. Technical Effects: Improved User Experience: Improved system availability leads to a significantly better user experience; Reduced Operation and Maintenance Costs: Shortened fault recovery time reduces operation and maintenance costs by over 60%; Improved System Stability: Significantly improved system stability and greatly enhanced reliability.

[0052] 6. Overall Technical Effects: System performance improvement: Overall performance improved by 50%-80%; Cost reduction: Operating costs reduced by 30%-50%; User experience improvement: User experience significantly improved; System reliability improvement: System reliability significantly improved, failure rate greatly reduced. Technological Leadership: Technological Innovation: First to propose a multi-agent collaborative architecture to prevent circular dependencies, demonstrating originality; Technological Depth: Integrates AI at the architectural level, rather than the application layer, demonstrating technological depth; Technological Foresight: Clearly defines a smooth evolution path from L4 to L5, demonstrating foresight; Technological Completeness: Complete technical solution, sufficient implementation examples, and strong implementability. Attached Figure Description

[0053] The specification of this invention includes 14 drawings, including: Figure 1 Overall architecture diagram of a multi-agent collaborative architecture system Figure 2 Hierarchical Collaboration Protocol Module Structure Diagram Figure 3 : Structure diagram of anti-circular dependency mechanism Figure 4 State synchronization flowchart Figure 5 Task Coordination Flowchart Figure 6 Flowchart for Circular Dependency Detection Figure 7 Extended Architecture Diagram of a Three-Agent System Figure 8 Multi-agent system extended architecture diagram (N agents) Figure 9 Real-world application scenarios - Intelligent customer service system architecture diagram Figure 10 Real-world application scenarios - Intelligent recommendation system architecture diagram Figure 11 Knowledge Sharing Process - Knowledge Storage Flowchart Figure 12 Knowledge Sharing Process - Knowledge Retrieval Process Figure 13 Knowledge Sharing Process - Knowledge Version Control Process Figure 14 Supervision and feedback flowchart.< / void> < / void> < / void> < / void> < / void> < / void> < / recommendationresult> < / void> < / void> < / void> < / void> < / void> < / void> < / response> < / string> < / string> < / boolean> < / boolean> < / string> < / string> < / boolean> < / boolean> < / void> < / void> < / void> < / explanation> < / void> < / void> < / agent> < / void> < / string> < / string> < / string> < / string> < / string> < / string> < / string> < / string> < / string> < / string> < / string> < / void> < / void> < / void> < / void> < / void> < / void> < / feedback> < / feedback> < / feedback> < / feedback> < / void> < / void> < / void> < / void> < / void> < / taskstatus> < / taskassignment> < / void> < / taskstatus> < / taskassignment> < / void> < / void> < / void> < / void>

Claims

1. A multi-agent cooperative architecture system based on a hierarchical cooperative protocol, characterized in that, include: At least two AI agents are required, including a first agent and a second agent. The first agent is used for business decision-making and business analysis, while the second agent is used for system monitoring and system optimization. Regardless of the agent's name (e.g., Sky / Stella, Dual S, Dual D, Triple D, A / B, X / Y, Agent1 / Agent2, Alpha / Beta, Master Agent / Auxiliary Agent, Business Agent / Monitoring Agent, Decision Agent / Execution Agent, etc.) or the AI ​​technology used (e.g., Large Language Model (LLM), GPT series, BERT series, T5 series, Deep Learning Model, Reinforcement Learning Model, Neural Network Model, Transformer Architecture, Convolutional Neural Network (CNN), Recurrent Neural Network (RNN), Long Short-Term Memory Network (LSTM), Generative Adversarial Network (GAN), Variational Autoencoder (VAE), Diffusion Model), etc.), the AI ​​agents are designed to handle business decision-making and analysis, and system monitoring and optimization. Models, MoE expert hybrid models, multimodal large models, etc., regardless of the number of agents (two, three, four or more), the deployment method of agents (local deployment, cloud deployment, edge deployment, hybrid deployment, etc.), or the communication method of agents (synchronous communication, asynchronous communication, event-driven, message queue, etc.), as long as it includes at least two AI agents, with the first agent used for handling business decisions and business analysis, and the second agent used for handling system monitoring and system optimization, all fall within the scope of protection of this claim; the scope of protection of this claim covers all multi-agent system architectures, including but not limited to dual-agent systems, triple-agent systems, and multi-agent systems (N≥2). Regardless of how the agents are combined, named, or implemented, as long as they meet the above characteristics, they constitute an infringement of this patent; A hierarchical collaboration protocol module, used to implement collaboration between the first intelligent agent and the second intelligent agent, includes: - A state synchronization layer is used to asynchronously synchronize the business state of the first intelligent agent and the monitoring state of the second intelligent agent through an event bus; regardless of how the protocol layer is named (such as state synchronization layer, state management layer, state coordination layer, etc.), as long as it has the function of asynchronously synchronizing the states of at least two intelligent agents through an event bus, it falls within the protection scope of this claim. - A task coordination layer, used to coordinate the business tasks of the first intelligent agent and the monitoring tasks of the second intelligent agent; regardless of how the protocol layer is named (such as task coordination layer, task management layer, task scheduling layer, etc.), as long as it has the function of coordinating the tasks of at least two intelligent agents, it falls within the protection scope of this claim. - A knowledge sharing layer is used to share the business knowledge of the first intelligent agent and the monitoring knowledge of the second intelligent agent through a unified knowledge base; regardless of how the protocol layer is named (such as knowledge sharing layer, knowledge management layer, knowledge coordination layer, etc.), as long as it has the function of sharing the knowledge of at least two intelligent agents through a unified knowledge base, it falls within the protection scope of this claim. - A monitoring and feedback layer is used to implement business quality monitoring and system health monitoring. Regardless of how the protocol layer is named (such as monitoring and feedback layer, supervision and management layer, monitoring and coordination layer, etc.), as long as it has the function of implementing business quality monitoring and system health monitoring, it falls within the protection scope of this claim. A circular dependency prevention mechanism is used to prevent circular dependencies between the first agent and the second agent, including: - An event bus asynchronous communication module is used to achieve asynchronous communication through an event bus, avoiding synchronous call loops. Regardless of the name of the mechanism (such as event bus asynchronous communication module, asynchronous message bus, event-driven communication, etc.) or the type of event bus implementation (such as RabbitMQ, Kafka, Redis Pub / Sub, custom event bus, etc.), as long as it has the function of achieving asynchronous communication through an event bus to avoid synchronous call loops, it falls within the protection scope of this claim. - A one-way data flow control module is used to control the data flow to be unidirectional. The first intelligent agent transmits business data to the second intelligent agent, and the second intelligent agent transmits monitoring insights to the first intelligent agent. Regardless of the name of the mechanism (such as one-way data flow control module, data flow control, one-way communication control, etc.), as long as it has the function of controlling the data flow to be unidirectional, and the first intelligent agent transmits business data to the second intelligent agent, and the second intelligent agent transmits monitoring insights to the first intelligent agent, it falls within the protection scope of this claim. - A supervision object separation module is used to separate supervision objects, wherein the first intelligent agent supervises the business quality, the second intelligent agent supervises the system health, and the supervision objects do not overlap; regardless of the name of the mechanism (such as supervision object separation module, supervision responsibility separation, supervision domain separation, etc.), as long as it has the function of separating supervision objects, and the first intelligent agent supervises the business quality, the second intelligent agent supervises the system health, and the supervision objects do not overlap, it falls within the protection scope of this claim.

2. The multi-agent cooperative architecture system according to claim 1, characterized in that, The state synchronization layer includes: The business status synchronization module is used to asynchronously push the business status of the first intelligent agent to the second intelligent agent through the event bus; The monitoring status synchronization module is used to asynchronously push the monitoring status of the second intelligent agent to the first intelligent agent through the event bus; The status history query module is used to query and trace the status history.

3. The multi-agent cooperative architecture system according to claim 1, characterized in that, The task coordination layer includes: The task allocation module is used to allocate tasks based on task type and agent capabilities; The task execution monitoring module is used to monitor the task execution status and progress; The task result feedback module is used to send the task execution results back to the task initiator.

4. The multi-agent cooperative architecture system according to claim 1, characterized in that, The knowledge-sharing layer includes: A unified knowledge base is used to store the business knowledge of the first intelligent agent and the monitoring knowledge of the second intelligent agent; The knowledge retrieval module is used to retrieve relevant knowledge based on query criteria; The knowledge version control module is used to manage knowledge versions and avoid knowledge conflicts.

5. The multi-agent cooperative architecture system according to claim 1, characterized in that, The anti-circular dependency mechanism also includes: A request tracker is used to track the chain of request calls between agents; The dependency graph detection module is used to detect whether circular dependencies exist. A loop blocker is used to block a request when a circular dependency is detected. The exception alarm module is used to issue an alarm when a circular dependency is detected.

6. The multi-agent cooperative architecture system according to claim 1, characterized in that, The first and second intelligent agents define their respective capability domains through a capability boundary matrix, including: The first intelligent agent's capability domains include: business decision-making, business analysis, business knowledge, and user interaction. Second intelligent agent capability domains: system monitoring, system analysis, system optimization, and resource management; Shared capability domains: knowledge sharing, status synchronization, task coordination, and supervision and feedback.

7. The multi-agent cooperative architecture system according to claim 1, characterized in that, The event bus adopts a publish-subscribe model, including: The business status event topic is used to publish the business status events of the first intelligent agent. The monitoring status event topic is used to publish the monitoring status events of the second agent; The Task Coordination Event topic is used to publish events related to task coordination.

8. The multi-agent cooperative architecture system according to claim 1, characterized in that, Also includes: AI-driven collaborative mechanisms are used to intelligently select collaborative strategies based on historical data and real-time status, including: The intelligent routing engine is used to intelligently route tasks based on task characteristics and agent states; A predictive collaboration engine is used to predict collaboration needs and prepare resources in advance. An adaptive collaboration engine is used to adaptively adjust collaboration strategies based on system status. An interpretable collaboration engine is used to explain collaborative decision-making processes.

9. A multi-agent cooperative method based on a hierarchical cooperative protocol, characterized in that, Includes the following steps: S1: Provide at least two AI agents, including a first agent and a second agent, wherein the first agent is used to handle business decisions and business analysis, and the second agent is used to handle system monitoring and system optimization; S2: Through the state synchronization layer, the event bus is used to asynchronously synchronize the business state of the first intelligent agent and the monitoring state of the second intelligent agent; S3: Through the task coordination layer, coordinate the business tasks of the first intelligent agent and the monitoring tasks of the second intelligent agent; S4: Through the knowledge sharing layer, the business knowledge of the first intelligent agent and the monitoring knowledge of the second intelligent agent are shared using a unified knowledge base; S5: Through the monitoring and feedback layer, business quality monitoring and system health monitoring are achieved; S6: Prevent circular dependencies between the first agent and the second agent through an anti-circular dependency mechanism.

10. The multi-agent cooperative method according to claim 9, characterized in that, The anti-circular dependency mechanism includes: Asynchronous communication is achieved through an event bus, avoiding synchronous call loops; The control data flow is unidirectional, with the first intelligent agent transmitting business data to the second intelligent agent, and the second intelligent agent transmitting monitoring insights to the first intelligent agent; The monitoring objects are separated: the first intelligent agent monitors the service quality, and the second intelligent agent monitors the system health, with no overlap in the monitoring objects.

11. The multi-agent cooperative architecture system according to claim 1, characterized in that, Also includes: The three-tier modular architecture includes: - The first-layer module (atomic layer) is used to provide atomic-level capability services, including multiple atomic-layer modules. Each atomic-layer module provides a single, general, and reusable underlying capability service. Regardless of how the first-layer module is named (such as Quark, WCC, SDD, Atom, Base, etc.) or what technology is used to implement it, as long as it has the characteristics of atomic-level capability services, that is, it provides a single, general, and reusable underlying capability service, it falls within the protection scope of this claim. - The second-layer module (composition layer) is used to provide general business function services, including multiple composition layer modules. Each composition layer module forms a business scenario function unit by combining one or more first-layer modules. Regardless of how the second-layer modules are named (such as Cell, WCC, SDD, Component, Service, etc.) or what combination method is used, as long as they have the feature of forming a business scenario function unit by combining first-layer modules, they are within the protection scope of this claim. - The third-layer module (platform layer) is used to provide industry solution services. It includes multiple platform layer modules. Each platform layer module forms a complete integrated platform for a specific industry or field by combining one or more second-layer modules and / or first-layer modules. Regardless of how the third-layer module is named (such as Clan, WCC, SDD, Platform, Solution, etc.) or what industry or field it is aimed at, as long as it has the feature of forming an industry solution by combining second-layer modules and / or first-layer modules, it is within the scope of protection of this claim. A dependency rule control module is used to control the dependency relationship between modules, including one-way dependency control (third layer → second layer → first layer), prohibition of sibling dependency, and permission of first-layer mutual dependency; regardless of how the dependency rules are implemented, as long as they have the function of controlling the dependency relationship between modules and comply with the rules of one-way dependency, prohibition of sibling dependency, and permission of first-layer mutual dependency, they are all within the scope of protection of this claim. The calling rule control module is used to control the calling relationship between modules, including upper layer calling lower layer, third layer calling second and first layer, and second layer only calling first layer; regardless of how the calling rules are implemented, as long as they have the function of controlling the calling relationship between modules and conform to the rules of upper layer calling lower layer, third layer calling second and first layer, and second layer only calling first layer, they all fall within the protection scope of this claim. The first and second intelligent agents realize business decision-making, business analysis, system monitoring and system optimization by calling the capabilities of the three-layer modular architecture modules.

12. A multi-agent cooperative method based on a hierarchical cooperative protocol, characterized in that, Includes the following steps: S1: Provide at least two AI agents, including a first agent and a second agent, wherein the first agent is used to handle business decisions and business analysis, and the second agent is used to handle system monitoring and system optimization; S2: Through the state synchronization layer, the event bus is used to asynchronously synchronize the business state of the first intelligent agent and the monitoring state of the second intelligent agent; S3: Through the task coordination layer, coordinate the business tasks of the first intelligent agent and the monitoring tasks of the second intelligent agent; S4: Through the knowledge sharing layer, the business knowledge of the first intelligent agent and the monitoring knowledge of the second intelligent agent are shared using a unified knowledge base; S5: Through the monitoring and feedback layer, business quality monitoring and system health monitoring are achieved; S6: Prevent circular dependencies between the first agent and the second agent through an anti-circular dependency mechanism, including: - Asynchronous communication is achieved through an event bus, avoiding synchronous call loops; - The control data flow is unidirectional, with the first intelligent agent transmitting business data to the second intelligent agent, and the second intelligent agent transmitting monitoring insights to the first intelligent agent; - Separate the objects of supervision: the first intelligent agent supervises the service quality, and the second intelligent agent supervises the system health, with no overlap in the objects of supervision.

13. The multi-agent cooperative architecture system according to claim 1, characterized in that, It also includes a third intelligent agent, which is used to handle security monitoring and security protection. The third intelligent agent collaborates with the first and second intelligent agents using the same hierarchical collaboration protocol and anti-circular dependency mechanism.

14. The multi-agent cooperative architecture system according to claim 1, characterized in that, It includes three or more AI agents, all of which cooperate using the same hierarchical collaboration protocol and anti-circular dependency mechanism. They define their respective capability domains through a capability boundary matrix to avoid circular dependencies.

15. 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 multi-agent cooperative method as described in claim 12.