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
- Open the browser console — the raw API error is logged next to the toast
- Confirm you are logged in as an admin and the backend build includes agent flows support
- Check server logs for filesystem errors reading the agent-flows directory
- 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
- Degrade to an empty list with a retry button instead of failing the whole builder page
- Log the API's error string alongside the generic toast so cause is diagnosable
- Handle 401 by redirecting to login rather than showing a load failure
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
- Failed to load flow
- Failed to publish agent flow: ${error.message}
- ${message}
- Invalid path name
- AnthropicLLM::getChatCompletion failed to communicate with A
AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18).
Data as JSON: /api/errors/5a4a3ba9ca2f6b7c.
Report an issue: GitHub.