Architecture Overview

MDWR combines workflow orchestration with operational decision memory.

High-Level Architecture

┌─────────────────┐
│  Developer SDK  │
│  (TypeScript/   │
│   Python)       │
└────────┬────────┘


┌─────────────────┐
│  MDWR Control   │
│     Plane       │
│  (Spec Compiler)│
└────────┬────────┘


┌─────────────────┐      ┌──────────────┐
│  Motia Runtime   │      │  Mem0/Redis  │
│  (Event-Driven) │◄────►│  (Memory)     │
└─────────────────┘      └──────────────┘

Components

1. Developer SDK

Language-specific SDKs (TypeScript, Python) that provide:

2. MDWR Control Plane

Converts workflows to canonical specification and deploys to Motia:

3. Motia Runtime

Event-driven backend runtime:

4. Memory Layer

Decision storage and similarity search:

Data Flow

  1. Define Workflow: Developer creates workflow using SDK
  2. Deploy: SDK compiles to canonical spec and generates Motia steps
  3. Execute: Workflow runs through Motia event system
  4. Store Decisions: Each decision automatically stored in memory
  5. Query Memory: Future executions query similar decisions
  6. Learn: Workflows improve based on historical outcomes

Integration Points

Motia Integration

Memory Integration

Next Steps