Course 2: Building with MIFY — Chapter 5
Chapter 5: Advanced Patterns
Section titled “Chapter 5: Advanced Patterns”Build complex solutions using MIFY’s advanced features.
What You’ll Learn
Section titled “What You’ll Learn”- Batch processing for scale
- Sub-workflows for modularity
- Agent orchestration
- Model training
Batch Processing
Section titled “Batch Processing”Process many items in parallel:
# Create a batch jobcurl -X POST \ -H "Authorization: Bearer mify_xxx" \ -H "Content-Type: application/json" \ -d '{ "graphId": "your-graph-id", "items": [{"input": "item1"}, {"input": "item2"}, {"input": "item3"}], "concurrency": 3 }' \ https://your-instance/api/batchControl execution:
POST /api/batch/{id}/start # Start batchPOST /api/batch/{id}/pause # PausePOST /api/batch/{id}/resume # ResumePOST /api/batch/{id}/cancel # CancelSub-Workflows
Section titled “Sub-Workflows”Use the Sub-Workflow node to call one workflow from another:
- Build reusable components (e.g., “email validation” workflow)
- Call them from multiple parent workflows
- Keep complex workflows modular
Agent Nodes
Section titled “Agent Nodes”MIFY has 6 agent nodes:
| Node | What It Does |
|---|---|
| ReAct Agent | Reasoning + Acting loop with tools |
| Multi-Agent | Coordinate multiple agents |
| CLI Agent | Run coding agents (Claude Code, Codex) |
| EnvInspect | Check environment (OS, tools, versions) |
| Browser Use | Automate browser interactions |
| Computer Use | Control desktop applications |
Model Training
Section titled “Model Training”Train custom models via the execution layer:
# 1. Create a datasetPOST /api/execution/training/datasets/upload
# 2. Upload filesPOST /api/execution/training/datasets/{id}/presign-file# Upload to the presigned R2 URL
# 3. FinalizePOST /api/execution/training/datasets/{id}/finalize
# 4. Submit trainingPOST /api/execution/training/submitMonitor at /training.
Platform Integrations (Hub)
Section titled “Platform Integrations (Hub)”Import and connect to 28+ platforms via the Integration Hub at /integrations:
- Native adapters: Flowise, Dify, Langflow, n8n, OpenClaw, RAGFlow, DocuSeal
- Registry-driven: ActivePieces, Node-RED, Trigger.dev, Sim Studio, and more
Course 2 Knowledge Check
Section titled “Course 2 Knowledge Check”- How do you authenticate API calls? → Bearer token with mify_ API key
- What are the three content generation paths? → MIFY Queue (async GPU), AI Provider (sync/stream), ComfyUI Local
- How do you create a plugin? →
npx mify-plugin init, implement node,npx mify-plugin publish - What is RAG? → Retrieve relevant documents, then generate answers using that context
- How do you run batch jobs? → POST /api/batch with items array and concurrency setting
Previous: Chapter 4 — Creating a Plugin | Back to Courses