mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 06:10:49 +08:00
v1.11.0.dev21
4 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
| f39416b806 |
fix: make IBM WatsonX models selectable and runnable in the Langflow Assistant (#13771)
* fix ibm models integration on assistant * update assistant docs * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> |
|||
| 685d12adab |
feat: mention canvas components in the assistant input (#13486)
* @-mention canvas components in the assistant input * fix suggestion width * add translation * 70% resizeble chat * add field search on assistant @ * update docs |
|||
| 2bfa634dfb |
feat: flow builder assistant with real-time canvas updates (#12575)
* add agentic api backend
* [autofix.ci] apply automated fixes
* add docs to feature
* ruff and test fixes
* ruff fixes
* fix lfx tests
* fix ruff style
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* refactor code improvements
* add rate limit to tests
* [autofix.ci] apply automated fixes
* new canvas control
* chat UI skeleton v0
* add empty state when doesnt have model provider
* add generating code statuses
* assist panel doc
* add stop button to cancel flow generation
* view code dialog
* add translation json flow and stop button on inputchat
* add floating state of the chat
* refacator frontend codes
* assistant docs.
* add execution from .py file
* update docs
* fix verbose error
* improve disabled placeholder
* unify placeholder messages
* start chat state closed
* add canvas behavior
* fix model selection and position chat
* dialog z100
* [autofix.ci] apply automated fixes
* docs update
* change crypto to uuid regular
* fix inexistent assistant
* chore: removed old unused implmentation
remoced old FF and all it's UI components
* add memory to flow..
* add prompt on agent
* [autofix.ci] apply automated fixes
* cherry-pick first commit
* cherry pick commit changes canvas
* code improvements
* fix session id null and close button
* add tests suite
* fix await error
* ruff style and checker
* feat: add pure flow-builder utilities to lfx
Add flow_builder subpackage with pure functions for manipulating
flow JSON dicts — component ops, edge creation with ReactFlow
handle format, topological layout, and dynamic field detection.
* feat: add MCP server for operating Langflow via REST API
FastMCP server exposing 15 tools across auth, flow, component,
connection, and execution groups. Agents can create flows, add
and configure components, wire connections, and run flows against
a Langflow server through MCP tool calls.
* feat: add langflow-mcp-client console script entry point
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* fix: use dict comprehension in setup.py to fix PERF403 lint
* fix: address PR review feedback on MCP client
- Add asyncio.Lock to prevent race condition in _client() under
concurrent access
- Handle 204 No Content responses in delete() instead of calling
resp.json() on empty body
- Fix weak assertion in test_default_values
* feat: auto-enable tool_mode when connecting component_as_tool
describe_component_type now shows component_as_tool as an output
for any component with tool_mode-capable outputs. When an agent
connects via component_as_tool, tool_mode is auto-enabled — no
extra step needed.
* refactor: move MCP server from langflow-base to lfx
The MCP server has no langflow dependencies — only httpx, mcp,
and lfx.graph.flow_builder. Moving it to lfx.mcp makes it usable
without installing langflow. Entry point: lfx-mcp.
* feat: improve MCP server UX for agents
- describe_component_type separates advanced fields from core ones
- search_component_types accepts output_type filter
- list_flows accepts query filter and includes ASCII graph repr
- get_flow_info includes ASCII graph repr
- add duplicate_flow tool
- add list_starter_projects tool
* feat: add use_starter_project tool and tests for new features
- use_starter_project creates a flow from a starter template by name
(starter projects aren't fetchable by ID via /flows/)
- Tests for duplicate_flow, starter projects, graph repr, advanced
fields, and output_type search
* docs: improve MCP tool descriptions for agent clarity
- Add server-level instructions with typical workflow guide
- Remove internal implementation details from tool descriptions
- Add cross-references between related tools
- Mention component_as_tool and graph diagrams where relevant
* docs: address subagent review feedback on tool descriptions
- Document return values for create_flow, add_component
- Clarify empty-query behavior for search_component_types
- Distinguish get_component_info (instance) vs describe_component_type (type)
- Explain connection type compatibility in instructions
- Clarify configure_component trigger field behavior
- State disconnect_components default when filters omitted
* feat: add batch tool for multi-action requests
Execute multiple actions in one call with $N.field references
to chain results. An agent can build a complete flow in a single
request instead of 6+ round trips.
* improvements UIUX
* change css canvas controls
* feat: add create_flow_from_spec tool for compact text-based flow creation
Accepts a compact text spec with nodes, edges (using real port names),
and config sections. Agents generate a simple string instead of
constructing nested JSON. Tool mode auto-enabled for component_as_tool.
Handles Prompt Template dynamic variables by parsing {var} from
template text and creating input fields. Cleans up flows on failure.
Type coercion for numeric/boolean config values.
* feat: add build_flow validation and create_flow_from_spec
build_flow validates flows by building the graph server-side.
create_flow_from_spec accepts a compact text spec with nodes,
edges, and config. Validates by default (optional).
Handles Prompt Template dynamic {variables}, auto-enables tool_mode
for component_as_tool, cleans up on failure, coerces config types.
* fix: isolate session state and harden MCP server
* pannel execution
* [autofix.ci] apply automated fixes
* fix: move test_flow_builder into tests/unit so CI collects coverage
* improve code gen
* [autofix.ci] apply automated fixes
* fix: address PR review feedback
- Fix test fixture to use contextvars instead of stale module attributes
- Raise ValueError on malformed spec lines instead of silently dropping
- Disambiguate duplicate component types in flow_graph_repr
- Narrow except Exception to ImportError in flow_graph_repr
- Add action-index context to batch error messages
- Fix stale/inaccurate docstrings (group count, "| ", field_name, category, build_flow)
- Mention create_flow_from_spec in MCP instructions
* feat: stream run_flow events via MCP progress notifications
run_flow now consumes Langflow's SSE stream and relays token events
to the MCP client via report_progress. Falls back to a regular POST
if the stream yields no result.
* test: add streaming integration tests for run_flow and stream_post
* chore: rebuild component index
* fix: Remove code execution from assistant validation path (#12244)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* [autofix.ci] apply automated fixes
* fix: handle Message dicts in str field param processing
param_handler's str case called unescape_string on each list element
without checking if the element was a string. On subsequent agent calls,
chat history stores Message dicts in the list, causing
'dict' object has no attribute 'replace'.
Added _coerce_str_value helper that extracts .text from Message/Data/dict
objects before unescaping. Includes 4 regression tests.
* feat: add flow builder tools and propose_field_edit with JSON Patch
- builder.py: builds flow dicts from text specs using local component registry
- flow_builder_tools.py: 9 Langflow components for agent tooling
- propose_field_edit generates validated JSON Patches with dry-run verification
- flow_to_spec_summary converts flow dicts to compact summaries with IDs
- Module-level event queue for real-time UI updates during streaming
* feat: flow builder assistant with intent routing
- flow_builder_assistant.py: Python-based agent flow with 9 tools
- model_config.py: shared model config extracted from translation_flow
- Intent classifier recognizes build_flow, edit, and inspect requests
- Updated LangflowAssistant.json prompt to mention flow building
- 18 tests including graph construction and intent classification
* feat: SSE event pipeline for flow building and editing
- New SSE events: flow_update, flow_preview, flow_action (edit_field)
- assistant_service drains tool events during streaming for real-time updates
- Current flow context injected into all agent requests from DB
- Event consumer forwards flow_preview events through the pipeline
- extract_flow_json for text-based flow detection (fallback path)
* feat: frontend flow preview, edit cards, and real-time canvas updates
- FlowAction type for edit_field proposals with JSON Patch
- FlowEditCarousel: paginated Accept/Dismiss cards for field edits
- AssistantFlowPreview: mini ReactFlow canvas for new flow previews
- SSE handler dispatches flow_update and flow_preview events
- Chat hook applies flow_update events to canvas via setNodes/setEdges
- edit_field events stored as flowActions on messages for user review
- Strips flow_json blocks from visible chat content
* chore: add lfx logger to MCP server, log streaming fallback
* fix: resolve merge issues and harden flow builder state management
- Restore build_flow intent in translation prompt and LangflowAssistant system prompt
- Remove duplicate TYPE_CHECKING block from assistant_service.py (merge artifact)
- Add build_flow to intent classification plaintext fallback
- Add reset_working_flow to streaming finally block (lifecycle leak)
- Replace module-level globals with contextvars for concurrency safety
in both components/tools and mcp flow_builder_tools
- Remove dead _save_working_flow (ThreadPoolExecutor in async antipattern)
- Handle remove_component and configure flow_update actions in frontend
- Log warning when flow JSON fallback triggers instead of tool events
- Add tests for build_flow/off_topic plaintext fallback and contextvar isolation
* feat: improve flow builder UX and consolidate tool implementations
- Add worked examples to flow builder prompt (new flow + edit flow)
- Add build_flow guardrail: returns error when canvas already has components
- Change ConfigureComponent to accept JSON params dict (batch updates)
- Remove duplicate flow_builder_tools.py from components/tools
(was breaking test_get_all); single source in lfx.mcp.flow_builder_tools
- Update prompt to explicitly guide build vs edit tool selection
* fix: set_flow replaces canvas instead of appending, Python 3.10 compat
set_flow was using paste() which appends nodes with new IDs, causing
duplicates. Now uses setNodes/setEdges to replace canvas contents.
Also fixes asyncio.Barrier usage (3.11+) in concurrency test and
makes ConfigureComponent accept params as dict or JSON string since
tool frameworks may pass either.
* fix: soften build_flow guardrail and harden intent fallback parser
build_flow no longer hard-blocks on non-empty canvas. Users can now
create new flows while an existing one is open -- the prompt already
guides the agent to prefer edit tools when components exist.
Intent classification fallback now uses a strict regex pattern matching
quoted JSON values ("intent": "build_flow") instead of bare substring
matching, preventing prompt-echo misroutes on weaker models.
* feat: lock canvas while assistant is processing
Syncs the assistant panel's isProcessing state to the
assistantManagerStore so the canvas locks (effectiveLocked) while the
assistant is building or modifying the flow, preventing the user from
dragging nodes during real-time updates.
* feat: flow builder assistant with real-time canvas updates
Add flow builder assistant that builds and modifies flows directly on
the user's canvas via agent tools. SSE event pipeline streams
flow_update and flow_preview events for real-time canvas rendering.
- Flow builder tools: search, describe, add, remove, connect, configure,
build_flow, propose_field_edit with JSON Patch
- Intent classification with build_flow routing
- Per-request state isolation via contextvars
- Strict regex fallback parser for intent classification
- Canvas lock while assistant is processing
- Frontend handles add, remove, connect, configure, set_flow actions
- Flow preview and edit card components
* fix connection llm mcp
* [autofix.ci] apply automated fixes
* add flow visualization on assistant
* add manage files to assistant
* [autofix.ci] apply automated fixes
* update documentation about file
* [autofix.ci] apply automated fixes (attempt 2/3)
* reasoning thinking v0
* flow builder improvement
* [autofix.ci] apply automated fixes
* add patch to canvas, improve cache and harness
* ruff style and checker fixes
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* fix tests
* fix jest tests
* UI ux improvements
* [autofix.ci] apply automated fixes
* ruff style and checker
* improve sec and harness
* ux warning banner tag assistant
* improve flow builder UI UX
* json updates
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* disable preview for many component
* fix message preview
* MCP and agent improvements
* ruff style and chceker
* fix ux display on generating artifacts
* guard rails and deterministic results improvements
* ruff style and checker
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* split flow_builder_tools, force per-user file isolation, add timeouts and guard rails
* ruff style and checker
* ruff style and checker
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes (attempt 2/3)
* add model alert
* add padding on warning text
* [autofix.ci] apply automated fixes
* fix frontend tests
* fix credentials detection
* refactor playwright tests: remove duplicate tests and add good practices
* add send playground rule
* fix import dotenv
* fix fe tests
* fix light mode
* fix run flow test
* fix tests failing
* fix folder deletion test
* fix e2e tests
* constant text on tests
* fix publish test
* fix publish tests
* [autofix.ci] apply automated fixes
* [autofix.ci] apply automated fixes
* test: standardize new-project-flow helper into utils/flow
Follow-up to the cz/playwright-tests-refactor merge — align the
new-project-flow helper our branch added with the refactor's directory
and constants conventions:
- Move tests/utils/new-project-flow.ts -> tests/utils/flow/, next to the
refactor's open-blank-flow / open-starter-project helpers; update the
15 import sites.
- Use TID / TIMEOUTS constants inside the helper instead of raw
test-id strings and literal 30000 timeouts, matching open-blank-flow.
- Drop an unused zoomOut import in auto-login-off.spec.ts.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* test: assert New Flow button by test-id, not substring text match
The merge resolution kept the refactor's `expect(...).toBeVisible()`
assertion but on `getByText("New Flow")`, which is a substring match —
it also matches flow cards named "New Flow (N)" and throws a strict-mode
violation once such flows exist. Our previous side used a no-op
`.isVisible()` that silently masked it.
Assert on `getByTestId(TID.newProjectBtn)` instead: unambiguous,
DB-state independent, and consistent with the refactor's test-id-first
convention. Verified — actionsMainPage-shard-1 (3/3) and run-flow now
pass against a populated database.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix windows utf open
* assistant message fixes
* [autofix.ci] apply automated fixes
* add tests to validate
* [autofix.ci] apply automated fixes
* bugfixes round 2
* ruff style and checker
* qa fixes
* parse serialized model
* improvement on agent tool usage
* [autofix.ci] apply automated fixes
* ruff style and checker
* [autofix.ci] apply automated fixes
* fix sidebar nav test
* backend tests fixes
* fix tests and change model provider to open dialog
* performance improvements
* [autofix.ci] apply automated fixes
* ruff style and checker fix
* tests fixes
* fix error handling test
* test user overlay
* fix test tool mixin
* last improvements
* ruff style fix
* [autofix.ci] apply automated fixes
* fix user test agentic
* QA fixes round 7
* fix assistant gpt 5.4
* [autofix.ci] apply automated fixes
---------
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Edwin Jose <edwin.jose@datastax.com>
Co-authored-by: Adam Aghili <Adam.Aghili@ibm.com>
Co-authored-by: Rodrigo Nader <rodrigonader@MacBook-Pro-de-Rodrigo.local>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
|||
| 61fac94139 |
feat: Add Langflow Assistant chat panel for component generation (#11636)
* add agentic api backend * [autofix.ci] apply automated fixes * add docs to feature * ruff and test fixes * ruff fixes * fix lfx tests * fix ruff style * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * refactor code improvements * add rate limit to tests * [autofix.ci] apply automated fixes * new canvas control * chat UI skeleton v0 * add empty state when doesnt have model provider * add generating code statuses * assist panel doc * add stop button to cancel flow generation * view code dialog * add translation json flow and stop button on inputchat * add floating state of the chat * refacator frontend codes * assistant docs. * add execution from .py file * update docs * fix verbose error * improve disabled placeholder * unify placeholder messages * start chat state closed * add canvas behavior * fix model selection and position chat * dialog z100 * [autofix.ci] apply automated fixes * docs update * change crypto to uuid regular * fix inexistent assistant * chore: removed old unused implmentation remoced old FF and all it's UI components * add memory to flow.. * add prompt on agent * [autofix.ci] apply automated fixes * cherry-pick first commit * cherry pick commit changes canvas * code improvements * fix session id null and close button * add tests suite * fix await error * ruff style and checker * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * improvements UIUX * change css canvas controls * pannel execution * [autofix.ci] apply automated fixes * improve code gen * [autofix.ci] apply automated fixes * fix: Remove code execution from assistant validation path (#12244) Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> * fixes UI * UI improvements * [autofix.ci] apply automated fixes * code improevements and tests * fix docker images npm versions * remove unused test * fix playwright tests on branch * [autofix.ci] apply automated fixes * fix ruff style and checker * fix jest test * add assistant e2e tests * move sticky notes and remove backfor controls * assistant pr review * [autofix.ci] apply automated fixes * update docs and input limit * [autofix.ci] apply automated fixes * remove unecessary doc * improve button * fix button floating on new session, fix tracing on component generation * fix padding equal to input * add basic session management on chat assistant * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * guardrails and prompt injection prevent * QA round - fix shortcut and model selection * fix ollama model not working * add models limitation error, fix watsonX integration and ollama * adjust code tab size * tabs session management * fix tabs overflow layout * [autofix.ci] apply automated fixes * ruff style and checker * [autofix.ci] apply automated fixes * remove tabs session * final UX improvements * add tooltip information and docs update * fix ruff style and checkrs * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * fix jest tests on assistant * [autofix.ci] apply automated fixes * fix tests e2e * fix assert on streaming messages * add overwrite files on fe artifacts * fix model metadata test * fix agent test retry test * fix assistant retry * fix agentic backend tests * fix providers tests * fix test fixture --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Edwin Jose <edwin.jose@datastax.com> Co-authored-by: Adam Aghili <Adam.Aghili@ibm.com> Co-authored-by: Rodrigo Nader <rodrigonader@MacBook-Pro-de-Rodrigo.local> |