Feature/agentflow v2 (#4298)

* agent flow v2

* chat message background

* conditon agent flow

* add sticky note

* update human input dynamic prompt

* add HTTP node

* add default tool icon

* fix export duplicate agentflow v2

* add agentflow v2 marketplaces

* refractor memoization, add iteration nodes

* add agentflow v2 templates

* add agentflow generator

* add migration scripts for mysql, mariadb, posrgres and fix date filters for executions

* update agentflow chat history config

* fix get all flows error after deletion and rename

* add previous nodes from parent node

* update generator prompt

* update run time state when using iteration nodes

* prevent looping connection, prevent duplication of start node, add executeflow node, add nodes agentflow, chat history variable

* update embed

* convert form input to string

* bump openai version

* add react rewards

* add prompt generator to prediction queue

* add array schema to overrideconfig

* UI touchup

* update embedded chat version

* fix node info dialog

* update start node and loop default iteration

* update UI fixes for agentflow v2

* fix async drop down

* add export import to agentflowsv2, executions, fix UI bugs

* add default empty object to flowlisttable

* add ability to share trace link publicly, allow MCP tool use for Agent and Assistant

* add runtime message length to variable, display conditions on UI

* fix array validation

* add ability to add knowledge from vector store and embeddings for agent

* add agent tool require human input

* add ephemeral memory to start node

* update agent flow node to show vs and embeddings icons

* feat: add import chat data functionality for AgentFlowV2

* feat: set chatMessage.executionId to null if not found in import JSON file or database

* fix: MariaDB execution migration script to utf8mb4_unicode_520_ci

---------

Co-authored-by: Ong Chung Yau <33013947+chungyau97@users.noreply.github.com>
Co-authored-by: chungyau97 <chungyau97@gmail.com>
This commit is contained in:
Henry Heng
2025-05-10 10:21:26 +08:00
committed by GitHub
parent 82e6f43b5c
commit 7924fbce0d
216 changed files with 33304 additions and 5269 deletions
+34 -2
View File
@@ -8,6 +8,7 @@ import { Moderation } from '../nodes/moderation/Moderation'
export type NodeParamsType =
| 'asyncOptions'
| 'asyncMultiOptions'
| 'options'
| 'multiOptions'
| 'datagrid'
@@ -57,12 +58,13 @@ export interface INodeOptionsValue {
label: string
name: string
description?: string
imageSrc?: string
}
export interface INodeOutputsValue {
label: string
name: string
baseClasses: string[]
baseClasses?: string[]
description?: string
hidden?: boolean
isAnchor?: boolean
@@ -83,10 +85,12 @@ export interface INodeParams {
rows?: number
list?: boolean
acceptVariable?: boolean
acceptNodeOutputAsVariable?: boolean
placeholder?: string
fileType?: string
additionalParams?: boolean
loadMethod?: string
loadConfig?: boolean
hidden?: boolean
hideCodeExecute?: boolean
codeExample?: string
@@ -96,6 +100,11 @@ export interface INodeParams {
refresh?: boolean
freeSolo?: boolean
loadPreviousNodes?: boolean
array?: Array<INodeParams>
show?: INodeDisplay
hide?: INodeDisplay
generateDocStoreDescription?: boolean
generateInstruction?: boolean
}
export interface INodeExecutionData {
@@ -103,7 +112,7 @@ export interface INodeExecutionData {
}
export interface INodeDisplay {
[key: string]: string[] | string
[key: string]: string[] | string | boolean | number | ICommonObject
}
export interface INodeProperties {
@@ -120,11 +129,15 @@ export interface INodeProperties {
badge?: string
deprecateMessage?: string
hideOutput?: boolean
hideInput?: boolean
author?: string
documentation?: string
color?: string
hint?: string
}
export interface INode extends INodeProperties {
credential?: INodeParams
inputs?: INodeParams[]
output?: INodeOutputsValue[]
loadMethods?: {
@@ -412,14 +425,19 @@ export interface IServerSideEventStreamer {
streamCustomEvent(chatId: string, eventType: string, data: any): void
streamSourceDocumentsEvent(chatId: string, data: any): void
streamUsedToolsEvent(chatId: string, data: any): void
streamCalledToolsEvent(chatId: string, data: any): void
streamFileAnnotationsEvent(chatId: string, data: any): void
streamToolEvent(chatId: string, data: any): void
streamAgentReasoningEvent(chatId: string, data: any): void
streamAgentFlowExecutedDataEvent(chatId: string, data: any): void
streamAgentFlowEvent(chatId: string, data: any): void
streamNextAgentEvent(chatId: string, data: any): void
streamNextAgentFlowEvent(chatId: string, data: any): void
streamActionEvent(chatId: string, data: any): void
streamArtifactsEvent(chatId: string, data: any): void
streamAbortEvent(chatId: string): void
streamEndEvent(chatId: string): void
streamUsageMetadataEvent(chatId: string, data: any): void
}
export enum FollowUpPromptProvider {
@@ -446,3 +464,17 @@ export type FollowUpPromptConfig = {
status: boolean
selectedProvider: FollowUpPromptProvider
} & FollowUpPromptProviderConfig
export interface ICondition {
type: string
value1: CommonType
operation: string
value2: CommonType
isFulfilled?: boolean
}
export interface IHumanInput {
type: 'proceed' | 'reject'
startNodeId: string
feedback?: string
}