Skip to content

架构概述

Wisdoverse Nexus 是一个模块化的 AI 原生协作平台,采用 Rust 异步架构。

核心设计原则

  1. 可扩展性能 — 基于 Tokio 异步运行时,并通过 benchmark 验证容量边界
  2. 模块化 — 每个功能独立 crate,可单独使用
  3. 可扩展 — 插件系统支持 Wasm 沙箱隔离
  4. 云原生友好 — 通过容器、Helm 和可观测性配置支持部署演进

系统架构

┌─────────────────────────────────────────────────────────────┐
│                      客户端层                          │
│   Web Client  │  Mobile App  │  CLI  │  Third-party         │
└──────────────────────┬─────────────────────────────────┘
                     │ WebSocket / HTTP
┌──────────────────────▼─────────────────────────────────┐
│                   nexis-gateway                     │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐        │
│  │ Auth     │ │ Router   │ │ Rate     │ │ Metrics  │        │
│  │ Middleware│ │          │ │ Limiter  │ │          │        │
│  └──────────┘ └──────────┘ └──────────┘ └──────────┘        │
└──────────────────────┬─────────────────────────────────┘

┌──────────────────────▼─────────────────────────────────┐
│                     核心层                           │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐        │
│  │ nexis-   │ │ nexis-   │ │ nexis-   │ │ nexis-   │        │
│  │ protocol │ │ context  │ │ memory   │ │ task     │        │
│  └──────────┘ └──────────┘ └──────────┘ └──────────┘        │
└──────────────────────┬─────────────────────────────────┘

┌──────────────────────▼─────────────────────────────────┐
│                      扩展层                           │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐        │
│  │ nexis-   │ │ nexis-   │ │ nexis-   │ │ nexis-   │        │
│  │ plugin   │ │ mcp      │ │ ai       │ │ skills   │        │
│  └──────────┘ └──────────┘ └──────────┘ └──────────┘        │
└─────────────────────────────────────────────────────────────┘

核心 Crates

Crate职责
nexis-gatewayWebSocket 网关、HTTP API
nexis-protocol消息协议定义
nexis-context会话上下文管理
nexis-pluginWasm 插件系统
nexis-memory长期记忆存储
nexis-aiAI 提供商抽象和协作能力

技术栈

  • 运行时: Tokio 1.x
  • HTTP/WebSocket: Axum + axum-extra
  • 序列化: Serde
  • 认证: JWT (jsonwebtoken)
  • 追踪: OpenTelemetry + Tracing
  • 测试: 内置 test framework + tokio-test

下一步

Source-available under the Wisdoverse Nexus Business Source License 1.1.