Guides
Comprehensive guides to help you build powerful memory-driven workflows with MDWR.
Available Guides
Master Application Flow
Complete guide to building and using the master application workflow. Learn:
- Complete system architecture with 20+ interconnected steps
- Error handling with 5 fallback strategies
- Memory integration throughout
- Security and compliance features
- Performance optimization
- Observability and monitoring
Creating Workflows
Learn how to create workflows, define steps, and use decision structures. Covers:
- Basic workflow patterns
- Step handlers and context
- Conditional execution
- Memory integration patterns
Memory Integration
Master memory integration to make informed decisions. Learn:
- Memory providers (Mock vs Mem0)
- Querying similar decisions
- Using historical insights
- Best practices for memory usage
Replay Modes
Understand different replay modes for testing and optimization:
- Exact replay
- Policy-aware replay
- Memory-informed replay
- Comparing replay results
Workflow Patterns
Basic Pattern
const workflow = Workflow.create("my_workflow")
.step("step1", handler1, true)
.step("step2", handler2, true);
Memory-Informed Pattern
.step("decide", async (ctx) => {
const insights = await ctx.memory.similar({
situation: "my_decision",
context: ctx.input
});
// Use insights to inform decision
return { decision, reason, confidence };
}, true)
Conditional Pattern
.step("next", async (ctx) => {
if (ctx.state.previous?.decision !== "approve") {
return { decision: "skip", reason: "...", confidence: 1.0 };
}
// Continue execution
}, true)
Best Practices
- Use specific situations when querying memory
- Include relevant context for better similarity matching
- Check outcomes before using historical decisions
- Test with replay before deploying policy changes
Next Steps
- Getting Started - If you’re new to MDWR
- API Reference - Complete API documentation
- Examples - Real-world workflow examples
- Architecture - Understand the system design