-
Notifications
You must be signed in to change notification settings - Fork 113
feat: introduce the LLM-based workflow copilot #4020
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Xiao-zhen-Liu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few comments. Before I continue reviewing all the changes, I wonder if it is possible to make this into smaller PRs, e.g., you could introduce action plan in a separate PR.
frontend/src/app/workspace/service/workflow-graph/model/workflow-action.service.ts
Outdated
Show resolved
Hide resolved
|
This PR is too big! Let's discuss whether we can decompose it and how. |
|
@bobbai00 Please summarize the plan per our discussion. In the new PRs, include a architecture diagram and related screenshots. |
Xiao-zhen-Liu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works well. Left some comments mainly for improving clarity.
I also think we should have a configuration flag for this feature. It would be even better if admins can turn it on / off dynamically.
...pp/workspace/component/workflow-editor/context-menu/context-menu/context-menu.component.html
Outdated
Show resolved
Hide resolved
frontend/src/app/workspace/component/agent-panel/agent-chat/agent-chat.component.ts
Outdated
Show resolved
Hide resolved
frontend/src/app/workspace/component/agent-panel/agent-panel.component.ts
Outdated
Show resolved
Hide resolved
frontend/src/app/workspace/component/agent-panel/agent-panel.component.ts
Show resolved
Hide resolved
...d/src/app/workspace/component/agent-panel/agent-registration/agent-registration.component.ts
Outdated
Show resolved
Hide resolved
Xiao-zhen-Liu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general. Please fix the remaining minor issues, and add a flag to turn this feature on/off.
frontend/src/app/workspace/component/agent-panel/agent-chat/agent-chat.component.ts
Outdated
Show resolved
Hide resolved
...pp/workspace/component/workflow-editor/context-menu/context-menu/context-menu.component.html
Outdated
Show resolved
Hide resolved
aglinxinyuan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left mirror comments. There is quite a bit of room to improve code quality, but it doesn’t affect functionality.
frontend/src/app/workspace/component/agent-panel/agent-chat/agent-chat.component.scss
Outdated
Show resolved
Hide resolved
frontend/src/app/workspace/component/agent-panel/agent-chat/agent-chat.component.scss
Outdated
Show resolved
Hide resolved
frontend/src/app/workspace/component/agent-panel/agent-chat/agent-chat.component.scss
Outdated
Show resolved
Hide resolved
frontend/src/app/workspace/component/agent-panel/agent-chat/agent-chat.component.scss
Show resolved
Hide resolved
- Remove unused isStopping() method from agent-chat.component.ts - Revert accidental formatting changes in context-menu.component.html
Reverts the global user-select style from 'text' back to 'none' to restore proper drag-and-drop functionality for operators in the operator menu. The 'user-select: text' change was making operators selectable, which interfered with the drag-and-drop interaction.
Adds a new 'copilotEnabled' configuration flag that allows administrators to enable/disable the AI copilot feature. The feature is disabled by default and can be controlled via the GUI_WORKFLOW_WORKSPACE_COPILOT_ENABLED environment variable. Changes: - Add copilot-enabled flag to gui.conf (default: false) - Add parsing logic in GuiConfig.scala - Add flag to ConfigResource API response - Add copilotEnabled to frontend GuiConfig type - Add default value in mock config service - Conditionally render agent-panel based on flag in workspace This addresses the PR feedback requesting a configuration flag that admins can use to turn the feature on/off dynamically.
Please see this wiki page to learn how to enable this feature
What changes were proposed in this PR?
This PR introduces the LLM agent management & chat panel on the workflow workspace to help users with their workflows.
Demo
Manage agent using the panel

Ask agent questions regarding available Texera operators

Ask agent about users' current workflow
Architecture Diagram
See #4034
Major Changes
Frontend: introduce the agent management & chat panel
Backend:
litellmis introduced: which is a open source service that manages the communication between app and LLM APIsAccessControlServiceis modified: adding the logic for routinglitellmrelated requestsAny related issues, documentation, discussions?
Related to #4034
Current PR limitation and future PR plans
In current PR, the agent is only able to act in a "read-only" way, meaning it can only answer questions regarding operators, but couldn't change user's workflow.
In future PRs,
How was this PR tested?
Frontend unit test cases are added.
To test the PR e2e:
bin/litellm-config.yamlAccessControlServiceWas this PR authored or co-authored using generative AI tooling?
The code content is co-authored with Claude code. This PR is not generated by generative AI.