Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:FlowiseAI Flowise GetAllAgentflows

From Leeroopedia
Property Value
Page ID FlowiseAI_Flowise_GetAllAgentflows
Source Repository FlowiseAI/Flowise
Source File packages/ui/src/api/chatflows.js
Domain AI Workflow Orchestration, CRUD Listing Patterns
Last Updated 2026-02-12 14:00 GMT

Overview

Implementation of the agentflow listing API function that retrieves paginated lists of agent flow configurations filtered by flow type. This function wraps an HTTP GET request to the unified chatflows endpoint with a dynamic type parameter.

Code Reference

Source Location

Signature

const getAllAgentflows = (type, params) => client.get(`/chatflows?type=${type}`, { params })

Import

import chatflowsApi from '@/api/chatflows'

Then invoke as:

chatflowsApi.getAllAgentflows(type, params)

I/O Contract

Inputs

Parameter Type Description
type string The flow type filter. Must be one of "AGENTFLOW" or "MULTIAGENT".
params object Pagination parameters passed as query string parameters.
params.page number The page number for pagination (zero-indexed or one-indexed depending on server implementation).
params.limit number The maximum number of results to return per page.

Outputs

Field Type Description
data Agentflow[] Array of agent flow configuration objects matching the type filter for the requested page.
total number Total number of agent flows matching the type filter across all pages.

The function returns a Promise that resolves to an Axios response object. The response payload is accessible via response.data.

Usage Examples

Listing AGENTFLOW type flows

import chatflowsApi from '@/api/chatflows'

// Retrieve the first page of AGENTFLOW type flows
const response = await chatflowsApi.getAllAgentflows('AGENTFLOW', { page: 0, limit: 20 })
const { data: agentflows, total } = response.data
console.log(`Found ${total} agent flows, showing ${agentflows.length}`)

Listing MULTIAGENT type flows

import chatflowsApi from '@/api/chatflows'

// Retrieve multi-agent orchestration flows
const response = await chatflowsApi.getAllAgentflows('MULTIAGENT', { page: 0, limit: 10 })
const { data: multiagentFlows, total } = response.data

Comparison with chatflow listing

// Chatflow listing (hardcoded type)
const getAllChatflows = (params) => client.get('/chatflows?type=CHATFLOW', { params })

// Agentflow listing (dynamic type parameter)
const getAllAgentflows = (type, params) => client.get(`/chatflows?type=${type}`, { params })

API Client Configuration

The client import references the Axios API client configured at packages/ui/src/api/client.js:

import axios from 'axios'
import { baseURL } from '@/store/constant'

const apiClient = axios.create({
    baseURL: `${baseURL}/api/v1`,
    headers: {
        'Content-type': 'application/json',
        'x-request-from': 'internal'
    },
    withCredentials: true
})

This means the full request URL resolves to {baseURL}/api/v1/chatflows?type={type}&page={page}&limit={limit}.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment