Skip to content

For Developers

MIFY is a 47-package TypeScript monorepo: Hono API (171 production route files), Next.js 15 frontend (205 pages), PostgreSQL + pgvector, Redis, Prisma 6, and 126 native nodes across 24 categories.

MIFY Canvas — visual workflow editor with 126 nodes

MIFY is not open-source at this time. Access is available through the hosted platform or by arrangement with the MIFY team.

What’s available now:

  • Hosted platform — use MIFY at mify.com
  • API access — REST endpoints for programmatic integration
  • Plugin system — build and publish plugins without access to the core codebase

Coming later:

  • The Home Client (local agent runtime) may be released as a public repository
  • Additional open-source components may follow

Full interactive reference: API Explorer | API Reference

Terminal window
# CRUD
POST /api/graphs # Create workflow
GET /api/graphs # List workflows
GET /api/graphs/{id} # Get workflow
PUT /api/graphs/{id} # Update workflow
DELETE /api/graphs/{id} # Delete workflow
# Import from external platforms
POST /api/graphs/import/flowise
POST /api/graphs/import/dify
POST /api/graphs/import/langflow
POST /api/graphs/import/n8n
# Execution
POST /api/graphs/{id}/run-templates/{tid}/execute
GET /api/graphs/{id}/comparison-history
POST /api/graphs/{id}/baseline
Terminal window
POST /api/content-gen/queue # Async GPU generation (ComfyUI)
POST /api/content-gen/provider # Sync/streaming from AI providers
POST /api/content-gen/comfyui-local/finalize # Local ComfyUI
GET /api/content-gen/runs # History
GET /api/content-gen/runs/{id} # Run detail
Terminal window
POST /api/execution/runs # Submit image/video/vision job
POST /api/execution/training/submit # Submit training run
POST /api/execution/training/datasets/upload # Create dataset
POST /api/execution/training/datasets/{id}/presign-file # R2 upload URL
GET /api/execution/training/models # Model registry
Terminal window
POST /api/knowledge-bases # Create KB
POST /api/knowledge-bases/{id}/ingest # Ingest documents
POST /api/knowledge-bases/{id}/search # Semantic search
AreaBase PathEndpoints
Templates/api/templatesBrowse, categories, enterprise
Evaluations/api/evaluationsDatasets, runs, results
Chat/api/chatSessions, messages
Tools/api/toolsCRUD for agent tools
AI Builder/api/ai-builderNatural language → workflow
Prompt Lab/api/prompt-labPrompt versioning, A/B compare
Vector Stores/api/vector-storesStore, query vectors
Batch/api/batchBatch job management
Triggers/api/triggersWebhook, schedule, event triggers
Packs/api/packsProvider pack management
ComfyUI/api/comfyuiWorkflow registry, job submission
Plugins/api/pluginsPlugin ecosystem
CategoryCountKey Nodes
Platform30Dify, Flowise, Langflow, n8n, ActivePieces, Node-RED, Composio static actions (Apollo, Zoom, Linear, Notion), 20+ more
LLM13Chat, Embed, Image, Vision, ASR, TTS, Translate, Classify
HITL12Pause, review gates, Home Client runtime nodes
I/O11HTTP, Cloudflare D1/KV/R2/Queue
RAG8Ingest, Chunk, Embed, Store, Retrieve, Rerank
Agent11ReAct, Multi-Agent (Plan-and-Execute, Reflection, Supervisor, Swarm), CLI Agent, EnvInspect, Browser Use, Computer Use
Control6Route If, Route Switch, Loop Map, Sub-Workflow
Safety3PII Detector, Injection Detector, Jailbreak Detector
Enterprise8Email, Calendar, Notifications, Messaging
Sandbox5sandbox.exec, sandbox.plan, sandbox.session, host.apply, workspace

Execute commands in isolated environments:

SubstrateWhat It Does
RawHostSubstrateExecute on host machine directly
CloudflareSandboxSubstrateExecute in Cloudflare Workers Containers
SubstrateRouterRoutes requests to appropriate substrate

New sandbox nodes: mify.sandbox.exec, mify.sandbox.plan, mify.host.apply, mify.workspace, mify.sandbox.session

Each runtime backend (LLM, document parser, browser, sandbox) is fronted by a resolver that picks per-workspace credentials with org/global fallback. Resolvers expose a BackendCapabilityManifest that auto-generates admin + workspace UI pages.

CapabilityWorkspace SettingAdmin Fallback
LLM/workspaces/[id]/settings/llm/admin/llm-fallback
Document Parser/workspaces/[id]/settings/parser/admin/parser-fallback
Browser/workspaces/[id]/settings/browser/admin/browser-fallback
Sandbox/workspaces/[id]/settings/sandbox/admin/sandbox-fallback

API: /api/admin/{llm,parser,browser,sandbox}-fallback/* and /api/workspaces/:id/settings/{llm,parser,browser,sandbox}/*.

Every published version of a workflow is captured in the GraphVersion table for rollback, diff, and audit.

Terminal window
# List versions
GET /api/graphs/:id/versions
# Publish current draft as a new version (idempotent)
POST /api/graphs/:id/publish
# Archive the currently-published version
POST /api/graphs/:id/archive
# Fork a prior version into a new draft (resurrect/edit)
POST /api/graphs/:id/draft-from/:versionId
# Diff two versions (3-layer JSON diff with d-m-p text deltas)
GET /api/graphs/:id/versions/:vA/diff/:vB

UI at /graphs/[graphId]/versions — VersionPicker, VersionDiff (line-level via diff-match-patch), and LifecycleControls.

Durable Workflow Execution + Time-Travel (W16-10)

Section titled “Durable Workflow Execution + Time-Travel (W16-10)”

Long-running graphs run on Temporal. Each node executes as a Temporal Activity, so the runtime survives process restarts, scales horizontally, and can be paused/resumed.

Terminal window
# Time-travel API
GET /api/temporal-time-travel/history/:runId # full event history
POST /api/temporal-time-travel/replay # re-execute from a chosen step
POST /api/temporal-time-travel/fork # fork into a new run with optional input override
GET /api/temporal-time-travel/runs # list durable runs (filterable)

UI: /admin/temporal/durable lists all durable runs; /workflows/[graphId]/runs/[runId] shows the full step-by-step trace with a “replay from here” affordance.

Each node receives account-bound credentials via resolveForNode inside Activities, so Activities never leak access tokens. Search-attributes are wired for fast queries by graphId, userId, and status.

Re-run only the dirty nodes when a workflow changes — not the entire DAG.

  • Pure-logic core in @mify/core — diffs current graph vs the last published version, marks downstream-of-dirty nodes
  • Postgres-backed cache (PartialExecutionCache model) — node outputs cached by content-hash
  • DirtyNodesIndicator UI on canvas visualizes which nodes will re-run
  • OversizedOutputBadge flags nodes whose outputs exceed cache-row limits
Terminal window
POST /api/canvas-execute # incremental run from canvas
POST /api/canvas-execute/admin/cache-clear # purge cache (admin)

Multi-user canvas editing with Hocuspocus + Yjs.

  • @mify/collab package: Yjs schema + bidirectional Y.Doc ↔ MifyGraph conversion
  • Hocuspocus server with Postgres persistence (GraphYjsState model) and SuperTokens auth handshake
  • useCollabCanvas hook handles Hocuspocus provider + remote-update receive path
  • Presence cursors — live multi-user cursor tracking with name + color
  • Y.Doc save-back to canonical MifyGraph keeps graph-versioning intact

Each Published workflow exposes a stable HTTP endpoint with auto-generated OpenAPI.

Terminal window
POST /api/workflow-endpoints/:slug # invoke workflow by slug (per-API-key rate limit)
GET /api/workflow-endpoints/:slug/openapi.json # auto-generated OpenAPI 3.1 spec
GET /api/workflow-endpoints/:slug/info # URL + sample curl + rate-limit policy

UI: WorkflowEndpointInfo panel on /graphs/[graphId]/versions.

Each Published workflow is automatically exposed across three agent protocols:

Terminal window
# MCP (W16-4) — any MCP client can list + call workflows
GET /api/workflow-mcp/list_tools
POST /api/workflow-mcp/call_tool
# A2A v1.0 (W16-5 + W17-7/8)
GET /api/a2a-server/.well-known/agent-card # AgentCard with auto-populated skills
POST /api/a2a-server/tasks/send
GET /api/a2a-server/tasks/:id
# LangGraph Agent Protocol (W17-9 + W19-1)
GET /api/agent-protocol/agents
POST /api/agent-protocol/agents/:id/invoke
POST /api/agent-protocol/agents/:id/stream

All three live in @mify/agents-network. The OpenAI Agents SDK adapter node (W19-2) handles the outbound direction — call any OpenAI Assistant from a Mify graph.

Terminal window
PUT /api/graphs/:id # metadata-merge with allowlist
# (name, description, slug, scheduleHints, endpointAuth, tags, ...)

UI at /graphs/[graphId]/settings with cross-link from the versions page.

Public unauth runner for starter templates, with rate-limit + LLM router + global daily gauge.

Terminal window
POST /api/public-demo-run/start # start an anonymous run
GET /api/public-demo-run/:runId/status
GET /api/public-demo-run/:runId/events # SSE event stream

AnonymousLlmDailyUsage model enforces a hard daily token ceiling globally. Cleanup cron + boot gate prevent runaway costs. UI wrapper at /templates/starter/[slug].

Terminal window
POST /api/ai-builder/generate # NL → workflow graph (W15-5)

Multi-agent runtime supports 4 strategies:

  • Plan-and-Execute — decompose goal → execute subtasks
  • Reflection — generate-then-critique loop
  • Supervisor — hierarchical coordinator + workers
  • Swarm — peer-to-peer message bus

Multi-page form builder + workflow trigger, fully wired:

Terminal window
POST /api/forms # create form (workspace-scoped)
GET /api/forms/:id # render-time form definition
POST /api/forms/:id/submit # submit → calls FormTriggerPlugin → triggers workflow

UI: /forms (list), /forms/[formId] (render), /forms/[formId]/builder (drag-drop multi-page builder with conditional fields). Persistence via the MifyForm Prisma model. The FormTriggerPlugin (packages/triggers/src/plugins/FormTriggerPlugin.ts) handles the trigger side.

Public unauth chat widget for franchise sites:

Terminal window
POST /api/chat-widget/message # Public unauth Demo 0 endpoint

Hardened with rate-limit, quota guard, redaction (W15-14). Powers /embed/chat.

Cron-based graph execution stored in PostgreSQL:

Terminal window
# Create schedule from template
POST /api/home/schedules/from-template
# Check if execution is waiting for HITL approval
GET /api/home/schedules/:id/waiting
# Approve paused execution
POST /api/home/schedules/:id/approve
# Execution history
GET /api/home/schedules/:id/executions

Supports webhook notifications for schedule events.

Build, test, and publish plugins:

Terminal window
npx mify-plugin init my-plugin
npx mify-plugin dev # Hot reload dev server
npx mify-plugin test # Run tests
npx mify-plugin validate # Check manifest
npx mify-plugin publish # Publish to marketplace

Plugin manifest v1.4.0 — extend with custom nodes, adapters, and credentials. Sandboxed execution in V8 or WASM runtimes.

Plugin guide: Plugin Development

Central discovery page for 28+ platform integrations. Platform registry with health monitoring, quick-connect flows.

  • Track A (native): Dify, Flowise, Langflow, n8n, OpenClaw, RAGFlow, DocuSeal
  • Track B (registry-driven): 28+ self-hosted and SaaS platforms
  • Gmail, Outlook (email)
  • Google Calendar, Outlook Calendar
  • Composio connector marketplace

8 service interfaces: Identity, Payments, Ledger, Jobs, AIExecution, Media, Events, Notifications. Studio-backed adapters with JWT auth.

Run AI coding agents locally:

  • CAO multi-agent backend — coordinate Claude Code + Codex with human review
  • 9-state FSM — INIT → Agent1 → Diff → Agent2 Review → Human Gate → Done
  • Cron scheduler — scheduled agent runs with timezone support
  • LiteLLM client — model selection and provider-aware scheduling
  • Prompt templates — structured prompt assembly with provenance tracking

WebSocket bridge on port 3020. API: /api/home/schedules, /api/home/sync.

Guide: Home Client

Three execution classes:

  • Deterministic — same input = same output (Template, JavaScript nodes)
  • Probabilistic — AI nodes where output varies (Chat, Embed)
  • Opaque — external platform calls (Dify, Flowise)

Trust levels: Trusted → Semi-Trusted → Opaque. Rigor modes: Experimental (fast) vs Audited (full trail).

Batch processing with concurrency control, pause/resume/cancel.

Guide: Execution & Trust

Three paths:

PathHowBest For
MIFY QueueComfyUI workflows → GPU providers (Novita, Vast)High-quality image/video
AI ProviderDirect AI calls, sync or SSE streamingText, quick images
ComfyUI LocalLocal GPUCustom models

WorkflowDefinition model with 12 override types, 11 UI widgets for dynamic forms. Redis-based rate limiter, Prometheus metrics, cost tracking.

Guide: Content Generation

AI Providers (140+ via LiteLLM, 16 native)

Section titled “AI Providers (140+ via LiteLLM, 16 native)”

16 native: OpenAI, Anthropic, Google Gemini, Groq, Mistral, Cohere, xAI, DeepSeek, Together AI, Fireworks, Hugging Face, OpenRouter, SambaNova, GitHub Models, Cloudflare Workers AI, Ollama.

140+ providers / 2,600+ models / 35 unique endpoints via LiteLLM — live count at models.litellm.ai/providers. Admin at /admin/litellm.

Provider packs (Fast/Balanced/Accurate), BYOK credential management, cost estimation.

Guide: AI Provider System

  • D1: Query
  • KV: Get, Put, List, Delete
  • R2: Get, Put, List, Delete
  • Vectorize: Query, Upsert
  • Queues: Send
Terminal window
# Expert services
GET /api/experts # Browse experts
POST /api/jobs # Post a job
POST /api/bids # Submit a proposal
# Solutions
GET /api/solutions # Browse solutions
POST /api/purchases # Purchase a solution
# Payments
POST /api/escrow # Escrow operations
GET /api/payouts # Payout management

Main DB: PostgreSQL with Prisma 6 (173 models). Franchise DB: separate bounded-context database (10 models).

1200+ E2E tests across 157 Playwright spec files. Vitest for unit tests.

Terminal window
pnpm test # All unit tests
pnpm test:e2e # Full E2E suite
pnpm test:e2e:smoke # Fast smoke tests
ResourceLink
Interactive API Explorer/api-explorer/
API Reference/reference/api-reference/
Building Workflows/guides/workflows/
Plugin Development/guides/plugins/
Platform Connections/guides/connections/
Content Generation/guides/content-generation/
Home Client/guides/home-client/
Glossary/reference/glossary/