-
Notifications
You must be signed in to change notification settings - Fork 8.3k
feat: Add Prompt generation Agentic Experience #11097
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
base: main
Are you sure you want to change the base?
Conversation
The run CLI command now accepts --env-var KEY=VALUE options to inject global variables into the graph context. Includes validation for variable format and unit tests to verify correct injection and error handling. Also improves script loading to register modules by script name for better inspection.
Updated environment variable loading logic to prioritize CLI-provided variables (request_variables in context) over OS environment variables for load_from_db fields. Added unit tests to verify correct precedence and fallback behavior.
…ngflow-ai/langflow into feat-variable-passthrough-lfx
Refactors the run CLI command to delegate execution logic to a new lfx.run.base module, improving separation of concerns and maintainability. Moves core run logic and error handling into lfx.run.base, introduces a RunError exception, and updates tests to target the new structure. Removes the --env-var option from the CLI and migrates related tests to the run module.
Co-authored-by: Gabriel Luiz Freitas Almeida <[email protected]>
Co-authored-by: Gabriel Luiz Freitas Almeida <[email protected]>
|
@coderabbitai create a PR summary and descriptions and changes |
|
Tip For best results, initiate chat on the files or code changes. @edwinjosechittilappilly, here's a comprehensive PR summary and description: PR SummaryTitle: feat: Add Prompt generation Agentic Experience This PR introduces a complete agentic experience infrastructure to Langflow, enabling AI-powered prompt generation and intelligent component suggestions through new API endpoints, flows, and UI components. 🎯 OverviewThis PR adds an end-to-end agentic system that:
🔑 Key Features1. Agentic API Layer
2. Frontend Assistant UI
3. Configuration & Variables
4. Prompt Generation Flow
📁 Changes by CategoryBackend API (
|
testing to see if test failures are caused by importing router_v1 or our new router is casuing the issue
This pull request introduces a new Agentic API to the backend and improves the management and initialization of agentic variables. It also enables the agentic experience by default and adds supporting constants and test scripts. The most important changes are grouped below.
Agentic API Integration:
/promptand/next_component, which execute flows using user-specific variables and OpenAI credentials (src/backend/base/langflow/agentic/api/router.py).__init__.pyfor easier imports (src/backend/base/langflow/agentic/api/__init__.py)./v2prefix (src/backend/base/langflow/api/router.py). [1] [2]Agentic Variable Management:
CREDENTIAL_TYPE(src/backend/base/langflow/api/utils/mcp/agentic_mcp.py).DEFAULT_AGENTIC_VARIABLE_VALUE) to the settings constants (src/lfx/src/lfx/services/settings/constants.py).Configuration and Defaults:
src/lfx/src/lfx/services/settings/base.py).Testing and Utilities:
src/backend/base/langflow/agentic/api/test.py).Dependency and Import Cleanups:
pydanticand related dependencies for clarity and correctness in several files (src/lfx/src/lfx/custom/custom_component/custom_component.py,src/lfx/src/lfx/services/settings/base.py). [1] [2] [3] [4]These changes collectively add agentic capabilities to the API, streamline agentic variable handling, and ensure the agentic server is enabled by default.
Summary by CodeRabbit
Release Notes
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.