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
| Service | Technology | Port | Description |
|---|---|---|---|
| lasius-frontend | Next.js 14, React, TypeScript | 3000 | Visual workflow builder, UI |
| lasius-backend | Python, FastAPI, Temporal | 8000 | Workflow engine, LLM integrations |
| lasius-knowledge-base | Python, FastAPI, pgvector | 8001 | RAG, document processing |
| lasius-mcp-gateway | Bun, TypeScript, ElysiaJS | 3000 | MCP protocol gateway |
| lasius-docs | Next.js, MDX | 3000 | Documentation 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
| Provider | Models |
|---|---|
| AWS Bedrock | Claude, Titan, Llama |
| OpenAI | GPT-4, GPT-4o, GPT-3.5 |
| Anthropic | Claude 3.5 Sonnet, Claude 3 Opus |
| Google Gemini | Gemini Pro, Gemini Ultra |
| Ollama | Local 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
| Database | Tables | Purpose |
|---|---|---|
| Frontend DB | Users, Sessions, Preferences | User management |
| Backend DB | Workflows, Components, Executions | Workflow data |
| KB DB | Documents, Embeddings, KnowledgeBases | RAG storage |
| Gateway DB | MCPConfigs, Plugins, Providers | MCP 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