Skip to main content

System Architecture

MesaLogo adopts a layered architecture design, progressing from infrastructure to application scenarios, providing a complete multi-agent collaborative decision-making solution.

Architecture Overview

┌─────────────────────────────────────────────────────────────┐
│ Application Layer │
│ Enterprise | Medical | Education | Software | Supply Chain │
├─────────────────────────────────────────────────────────────┤
│ Agent Platform │
│ Dual-Engine Rules | Action Space | Agent Mgmt | Sessions │
│ MCP Integration | Environment Variables │
├─────────────────────────────────────────────────────────────┤
│ Model Service Layer │
│ Model Mgmt | Knowledge Base | Multimodal | MCP Services │
├─────────────────────────────────────────────────────────────┤
│ Infrastructure Layer │
│ Database | File Storage | Cache | Logging | Security │
└─────────────────────────────────────────────────────────────┘

Application Layer

The application layer provides professional solutions for different industries and scenarios:

ScenarioDescriptionTypical Use Cases
Enterprise DecisionStrategy, team collaboration, project managementInvestment analysis, org optimization
Medical ConsultationMulti-expert diagnosis and treatment planningComplex case MDT consultation
Education & TrainingClassroom discussion, case analysis, debateLaw school mock court
Software DevelopmentRequirements, technical review, code reviewAgile team collaboration
Supply ChainSupplier negotiation, inventory, logisticsMulti-supplier risk warning

Agent Platform

The agent platform is the core of the system, providing infrastructure for agent collaboration.

Dual-Engine Rule System

Innovatively combines two rule engines:

  • Natural Language Rule Engine: Handles complex semantics and fuzzy conditions

    • Example: "When requirements change frequently and affect core functions, re-evaluate project timeline"
  • Logic Rule Engine: Handles precise calculations and deterministic logic

    • Example: "When defect density > 2/KLOC and test coverage < 85%, delay release"
  • Rule Conflict Resolution: Intelligently handles conflicts and priorities between rules

Action Space Management

  • Action Space Manager: Creates and manages action spaces (scenario templates)
  • ODD Framework Support: Based on Overview, Design concepts, Details standard framework
  • Action Task Manager: Manages specific action task instances
  • Supervisor Mechanism: Monitors and intervenes in agent interactions

Agent Management

  • Agent Manager: Creates and manages agent instances
  • Role Manager: Defines and manages professional role templates
  • Capability Manager: Manages agent capabilities and tool configurations

Session Management

  • Session Manager: Manages sessions between agents
  • Message Processor: Handles message formatting and conversion
  • Auto-Discussion Mechanism: Supports autonomous agent discussions
  • Tool Call Handler: Handles agent tool calls

MCP Tool Integration

  • MCP Server Manager: Manages MCP server lifecycle
  • External Tool Integration: Integrates various external tools and services
  • Variable Server: Provides variable access services

Environment Variable Management

  • Variable Template Manager: Manages variable template definitions
  • Task Environment Variable Manager: Manages task-level public variables
  • Agent Variable Manager: Manages agent private variables

Model Service Layer

Model Management

  • Model Client: Handles communication with LLM APIs
  • Model Management Service: Manages model configuration, parameters, and access control

Supported models:

  • OpenAI (GPT-3.5, GPT-4)
  • Anthropic Claude
  • Google Gemini
  • Chinese LLMs (Qwen, ERNIE Bot, etc.)

Knowledge Base Services

ServiceFunctionFeatures
LightRAGLightweight RAGFast retrieval, suitable for small-medium knowledge bases
GraphRAGKnowledge Graph RAGComplex knowledge relationship representation and querying
GraphitiTime-sensitive GraphOlder knowledge has lower weight

Multimodal Services

  • Image Recognition Analysis: Processes image input
  • Image Generation Service: Generates various image content
  • Audio Processing Service: Speech recognition and synthesis

MCP Base Services

  • MCP Server: Provides Model-Control-Protocol standard interface
  • External Application Connector: Connects third-party applications and services
  • Internal Tool Server: Provides access interface for internal system tools

Infrastructure Layer

ComponentFunction
DatabaseStores core system data (PostgreSQL/MySQL)
File StorageStores large files, logs, and system resources
Cache SystemImproves system performance, caches frequently used data
Logging SystemRecords system operation logs, supports troubleshooting
Monitoring SystemMonitors system status, provides performance metrics
Security SystemAuthentication, access control, and data encryption

Core Resource Relationships

Template Layer and Instance Layer

Template Layer                    Instance Layer
────────────── ──────────────
ActionSpace (Action Space) → ActionTask (Action Task)
Role (Role) → Agent (Agent)
RuleSet (Rule Set) → (Applied to task)
Knowledge (Knowledge Base) → (Agent access)

Resource Relationship Diagram

ActionSpace (Scenario Template)
├── Role[] (Role Templates)
├── RuleSet[] (Rule Sets)
└── SharedVariable[] (Shared Variables)

↓ Create Task
ActionTask (Scenario Instance)
├── Agent[] (Agent Instances)
├── Conversation[] (Sessions)
└── EnvironmentVariable[] (Environment Variables)


Conversation (Dialogue)
├── Message[] (Messages)
└── AutonomousTask[] (Autonomous Tasks)

Technology Stack

Backend

  • Language: Python 3.9+
  • Framework: Flask
  • Database: PostgreSQL / MySQL
  • Cache: Redis

Frontend

  • Framework: React 18
  • Language: TypeScript
  • UI Library: Ant Design
  • State Management: React Context

Deployment

  • Containerization: Docker
  • Orchestration: Docker Compose
  • Reverse Proxy: Nginx