Mintplex-Labs/anything-llm · error · Error

Failed to load available flows

Error message

Failed to load available flows

What it means

Agent Builder admin page loads the flow list via AgentFlows.listFlows(); when the call answers success:false (or throws), the page toasts this generic message while console.error records the API's specific error string. The toast text hides the cause — the console has it.

Source

Thrown at frontend/src/pages/Admin/AgentBuilder/index.jsx:77

  }, []);

  useEffect(() => {
    if (flowId) {
      loadFlow(flowId);
    }
  }, [flowId]);

  useEffect(() => {
    const flowInfoBlock = blocks.find(
      (block) => block.type === BLOCK_TYPES.FLOW_INFO
    );
    setAgentName(flowInfoBlock?.config?.name || "");
  }, [blocks]);

  const loadAvailableFlows = async () => {
    try {
      const { success, error, flows } = await AgentFlows.listFlows();
      if (!success) throw new Error(error);
      setAvailableFlows(flows);
    } catch (error) {
      console.error(error);
      showToast("Failed to load available flows", "error", { clear: true });
    }
  };

  const loadFlow = async (uuid) => {
    try {
      const { success, error, flow } = await AgentFlows.getFlow(uuid);
      if (!success) throw new Error(error);

      // Convert steps to blocks with IDs, ensuring finish block is at the end
      const flowBlocks = [
        {
          id: "flow_info",
          type: BLOCK_TYPES.FLOW_INFO,
          config: {

View on GitHub (pinned to 3aec848f28)

Solutions

  1. Open the browser console — the raw API error is logged next to the toast
  2. Confirm you are logged in as an admin and the backend build includes agent flows support
  3. Check server logs for filesystem errors reading the agent-flows directory
  4. Retry after the server is confirmed healthy
Defensive patterns

Strategy: try-catch

Validate before calling

const { success, error, flows } = await AgentFlows.listFlows();
if (!success) {
  console.error(error);
  setAvailableFlows([]); // degrade gracefully — builder still usable for new flows
}

Try / catch

catch (error) {
  console.error(error);
  showToast("Failed to load available flows", "error", { clear: true });
  setAvailableFlows([]); // empty-state instead of blocking the page
}

Prevention

When it happens

Trigger: GET of the agent-flows list returning non-2xx: server error enumerating the flows directory, permissions problem on that folder, unauthenticated/expired admin session, or a backend version without the flows endpoint.

Common situations: Server storage path for flows moved or unreadable; upgrade mismatch between frontend page and backend routes; session expired while the admin tab sat open; transient server crash/restart.

Related errors


AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18). Data as JSON: /api/errors/5a4a3ba9ca2f6b7c. Report an issue: GitHub.