Skip to main content

AgentFlow API

Agent Flow API

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

Quick Reference

MethodDescription
createCreates a new agent flow.
getRetrieves agent flow(s).
getPluginsRetrieves available agent flow plugins.
getPluginUiRetrieves the UI definition for a specific flow plugin.
updateUpdates an existing agent flow.

Methods


create

client.agentFlow.create(data: CreateAgentFlowRequest): Promise<AgentFlow>

Creates a new agent flow.

Defines a new node-based workflow that agents can execute. The flow consists of interconnected plugin nodes that define the processing pipeline.

ParameterTypeRequiredDescription
dataCreateAgentFlowRequestYesThe flow creation payload including nodes and connections

Returns: Promise<AgentFlow> — A promise that resolves to the newly created AgentFlow

Full reference →


get

client.agentFlow.get(params?: Record<string, unknown>): Promise<AgentFlow>

Retrieves agent flow(s).

Returns one or more agent flows based on the provided query parameters. Use this to look up flows by name, ID, or other criteria.

ParameterTypeRequiredDescription
paramsRecord<string, unknown>NoOptional query parameters to identify which flow(s) to retrieve

Returns: Promise<AgentFlow> — A promise that resolves to the AgentFlow object

Full reference →


getPlugins

client.agentFlow.getPlugins(params?: Record<string, unknown>): Promise<AgentFlowPlugin[]>

Retrieves available agent flow plugins.

Returns the list of plugin types that can be used as nodes within agent flows, each defining a specific processing capability.

ParameterTypeRequiredDescription
paramsRecord<string, unknown>NoOptional query parameters for filtering plugins

Returns: Promise<AgentFlowPlugin[]> — A promise that resolves to an array of AgentFlowPlugin objects

Full reference →


getPluginUi

client.agentFlow.getPluginUi(pluginName: string): Promise<AgentFlowPluginUi>

Retrieves the UI definition for a specific flow plugin.

Returns the schema and layout information needed to render the plugin's configuration interface in the flow editor.

ParameterTypeRequiredDescription
pluginNamestringYesThe name of the plugin to get the UI definition for

Returns: Promise<AgentFlowPluginUi> — A promise that resolves to the AgentFlowPluginUi definition

Full reference →


update

client.agentFlow.update(data: UpdateAgentFlowRequest): Promise<AgentFlow>

Updates an existing agent flow.

Modifies the node configuration, connections, or metadata of an existing flow.

ParameterTypeRequiredDescription
dataUpdateAgentFlowRequestYesThe update payload containing the modified flow data

Returns: Promise<AgentFlow> — A promise that resolves to the updated AgentFlow

Full reference →