* update langchain and all related scoped packages to v1, deprecate agents and llms, rename and upgrade chat models
* add reasoning capability to Agent and LLM
* add token cost to usageMetadata
* update azure and chat openai
* restore executable permission for husky pre-commit hook
* refactor(agentflow): implement extractResponseContent utility for consistent response handling
- Introduced extractResponseContent function to streamline response content extraction across various components.
- Updated multiple files to utilize the new utility, enhancing code readability and maintainability.
- Adjusted model configurations and added new parameters for Gemini models to improve functionality.
* added a mock implementation for the logger in the URL security utilities test file to isolate tests and improve reliability.
* chore: update package.json and pnpm-lock.yaml to add uuid dependency and mock multer-azure-blob-storage in Jest config
- Added uuid dependency with version 10.0.0 and request>uuid with version 3.4.0 in package.json.
- Updated pnpm-lock.yaml to reflect the new uuid dependency and its deprecation notice.
- Modified Jest configuration to mock multer-azure-blob-storage to avoid module resolution issues with uuid/v4.
* gpt 5.4 models
* - Changed the stream conversion method in convertTextToSpeechStream to utilize Readable.fromWeb, enhancing compatibility with web streams.
- Added '/api/v1/chatmessage/abort' to the WHITELIST_URLS array to allow for aborting chat messages in the API.
* - Refactors how agentflow nodes (Agent, ConditionAgent, LLM) handle images in chat messages so that base64 is only used during model invocation
- Storage and chat history keep file references only
- Added comprehensive test cases to ensure correct handling of base64 image data and file references
* fix unit test
* implement filename sanitization to prevent path traversal vulnerabilities
* fix(validator): normalize backslashes in file names for cross-platform compatibility
* updated utils to process messages with images, converting stored-file references to base64 for model invocation, and implement interfaces
* add sanitization to unwanted keys when processing images
* add uuid to components package.json
* move allow image uploads params on chat models
* add encodingformat to openai embeddings
* Refactor output parsing for reasoning models
* Update ConditionAgent to version 2.0, refactor system prompt handling, and enhance message preparation logic
* add claude settings local json to gitignore
* remove claude settings local json
---------
Co-authored-by: yau-wd <[email protected]>
* feat(agentflow): MessagesInput, StructuredOutputBuilder + ExpandTextDialog (FLOWISE-263, FLOWISE-267)
Wire MessagesInput and StructuredOutputBuilder atoms into EditNodeDialog
for agentMessages/llmMessages and agentStructuredOutput/llmStructuredOutput
array params. Extract shared ExpandTextDialog atom used by both
MessagesInput and NodeInputHandler for expanding multiline text fields.
- MessagesInput: role dropdown + multiline content with variable/expand icons
- StructuredOutputBuilder: key/type/description fields with conditional
enum values and JSON schema fields
- ExpandTextDialog: reusable expand dialog for long text editing
- EditNodeDialog: name-based routing for specialized array components
- maxItems forward-compat guard on Add buttons
- Remove dead default exports for barrel-only modules
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* address gemini review feedback
* Enhance StructuredOutputBuilder with required asterisk for Description, add info tooltips for Enum Values and JSON Schema, and implement ExpandTextDialog for JSON Schema editing. Update tests to cover new features and interactions.
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
* added support fo multi options
* add support for store amad embeddings api
* Changed naming of all apiClients to be consistent
* Add correct index to ArrayInput
* Log error when parsing multiOptions value fails
Add error logging for failed parsing of multiOptions value.
* Fix error handling
* feat(agentflow): add ConditionBuilder component and dynamic output ports (FLOWISE-261)
Implement condition node editing UI with dynamic output port syncing:
- ConditionBuilder atom for rendering condition arrays with Else indicator
- buildDynamicOutputAnchors utility (parameterized for reuse by FLOWISE-262)
- useDynamicOutputPorts hook with orphaned edge cleanup on condition deletion
- EditNodeDialog integration for conditionAgentflow nodes
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* address gemini review comments, also relocate Condition Builder and hooks
* address gemini comment and also fix a number of issues on conditions update
- Add ConditionBuilder atom with stable keys and Else indicator
- Add buildDynamicOutputAnchors utility with v2-compatible format (numeric label + description)
- Add useDynamicOutputPorts hook for orphaned edge cleanup on condition deletion
- Integrate into EditNodeDialog with merged updateNodeData to avoid stale-closure overwrites
- Generate condition output anchors at node creation time in nodeFactory
- Add registerOnFlowChange to AgentflowContext for context-level change notification
* Update packages/agentflow/src/atoms/ConditionBuilder.tsx
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
* fix(ci): avoid workspace: protocol error in publish-agentflow workflow
Use working-directory instead of pnpm exec for npm version, and
pnpm pack instead of pnpm exec npm pack, to avoid npm encountering
pnpm's workspace: protocol. Sort deps alphabetically in package.json
to prevent future noise from npm tooling.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix(ci): use npx semver + npm pkg set to avoid workspace: protocol error
npm version and pnpm version both fail in this monorepo because they
resolve the full dependency tree and choke on pnpm's workspace: protocol.
Replace with npx semver (compute version) + npm pkg set (write version).
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
* initial flow
* Fixed export types and added example application to test end to end flow
* Fix build errors
* fix gemini comments
* Test bug fix
* Fixed comments
* Removed API inspector example
* Refactor imports in index.ts for clarity
* Refactor exports and update type definitions
* Remove empty line in index.ts
Removed an empty line for cleaner code formatting.
* Use secureFetch and secureAxiosRequest for URL's controlled by user input
* Use secureFetch and secureAxiosRequest for more URLs
* Use secureFetch and secureAxiosRequest for more URLs
---------
Co-authored-by: christopherholland-workday <[email protected]>
* feat(agentflow): add requestInterceptor prop for API customization
- Introduced a new `requestInterceptor` prop in the Agentflow component to allow users to customize outgoing API requests.
- Updated relevant components and types to support the new interceptor functionality.
- Enhanced the API client to handle the interceptor and log errors if thrown during request processing.
- Added tests to ensure the interceptor works as expected and does not recreate the client unnecessarily.
* refactor(agentflow): reorganize type exports and clean up API types
- Rearranged the export order of types in index.ts for better readability.
- Removed unused ApiContextValue interface from api.ts to streamline API types.
- Ensured ApiResponse and ValidationError are correctly positioned in the type exports.
* address gemini review comments
* refactor(agentflow): use design tokens for validation colors
Replace hardcoded '#FFB938' validation color with tokens.colors.border.validation
across AgentFlowNode and ValidationFeedback components for consistency
with the design token system.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* refactor(agentflow): move validationColor to module level
Hoist the validationColor constant outside the component body
since it's a static value that doesn't need to be redeclared
on every render.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
* feat(agentflow): Add array input component with field visibility
- Add ArrayInput component for managing lists of structured data
- Implement field visibility engine with show/hide conditions
- Add minItems constraint support for array inputs
- Add comprehensive test coverage for ArrayInput and EditNodeDialog
- Update NodeInputHandler to support array type inputs
- Update types to include array-related input parameters
* Move show/hide field logic into EditNodeDialog
* FIx build issue
* Fix gemini comments
* Fix comments
* Lint error fix
* feat(agentflow): enhance validation and feedback mechanisms
- Added constraint validation functions to ensure flow integrity, including checks for single start nodes, nested iterations, and human input restrictions within iterations.
- Implemented a new ValidationFeedback component to display validation results and issues directly in the UI.
- Updated the Agentflow component to integrate validation feedback and display snackbar notifications for constraint violations.
- Enhanced flow validation logic to detect hanging edges and validate node inputs, improving overall flow integrity checks.
- Introduced new test cases for validation functions to ensure robustness and reliability.
* address gemini review feedback
* feat(workflow): add GitHub Actions workflow for publishing @flowiseai/agentflow
- Introduced a new workflow to handle version bumps and publishing of the @flowiseai/agentflow package.
- Supports various version bump types (prerelease, patch, minor, major, custom) and allows for custom version input.
- Includes a dry-run step to validate the version and simulate the publish process before actual deployment.
- Configured to use pnpm for dependency management and publishing tasks.
* chore(workflow): update permissions and add version bump commit step
- Changed permissions for the GitHub Actions workflow to allow write access for contents.
- Added a step to commit and push the version bump for the @flowiseai/agentflow package after publishing.
* chore(workflow): enhance version bump process with PR creation
- Added permission for pull-requests in the GitHub Actions workflow.
- Modified the version bump step to create a new branch and open a pull request after committing the version bump for the @flowiseai/agentflow package.
* address review comments
* Remove ability for any additional imports to be added to LLM generated python code
* Stop LLM Generated Code from Having Any Additional Imports
---------
Co-authored-by: christopherholland-workday <[email protected]>
fix(workflow): enhance file change detection logic in proprietary-path-guard.yml
- Update the logic to fall back to default branch comparison when the before SHA is unreachable, ensuring robust detection of changed files during CI workflows.
* feat(agentflow): add field visibility engine with show/hide conditions
Add InputParam show/hide condition support that controls field visibility
based on current input values. Includes regex, array, boolean, and nested
path matching with parity to upstream genericHelper.js.
- Add fieldVisibility utility (evaluateFieldVisibility, stripHiddenFieldValues)
- Add show/hide fields to InputParam type
- Integrate visibility into EditNodeDialog (re-evaluate on change, preserve
hidden values in state)
- Update useOpenNodeEditor to fall back to node.data.inputs when API schema
is unavailable
- Move connectionValidation from utils/ to validation/
- Skip hidden params in validateNode required-input checks
- Add CustomNodeExample demo with live visibility state panel
- Update ARCHITECTURE.md and TESTS.md
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* address gemini review feedbacks
* address review feedback
* fix(agentflow): build ReDoS test patterns dynamically to avoid CodeQL flag
Co-Authored-By: Claude Opus 4.6 <[email protected]>
* fix(agentflow): harden ReDoS detection and fix falsy required-input check
- Replace regex-based nested quantifier detection with a character-by-character
parser that catches bypass patterns like (a|aa)+ and (a+ )+
- Fix required-input validation to use nullish check (== null || === '')
instead of falsy check (!value), allowing 0 and false as valid inputs
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---------
Co-authored-by: Claude Opus 4.6 <[email protected]>
* test(agentflow): update ConnectionLine and GenerateFlowDialog tests to use SvgWrapper for rendering
- Modified tests for ConnectionLine to wrap components in SvgWrapper for proper rendering of SVG elements.
- Updated GenerateFlowDialog tests to include async wait for chat models to be loaded before assertions.
- Enhanced test coverage and reliability by ensuring correct rendering contexts for components.
* address gemini review comments
* refactor(agentflow): enhance ESLint configuration and improve test coverage
- Updated ESLint configuration to include TypeScript resolver for improved import handling.
- Added restrictions on importing from features to enforce architectural boundaries.
- Enhanced test coverage for various components, including ConnectionLine and NodeOutputHandles.
- Updated architecture documentation to reflect recent changes in file structure and component organization.
* fix build error (missing import)
refactor(agentflow): remove unused components, fix connector anchor bug, and enhance test coverage
- Deleted unused Input and ConfirmDialog components to streamline the codebase.
- Updated jest.config.js to improve coverage thresholds and exclude deprecated hooks.
- Enhanced test coverage for useAgentflow and AgentflowContext with new E2E tests.
- Adjusted architecture documentation to reflect the removal of components and updated file structure.
* Fix duplicate and drag bug
* Fix position of duplicate ndoe to same as v2
* enhance duplicateNode functionality with unique ID generation and position adjustments similar to v2
* enhance deleteNode functionality to clean up connected inputs and remove descendants
* Revert changes to deleteNode
* Modify tests to have a nested structure rather than a flat one
* Fix polynomial regular expressions used on user controlled data
* Fix polynomial regular expressions used on user controlled data
* Fix polynomial regular expressions used on user controlled data
---------
Co-authored-by: christopherholland-workday <[email protected]>
* fix(analytics): capture token usage and model for Langfuse, LangSmith, and other providers
What changed
------------
- handler.ts: Extended onLLMEnd() to accept string | structured output. When
structured output is passed, we now extract content, usageMetadata (input/
output/total tokens), and responseMetadata (model name) and forward them
to all analytics providers. Added usage/model to Langfuse generation.end(),
LangSmith llm_output, and token attributes for Lunary, LangWatch, Arize,
Phoenix, and Opik. Call langfuse.flushAsync() after generation.end() so
updates are sent before the request completes.
- LLM.ts: Pass full output object from prepareOutputObject() to onLLMEnd
instead of finalResponse string, so usage and model are available.
- Agent.ts: Same as LLM.ts — pass output object to onLLMEnd.
- ConditionAgent.ts: Build analyticsOutput with content, usageMetadata, and
responseMetadata from the LLM response and pass to onLLMEnd.
- handler.test.ts: Added unit tests for the extraction logic (string vs
object, token field normalization, model name sources, missing fields).
OpenAIAssistant.ts call sites unchanged (Assistants API; no usage data).
Why
---
Fixes#5763. Analytics (Langfuse, LangSmith, etc.) were only receiving
plain text from onLLMEnd; usage_metadata and response_metadata from
AIMessage were dropped, so token counts and model names were missing in
dashboards and cost tracking.
Testing
-------
- pnpm build succeeds with no TypeScript errors.
- Manual: Flowise started, Agentflow with ChatOpenAI run; LangSmith and
Langfuse both show token usage and model on the LLM generation.
- Backward compatible: call sites that pass a string (e.g. OpenAIAssistant)
still work; onLLMEnd treats string as content-only.
Co-authored-by: Cursor <[email protected]>
* refactor(analytics): address PR review feedback for token usage handling
- LangSmith: Only include token_usage properties that have defined values
to avoid passing undefined to the API
- Extract common OpenTelemetry span logic into _endOtelSpan helper method
used by arize, phoenix, and opik providers
Co-authored-by: Cursor <[email protected]>
* fix(analytics): LangSmith cost tracking and flow name in traces
- LangSmith: set usage_metadata and ls_model_name/ls_provider on run extra.metadata
so LangSmith can compute costs from token counts (compatible with langsmith 0.1.6
which has no end(metadata) param). Infer ls_provider from model name.
- buildAgentflow: use chatflow.name as analytics trace/run name instead of
hardcoded 'Agentflow' so LangSmith and Langfuse show the Flowise flow name.
Co-authored-by: Cursor <[email protected]>
* update handlers to include model and provider for analytics
* fix: normalize provider names in analytics handler to include 'amazon_bedrock'
---------
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Henry <[email protected]>
* fix(agentflow): prevent ConditionAgent from silently dropping when no scenario matches
the ConditionAgent was doing strict exact string matching against
scenario descriptions, but LLMs often return abbreviated or slightly
different versions of the scenario text. when nothing matched, all
branches got marked as unfulfilled and the flow silently terminated
with no response.
added fallback matching (startsWith, includes) so partial matches
still route correctly, plus a last-resort else branch so the flow
never just dies silently. also added a safety net in the execution
engine to catch the case where all conditions are unfulfilled.
fixes#5620
* refactor: normalize output once and drop unnecessary any casts
- normalize calledOutputName once before all matching steps instead of
calling toLowerCase().trim() repeatedly
- remove explicit any types where inference handles it
* test(agentflow): cover ConditionAgent scenario matching fallbacks
* Update matchScenario.test.ts
* Update matchScenario.ts
---------
Co-authored-by: Henry Heng <[email protected]>
* fix(components): add missing regex handler to Condition node
The Condition agentflow node's Regex operation was not functional because
compareOperationFunctions was missing the regex handler.
Changes:
- Added regex handler with unescapeRegexPattern helper function
- Handles Flowise's escaping of regex metacharacters
- Gracefully returns false for invalid regex patterns
- Added 22 unit tests
Fixes#5650
* refactor: address code review feedback
- Move unescapeRegexPattern to module level for performance
- Restrict unescaping to only [, ], * (verified by UI testing)
- Use nodeClass from beforeEach in all tests for consistency
- Add else condition assertions for non-matching tests
- Add test for escaped asterisk
* Delete packages/components/nodes/agentflow/Condition/Condition.test.ts
* Update Condition.ts
---------
Co-authored-by: Henry Heng <[email protected]>
fix: improve 401 error message clarity for invalid API keys
The previous error message mentioned "local model configuration"
which could confuse users who don't use local models. The new message
clearly directs users to check their API key and model access.
FixesFlowiseAI/Flowise#5776
Fix#5704: interpolate {{ variables }} for HumanInput node in Agentflow v2
When the HumanInput node receives user input, its output only contained
`{ conditions: [...] }`. The resolveVariables function extracts
`nodeOutput?.content` for bare `{{ nodeId }}` references, which was
undefined, causing the template string to be returned unchanged.
Add a top-level `content` field (set to the user's feedback text or
action type) to the HumanInput node output so that `{{ humanInputAgentflow_0 }}`
correctly interpolates to the user's response.