Architecture

Lasius platform architecture and service components overview.

Lasius is a cloud-native AI workflow orchestration platform built for scalability, reliability, and extensibility.

High-Level Architecture

┌─────────────────────────────────────────────────────────────────────────┐
│                           Lasius Platform                                │
├─────────────────────────────────────────────────────────────────────────┤
│                                                                          │
│   ┌─────────────────┐      ┌─────────────────┐      ┌────────────────┐  │
│   │    Frontend     │      │    Backend      │      │  Knowledge     │  │
│   │   (Next.js)     │─────▶│   (FastAPI)     │─────▶│  Base Service  │  │
│   │   Port: 3000    │      │   Port: 8000    │      │   Port: 8001   │  │
│   └─────────────────┘      └────────┬────────┘      └────────────────┘  │
│                                     │                                    │
│                     ┌───────────────┼───────────────┐                   │
│                     │               │               │                   │
│                     ▼               ▼               ▼                   │
│            ┌────────────┐   ┌────────────┐   ┌────────────┐            │
│            │  Temporal  │   │    MCP     │   │   Redis    │            │
│            │  Workers   │   │  Gateway   │   │   Cache    │            │
│            └────────────┘   └────────────┘   └────────────┘            │
│                     │               │               │                   │
│                     └───────────────┴───────────────┘                   │
│                                     │                                    │
│                                     ▼                                    │
│                          ┌─────────────────┐                            │
│                          │   PostgreSQL    │                            │
│                          │    Database     │                            │
│                          └─────────────────┘                            │
│                                                                          │
└─────────────────────────────────────────────────────────────────────────┘

Service Components

ServiceTechnologyPortDescription
lasius-frontendNext.js 14, React, TypeScript3000Visual workflow builder, UI
lasius-backendPython, FastAPI, Temporal8000Workflow engine, LLM integrations
lasius-knowledge-basePython, FastAPI, pgvector8001RAG, document processing
lasius-mcp-gatewayBun, TypeScript, ElysiaJS3000MCP protocol gateway
lasius-docsNext.js, MDX3000Documentation portal

Data Flow

┌──────────┐    ┌──────────┐    ┌──────────┐    ┌──────────┐
│  User    │───▶│ Frontend │───▶│ Backend  │───▶│   LLM    │
│  Input   │    │          │    │          │    │ Provider │
└──────────┘    └──────────┘    └────┬─────┘    └──────────┘
                    ┌────────────────┼────────────────┐
                    ▼                ▼                ▼
             ┌──────────┐     ┌──────────┐     ┌──────────┐
             │ Temporal │     │   KB     │     │   MCP    │
             │ Workflow │     │ Service  │     │ Gateway  │
             └──────────┘     └──────────┘     └──────────┘

Core Capabilities

Workflow Execution Engine

  • Graph Parsing: Converts visual workflows to executable DAGs
  • Topological Sorting: Resolves node dependencies automatically
  • Durable Execution: Fault-tolerant processing with Temporal
  • Real-time Updates: Server-Sent Events (SSE) for status streaming

Multi-LLM Support

ProviderModels
AWS BedrockClaude, Titan, Llama
OpenAIGPT-4, GPT-4o, GPT-3.5
AnthropicClaude 3.5 Sonnet, Claude 3 Opus
Google GeminiGemini Pro, Gemini Ultra
OllamaLocal models (Llama, Mistral)

Knowledge Base (RAG)

Documents → Chunking → Embeddings → Vector DB → Semantic Search
  • Supports: PDF, TXT, MD, HTML, JSON, CSV
  • Vector storage: PostgreSQL with pgvector
  • Embedding models: OpenAI, AWS Bedrock Titan

MCP Gateway

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│  Workflow   │────▶│ MCP Gateway │────▶│ MCP Servers │
│   Agent     │     │   (Proxy)   │     │  (Tools)    │
└─────────────┘     └─────────────┘     └─────────────┘
  • Transport: STDIO, SSE, WebSocket, HTTP
  • Auth: OAuth2, API Key, Bearer Token
  • Discovery: Automatic capability detection

Database Schema

DatabaseTablesPurpose
Frontend DBUsers, Sessions, PreferencesUser management
Backend DBWorkflows, Components, ExecutionsWorkflow data
KB DBDocuments, Embeddings, KnowledgeBasesRAG storage
Gateway DBMCPConfigs, Plugins, ProvidersMCP settings

External Integrations

                    ┌─────────────────┐
                    │     Lasius      │
                    │    Platform     │
                    └────────┬────────┘
      ┌──────────────────────┼──────────────────────┐
      │                      │                      │
      ▼                      ▼                      ▼
┌───────────┐         ┌───────────┐         ┌───────────┐
│    LLM    │         │   MCP     │         │  Storage  │
│ Providers │         │  Servers  │         │ Services  │
├───────────┤         ├───────────┤         ├───────────┤
│ • Bedrock │         │ • Gsuite  │         │ • S3      │
│ • OpenAI  │         │ • Hubspot │         │ • Redis   │
│ • Anthropic│        │ • GitHub  │         │ • Postgres│
│ • Gemini  │         │ • Custom  │         │           │
└───────────┘         └───────────┘         └───────────┘

Security Architecture

  • Encryption: TLS 1.3 in transit, KMS at rest
  • Authentication: JWT sessions, OAuth2
  • Network: VPC isolation, security groups
  • Secrets: AWS Secrets Manager / Kubernetes Secrets

Next: Deployment Guide