Mintplex-Labs/anything-llm · error · Error

This flow includes unsupported blocks. They may not be suppo

Error message

This flow includes unsupported blocks. They may not be supported by your version of AnythingLLM or are not available on this platform.

What it means

Thrown by AgentFlows.saveFlow() after it builds the list of supported step types from FLOW_TYPES and finds that one or more steps in config.steps have a type not in that list. This blocks saving or importing a flow that contains blocks the current platform/version cannot run (e.g., file-writing or code-execution blocks that exist on Desktop but not Docker). It is caught inside saveFlow and returned as { success:false, error } rather than propagating.

Source

Thrown at server/utils/agentFlows/index.js:119

  static saveFlow(name, config, uuid = null) {
    try {
      AgentFlows.createOrCheckFlowsDir();

      if (!uuid) uuid = uuidv4();
      const normalizedUuid = normalizePath(`${uuid}.json`);
      const filePath = path.join(AgentFlows.flowsDir, normalizedUuid);
      if (!isWithin(AgentFlows.flowsDir, filePath)) return null;

      // Prevent saving flows with unsupported blocks or importing
      // flows with unsupported blocks (eg: file writing or code execution on Desktop importing to Docker)
      const supportedFlowTypes = Object.values(FLOW_TYPES).map(
        (definition) => definition.type
      );
      const supportsAllBlocks = config.steps.every((step) =>
        supportedFlowTypes.includes(step.type)
      );
      if (!supportsAllBlocks)
        throw new Error(
          "This flow includes unsupported blocks. They may not be supported by your version of AnythingLLM or are not available on this platform."
        );

      fs.writeFileSync(filePath, JSON.stringify({ ...config, name }, null, 2));
      return { success: true, uuid };
    } catch (error) {
      console.error("Failed to save flow:", error);
      return { success: false, error: error.message };
    }
  }

  /**
   * List all available flows
   * @returns {Array} Array of flow summaries
   */
  static listFlows() {
    try {
      const flows = AgentFlows.getAllFlows();

View on GitHub (pinned to 526360e320)

Solutions

  1. Identify which step.type in the flow is not supported by inspecting FLOW_TYPES in flowTypes.js for your build.
  2. Remove the unsupported step(s) from the flow and re-save.
  3. Recreate the flow natively on the target platform rather than importing cross-edition.
  4. Upgrade the target AnythingLLM to a version that supports the block type.
Defensive patterns

Strategy: validation

Validate before calling

const { FLOW_TYPES } = require("./flowTypes");
const SUPPORTED = Object.values(FLOW_TYPES).map((d) => d.type);
function preCheckFlowBlocks(config) {
  const unsupported = (config.steps || []).filter((s) => !SUPPORTED.includes(s.type));
  if (unsupported.length)
    throw new Error(`Cannot save: unsupported types ${unsupported.map((s) => s.type).join(", ")}`);
}

Type guard

const isSaveableFlow = (config) =>
  Array.isArray(config?.steps) &&
  config.steps.every((s) => SUPPORTED.includes(s.type));

Try / catch

const res = AgentFlows.saveFlow(name, config, uuid);
if (!res.success && res.error.includes("unsupported blocks")) {
  // strip unsupported steps and retry, or surface to the user
}

Prevention

When it happens

Trigger: Calling saveFlow() with a config whose steps array includes a step.type not present in the FLOW_TYPES values for this build. Common on cross-platform import (Desktop flow imported into Docker) or after a version downgrade where a block type was removed.

Common situations: Exporting a flow from one AnythingLLM edition and importing into another with a different block set; downgrading versions; manually constructing a flow JSON with an unsupported type and saving via the API.

Related errors


AI-assisted analysis of Mintplex-Labs/anything-llm@526360e320 (2026-08-13). Data as JSON: /api/errors/22bdd0eb1154b0ca. Report an issue: GitHub.