Skip to content

feat: agentics IBM bundle#11490

Merged
Cristhianzl merged 88 commits into
langflow-ai:mainfrom
gliozzo:feature/agentics_bundle_2
Feb 27, 2026
Merged

feat: agentics IBM bundle#11490
Cristhianzl merged 88 commits into
langflow-ai:mainfrom
gliozzo:feature/agentics_bundle_2

Conversation

@gliozzo
Copy link
Copy Markdown
Contributor

@gliozzo gliozzo commented Jan 29, 2026

This PR updates the custom Agentics component to ensure it works correctly with Langflow env

The contributed component is here src/lfx/src/lfx/components/agentics/agentics.py
The icon is here src/frontend/src/icons/Agentics

ISSUES: agentics-py is not installed and has dependency conflicts. Need to install it before running langflow (after make init is done): uv pip install agentics-py

TODO:

  • Safe imports: try/except blocks need to be added for agentics and crewai to prevent build-time errors due to missing packages or version conflicts.
  • UI integration: Component doens't properly displays in Langflow altought icon is located at src/frontend/src/icons/Agentics.

Summary by CodeRabbit

  • New Features
    • Added Agentics icon component to the UI.
    • Introduced Agentics integration enabling language-model-driven data transformations with support for IBM WatsonX, Google Generative AI, and OpenAI providers. Users can now configure schema-based transformations with optional metadata enrichment and flexible generation modes.

✏️ Tip: You can customize this high-level summary in your review settings.

@github-actions github-actions Bot added the community Pull Request from an external contributor label Jan 29, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 29, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Introduces a new Agentics component for language-model-driven DataFrame transformation alongside a corresponding React SVG icon. The backend component integrates multiple LLM providers (IBM WatsonX, Google Generative AI, OpenAI), manages schema validation, and implements metadata enrichment workflows.

Changes

Cohort / File(s) Summary
Frontend Icon Component
src/frontend/src/icons/Agentics/Agentics.jsx, src/frontend/src/icons/Agentics/index.tsx
New SVG icon SvgAgentQL with linear and radial gradient fills; wrapped by AgentQLIcon component with ref forwarding for SVG element access.
Backend Agentics Integration
src/lfx/src/lfx/components/agentics/agentics.py, src/lfx/src/lfx/components/agentics/__init__.py
New AgenticsComponent class implementing async DataFrame transformation with provider-specific LLM client initialization (WatsonX, Google, OpenAI), model resolution, schema construction, metadata enrichment, and TOML row formatting; exported via package __init__.py.

Sequence Diagram

sequenceDiagram
    actor User
    participant AgenticsComponent
    participant ModelResolver
    participant ProviderConfig
    participant LLMClient
    participant DataFrame as AG/DataFrame
    
    User->>AgenticsComponent: transduce()
    AgenticsComponent->>ModelResolver: resolve model class from metadata
    ModelResolver-->>AgenticsComponent: model class
    AgenticsComponent->>ProviderConfig: fetch API key for provider
    ProviderConfig-->>AgenticsComponent: API key (or error)
    AgenticsComponent->>LLMClient: initialize (WatsonX/Google/OpenAI)
    LLMClient-->>AgenticsComponent: ready
    AgenticsComponent->>DataFrame: convert to AG typed object
    DataFrame-->>AgenticsComponent: typed source
    AgenticsComponent->>LLMClient: transform with schema
    LLMClient->>DataFrame: apply model transformation
    DataFrame-->>LLMClient: results
    AgenticsComponent->>AgenticsComponent: enrich metadata (if enabled)
    AgenticsComponent-->>User: list of dictionaries
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 3
❌ Failed checks (1 error, 2 warnings)
Check name Status Explanation Resolution
Test Coverage For New Implementations ❌ Error The PR adds 261 lines of code for AgenticsComponent and new React components but includes no test files for either implementation. Add test_agentics.py for Python component and Agentics.test.tsx for React components with comprehensive coverage of core functionality and error cases.
Test Quality And Coverage ⚠️ Warning Pull request adds 322 lines of complex async component code with multiple LLM provider integrations but includes zero test files despite established project testing patterns and multiple code quality issues identified in review. Add comprehensive pytest tests for AgenticsComponent including async transduce() method, provider initialization paths, error handling, and DataFrame transformations; add frontend component tests following project patterns.
Test File Naming And Structure ⚠️ Warning Pull request introduces backend Python and frontend React components without accompanying test files, violating repository testing requirements. Create test_agentics.py for backend and Agentics.test.tsx for frontend following repository patterns and test async operations, error handling, and provider logic.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Excessive Mock Usage Warning ✅ Passed This check is not applicable to the provided pull request. The PR introduces new functionality but does not include any test files, so there is no mock usage to assess.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: introducing a new Agentics component bundle with IBM integration. It directly corresponds to the new AgenticsComponent class, icon files, and related infrastructure added across frontend and backend.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

🤖 Fix all issues with AI agents
In `@src/frontend/src/icons/Agentics/index.tsx`:
- Line 3: The import path is incorrect: replace the broken import of SvgAgentQL
from "./AgentQL" with the actual module filename (Agentics.jsx) used in the
codebase so the default export referenced as SvgAgentQL is resolved; update the
import statement in src/frontend/src/icons/Agentics/index.tsx to import the
default export from "Agentics.jsx" (the module that defines the SVG component)
so SvgAgentQL points to the correct component.
- Around line 5-10: The export/import names in the Agentics icon module are
inconsistent: change the component and import references from AgentQLIcon and
SvgAgentQL to AgenticsIcon and SvgAgentics (matching the SVG file Agentics.jsx
and the backend icon name "Agentics"), update the default/exported symbol to
AgenticsIcon in src/frontend/src/icons/Agentics/index.tsx, and then register the
icon in src/frontend/src/icons/lazyIconImports.ts by adding an entry for
"Agentics" that lazy-imports the module and returns the AgenticsIcon as the
default export.

In `@src/lfx/src/lfx/components/agentics/agentics.py`:
- Line 34: The description string in agentics.py currently has a typo: change
the value of the variable named description (in the agentics module) from
"Enables Map Reduce Style Agentic data transformations amongs dataframes" to use
the correct word "among" so it reads "Enables Map Reduce Style Agentic data
transformations among dataframes".
- Around line 193-194: The code accesses self.model[0] in the agentics component
which will raise IndexError if self.model is empty; modify the logic around the
assignment to validate that self.model is a non-empty list (or iterable) before
reading index 0 (e.g., check if self.model and len(self.model) > 0 or handle
None), and if it's empty handle the error path — for example set a safe default,
raise a clear ValueError, or log and return — updating all use-sites that expect
model_selection to handle the chosen fallback; refer to the symbol
model_selection and the attribute self.model to locate where to add this
validation and error handling.
- Around line 6-9: Wrap the top-level imports for agentics and crewai in
try/except blocks so AG and LLM are set to None on ImportError (and leave
create_pydantic_model and generate_prototypical_instances similarly guarded or
imported from AG when available), and add a runtime guard at the start of the
transduce() method that checks if AG is None or LLM is None and raises an
informative ImportError instructing how to install the missing packages;
reference the AG and LLM symbols for the imports and the transduce() method to
locate where to add the checks.
- Around line 231-232: The else branch currently returns the string "Please fix
model paramters" despite the method being declared to return a DataFrame;
replace that return with raising a descriptive exception (e.g., ValueError) and
correct the typo to "parameters" so callers receive an error instead of an
unexpected string; update the branch in the containing function (the method with
the -> DataFrame annotation that returns "Please fix model paramters") to raise
ValueError("Please fix model parameters") or a similarly appropriate exception.
🧹 Nitpick comments (3)
src/frontend/src/icons/Agentics/Agentics.jsx (1)

1-48: Missing dark mode support via isDark prop.

As per coding guidelines, SVG icon components should use the isDark prop to switch between light and dark color schemes. While this gradient-based icon may render acceptably in both modes, the component should still accept the isDark prop for consistency with other icons in the codebase.

Additionally, there's a naming inconsistency: the component is named SvgAgentQL but the directory and backend component use Agentics (icon = "Agentics"). Consider renaming to SvgAgentics for consistency.

♻️ Proposed fix to add isDark prop support and fix naming
-const SvgAgentQL = (props) => (
+const SvgAgentics = (props) => (
   <svg
     width="512"
     height="512"
...
 );
-export default SvgAgentQL;
+export default SvgAgentics;
src/lfx/src/lfx/components/agentics/agentics.py (2)

159-186: Unused helper methods reference undefined attributes.

_create_base_row and _add_metadata reference self.output_column_name and self.enable_metadata, but these are not defined in the component's inputs. These methods appear to be unused in transduce().

Consider removing these dead code methods, or if they're planned for future use, define the corresponding inputs:

StrInput(name="output_column_name", display_name="Output Column Name", value="output", advanced=True),
BoolInput(name="enable_metadata", display_name="Enable Metadata", value=False, advanced=True),

205-206: Move import to top of file.

The import of get_api_key_for_provider is already available at the module level (line 11-15). This local import is redundant.

♻️ Proposed fix
-        # Get API key from global variables
-        from lfx.base.models.unified_models import get_api_key_for_provider
-
         api_key = get_api_key_for_provider(self.user_id, provider, self.api_key)

And add to the existing import at line 11:

 from lfx.base.models.unified_models import (
+    get_api_key_for_provider,
     get_language_model_options,
     get_model_classes,
     update_model_options_in_build_config,
 )

Comment thread src/frontend/src/icons/Agentics/index.tsx Outdated
Comment thread src/frontend/src/icons/Agentics/index.tsx Outdated
Comment thread src/lfx/src/lfx/components/agentics/agentics.py Outdated
Comment thread src/lfx/src/lfx/components/agentics/agentics.py Outdated
Comment thread src/lfx/src/lfx/components/agentics/agentics.py Outdated
Comment thread src/lfx/src/lfx/components/agentics/agentics.py Outdated
@Cristhianzl Cristhianzl changed the title Feature/agentics bundle 2 feat: agentics IBM bundle Feb 2, 2026
@github-actions github-actions Bot added the enhancement New feature or request label Feb 2, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 2, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 3, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 3, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 3, 2026
@github-actions github-actions Bot added enhancement New feature or request and removed enhancement New feature or request labels Feb 3, 2026
@mendonk
Copy link
Copy Markdown
Collaborator

mendonk commented Feb 26, 2026

@gliozzo I pushed an update to the docs to make them more readable. Your examples and information are still there. I am approving for docs.

Copy link
Copy Markdown
Collaborator

@mendonk mendonk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving for docs

mendonk and others added 27 commits February 26, 2026 14:25
…m/gliozzo/langflow into feature/agentics_bundle_2"

This reverts commit f048f03, reversing
changes made to 7e99bc8.
…ndex conflict by rebuilding

Made-with: Cursor
…ndex conflict by rebuilding

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Pull Request from an external contributor enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants