← Home System Overview Architecture Data Pipeline Health System Usage System Workflows MCP Tools

Workflows — ManyAI Desktop

Blueprint · Last updated 2026-05-03

Overview

ManyAI Desktop separates its tab types into two categories: built-in modules (IRC, RSS, Terminal, Programming) and file-backed workflows (coding, image, reasoning, etc.). Built-ins are toggled via Settings → Built-in and are never shown in the New Tab picker. File-backed workflows appear in the picker and can be created, edited, and deleted by the user.

WorkflowPlugin Interface

interface WorkflowPlugin {
  type: string;           // unique identifier, e.g. 'coding'
  label: string;          // display name shown on tab
  icon: string;           // emoji or icon
  description: string;    // shown in workflow picker
  defaultRoutes: RouteEntry[];   // ordered provider chain
  workflowType: WorkflowType[];  // required model capabilities
}

interface RouteEntry {
  provider: string;
  model: string;
  enabled?: boolean;
  instanceId?: string;   // stable GUID — survives reorder, resets on delete+re-add
}

Built-in Modules (4) — Settings → Built-in tab

These are modular features, not workflows. They are defined in SYSTEM_TYPES and excluded from the workflow picker by enabledUserWorkflows(). Each has a checkbox in Settings → Built-in. Checking opens a tab of that type; unchecking closes all open tabs of that type. Toggle state is derived live from tabs.some(t => t.workflowType === type) — no separate persistence flag.

TypeLabelUse CaseNotes
ircIRC 💬IRC clientRaw TCP via main process; publishes to workflowBus
rssRSS 📰RSS feed readerPublishes to workflowBus
terminalTerminal 🖥️SSH/Telnet/SFTP/FTP clientxterm.js + ssh2 + basic-ftp
programmingProgramming ⚙️Autonomous coding agentagentLoop — 9 native tools + dynamic MCP tools; file tree with Browse + Refresh; max 20 iterations

File-backed Workflows (6) — appear in New Tab picker

Seeded to {workingDir}/workflows/*.json on first run. User-editable via Settings → Workflows. The picker uses enabledUserWorkflows() which filters out SYSTEM_TYPES so built-ins never appear here.

TypeLabelUse CaseDefault Routes
imageImageImage generationpollinations/flux
codingCodeCode generation and explanationmistral, openai, anthropic
reasoningReasoningDeep analysis and logicsambanova, anthropic, openai
creativeCreativeWriting and brainstormingmistral, anthropic, openai
summarizationSummarizeLong text compressiongemini, cohere, groq
translationTranslateLanguage translationgemini, mistral

Custom Workflows

Created via Settings → Workflows. Stored as JSON files in the working directory and loaded by lib/workflows.ts at startup. Custom workflows can define: a custom system prompt, provider chain, and workflowType array. They appear alongside the 6 built-in file-backed types in the New Tab picker.

Capability Gating

Each model in a providers/*.json file has a capabilities[] array. A model is only offered for a workflow if its capabilities include all values in that workflow's workflowType array. This prevents mismatched routing — for example, a text-only model will never appear in the image workflow's provider list.

enabledUserWorkflows()

Exported from lib/workflows.ts. Returns loadWorkflows().filter(w => w.enabled && !SYSTEM_TYPES.has(w.type)). Used by RightPanel to populate the New Tab workflow picker. Built-in module types are always excluded regardless of their enabled state.

WORKFLOW_REGISTRY

workflows/index.ts is the single source of truth for all registered plugins. Custom workflows are merged at load time via lib/workflows.ts. The registry drives tab rendering, the New Tab picker, and routing resolution.

Adding a New File-backed Workflow

  1. Create src/renderer/src/workflows/myworkflow.ts exporting a WorkflowPlugin.
  2. Import it in workflows/index.ts and add to WORKFLOW_REGISTRY.
  3. Ensure the type is NOT in SYSTEM_TYPES — it will then appear in the picker automatically.

Adding a New Built-in Module

  1. Add the type string to SYSTEM_TYPES in lib/workflows.ts.
  2. Add a checkbox entry in settings/SettingsScreen.tsxBuiltinSettings component.
  3. Add the rendering branch in App.tsx tab content area.
  4. Wire up any required IPC in src/main/ipc/.