Mintplex-Labs/anything-llm · error · Error
response.error || "Failed to create agent flow"
Error message
response.error || "Failed to create agent flow"
What it means
Frontend guard in CommunityHub.createAgentFlow: the agent-flow create endpoint returned a non-ok status, so the flow was not created in the community hub; the server error is preferred, with 'Failed to create agent flow' as fallback.
Solutions
- Validate the agent flow definition before submitting.
- Check the Community Hub connection key.
- Review the returned error for missing fields.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown when creating an agent flow via the Community Hub fails.
Common situations: Invalid flow definition or hub connection issue.
AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18).
Data as JSON: /api/errors/300d3f194453dbae.
Report an issue: GitHub.
Appendix: source
Thrown at frontend/src/models/communityHub.js:198
success: false,
error: e.message,
}));
},
/**
* Create a new agent flow in the community hub
* @param {Object} data - The agent flow data
* @returns {Promise<{success: boolean, error: string | null}>}
*/
createAgentFlow: async (data) => {
return await fetch(`${API_BASE}/community-hub/agent-flow/create`, {
method: "POST",
headers: baseHeaders(),
body: JSON.stringify(data),
}).then(async (res) => {
const response = await res.json();
if (!res.ok)
throw new Error(response.error || "Failed to create agent flow");
return { success: true, error: null, itemId: response.item?.id };
});
},
/**
* Create a new slash command in the community hub
* @param {Object} data - The slash command data
* @param {string} data.name - The name of the command
* @param {string} data.description - The description of the command
* @param {string} data.command - The actual command text
* @param {string} data.prompt - The prompt for the command
* @param {string[]} data.tags - Array of tags
* @param {string} data.visibility - Either 'public' or 'private'
* @returns {Promise<{success: boolean, error: string | null}>}
*/
createSlashCommand: async (data) => {
return await fetch(`${API_BASE}/community-hub/slash-command/create`, {
method: "POST",View on GitHub (pinned to 3aec848f28)