Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
330d15e
Agentics Bundle V1
Jan 29, 2026
42412f1
Agentics Bundle V1
Jan 29, 2026
994906b
add icon and improve component code
Cristhianzl Jan 30, 2026
a51b11f
[autofix.ci] apply automated fixes
autofix-ci[bot] Jan 30, 2026
0d1bde4
[autofix.ci] apply automated fixes (attempt 2/3)
autofix-ci[bot] Jan 30, 2026
7e89d87
Merge branch 'main' into feature/agentics_bundle_2
Cristhianzl Feb 2, 2026
b60e9d0
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 2, 2026
ca3f2ed
adjust the agentics icons
Cristhianzl Feb 2, 2026
a3c4e6f
Merge branch 'feature/agentics_bundle_2' of https://github.com/gliozz…
Cristhianzl Feb 2, 2026
62f5561
Semantic Operators
Feb 2, 2026
a9a3dad
code improvements
Cristhianzl Feb 3, 2026
ea81e61
merge fix
Cristhianzl Feb 3, 2026
da6faf4
add icon
Cristhianzl Feb 3, 2026
5387b34
ruff style
Cristhianzl Feb 3, 2026
94f342c
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 3, 2026
2573486
add tests to agentincs bundle
Cristhianzl Feb 3, 2026
2175a85
Merge branch 'feature/agentics_bundle_2' of https://github.com/gliozz…
Cristhianzl Feb 3, 2026
3c5420d
Implemented Semantic Operators, added documentation, improved existin…
Feb 4, 2026
cbf1bc0
add tests and improve code quality
Cristhianzl Feb 5, 2026
eb14e83
a review of agentics bundle documentation
junkyul Feb 10, 2026
ef7ac21
docs-cleanup-pages
mendonk Feb 11, 2026
dbb83b7
guidance-comments
mendonk Feb 11, 2026
37122bf
Improved bundle documentation for agentics
Feb 12, 2026
92673a9
Syntetic generator bug fix, order of agentics in the bundle
Feb 13, 2026
8410e01
Fixed freezing problem
Feb 14, 2026
66cdea5
List of user defined types allowed in semantic map and semantic aggre…
Feb 15, 2026
51b3d57
Aggregated list on semantic map
Feb 15, 2026
24344f7
modify name and description of the components in a user friendly way
junkyul Feb 17, 2026
57f048e
Revert JSON to version in main
Feb 17, 2026
72ded05
Fix version of agentics-py
Feb 17, 2026
101703f
bring back agentics components in the asset index
junkyul Feb 18, 2026
a9dc5db
display names for input and output are unfied as DataFrame; previousl…
junkyul Feb 18, 2026
28c78fb
update bundle documentation. The display names are updated
junkyul Feb 18, 2026
a3dbeb8
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 18, 2026
d29ba42
[autofix.ci] apply automated fixes (attempt 2/3)
autofix-ci[bot] Feb 18, 2026
6bae089
Luca's QA feedback addressed
Feb 19, 2026
be27c6f
Removed semantic operator names and used aMap, aReduce and aGenerate
Feb 20, 2026
2f27efa
remove one line mentioning aFilter, which is removed
junkyul Feb 20, 2026
6fa860e
removes blank component component
deon-sanchez Feb 24, 2026
3e6e0d9
updates templates
deon-sanchez Feb 24, 2026
6008a83
Merge origin/main into feature/agentics_bundle_2, resolve conflicts i…
HimavarshaVS Feb 24, 2026
ff4f5bc
Merge remote-tracking branch 'origin' into feature/agentics_bundle_2
HimavarshaVS Feb 25, 2026
e06af76
fix tests
HimavarshaVS Feb 25, 2026
da9cdac
fix tests
HimavarshaVS Feb 25, 2026
8edff85
fix: remove tests for deleted agentics components, update tests for r…
HimavarshaVS Feb 25, 2026
742623e
fix ruff errors
HimavarshaVS Feb 25, 2026
70d271c
Merge branch 'main' into feature/agentics_bundle_2
HimavarshaVS Feb 25, 2026
6d20f59
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 25, 2026
3549153
Merge remote-tracking branch 'origin' into feature/agentics_bundle_2
HimavarshaVS Feb 26, 2026
1c9a82e
Merge branch 'feature/agentics_bundle_2' of https://github.com/langfl…
HimavarshaVS Feb 26, 2026
964ae14
Merge branch 'feature/agentics_bundle_2' of https://github.com/gliozz…
HimavarshaVS Feb 26, 2026
446b53c
fix: add safe imports to Agentics components with clear error when ag…
HimavarshaVS Feb 26, 2026
7ba9eee
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 26, 2026
8b42de8
[autofix.ci] apply automated fixes (attempt 2/3)
autofix-ci[bot] Feb 26, 2026
1af635f
fix: add try/except in agentics tests to skip when agentics-py/crewai…
HimavarshaVS Feb 26, 2026
9e9232e
Merge branch 'feature/agentics_bundle_2' of https://github.com/gliozz…
HimavarshaVS Feb 26, 2026
80f7cca
fix: add agentics and crewai to optional deps skip list in test_all_m…
HimavarshaVS Feb 26, 2026
140f29e
chore: update component_index.json
HimavarshaVS Feb 26, 2026
aa89f0a
Merge origin/main into feature/agentics_bundle_2, resolve component_i…
HimavarshaVS Feb 26, 2026
7e99bc8
docs-cleanup
mendonk Feb 26, 2026
f048f03
Merge branch 'feature/agentics_bundle_2' of https://github.com/gliozz…
mendonk Feb 26, 2026
e27f15b
Revert "Merge branch 'feature/agentics_bundle_2' of https://github.co…
mendonk Feb 26, 2026
3251156
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 26, 2026
75cbfdf
[autofix.ci] apply automated fixes (attempt 2/3)
autofix-ci[bot] Feb 26, 2026
dd7e0b0
fix: add agentics-py to optional deps skip list in test_all_modules_i…
HimavarshaVS Feb 26, 2026
4807902
Merge origin/main into feature/agentics_bundle_2, resolve component_i…
HimavarshaVS Feb 26, 2026
4de42d5
Update component_index.json for agentics bundle
HimavarshaVS Feb 26, 2026
02c958d
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 26, 2026
ad0dd5a
Merge origin/main into feature/agentics_bundle_2, resolve component_i…
HimavarshaVS Feb 26, 2026
437cf84
Merge branch 'main' into feature/agentics_bundle_2
HimavarshaVS Feb 27, 2026
37f8d6c
Merge branch 'main' into feature/agentics_bundle_2
HimavarshaVS Feb 27, 2026
8c73d35
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 27, 2026
dfadec5
Merge remote-tracking branch 'origin' into feature/agentics_bundle_2
HimavarshaVS Feb 27, 2026
808a1a0
Merge branch 'main' into feature/agentics_bundle_2
Cristhianzl Feb 27, 2026
30caee3
merge fix
Cristhianzl Feb 27, 2026
84ddd76
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 27, 2026
a30d4db
Merge branch 'main' into feature/agentics_bundle_2
HimavarshaVS Feb 27, 2026
e204bff
Merge branch 'main' into feature/agentics_bundle_2
HimavarshaVS Feb 27, 2026
1f6603a
Merge branch 'main' into feature/agentics_bundle_2
HimavarshaVS Feb 27, 2026
c9e086d
fix: enhance file upload tests with multiple text inputs and improved…
viktoravelino Feb 27, 2026
1c7a215
Merge remote-tracking branch 'origin/main' into feature/agentics_bund…
HimavarshaVS Feb 27, 2026
5c41883
update component index
HimavarshaVS Feb 27, 2026
a9a76db
Merge branch 'main' into feature/agentics_bundle_2
HimavarshaVS Feb 27, 2026
a6f59d1
[autofix.ci] apply automated fixes
autofix-ci[bot] Feb 27, 2026
87f9014
Merge branch 'feature/agentics_bundle_2' of https://github.com/langfl…
HimavarshaVS Feb 27, 2026
0a796fc
Merge branch 'feature/agentics_bundle_2' of https://github.com/gliozz…
HimavarshaVS Feb 27, 2026
29cc0c5
update component index
HimavarshaVS Feb 27, 2026
072c3c8
Merge remote-tracking branch 'origin/main' into feature/agentics_bund…
HimavarshaVS Feb 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions src/frontend/src/icons/Agentics/Agentics.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
const SvgAgentQL = (props) => (
<svg
width="512"
height="512"
viewBox="0 0 512 512"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M302.444 370.307L345.993 413.721C349.037 416.757 353.974 416.757 357.018 413.721L509.717 261.495C512.762 258.46 512.762 253.539 509.717 250.503L357.018 98.2764C353.974 95.2413 349.037 95.2411 345.993 98.2764L302.444 141.691C299.4 144.726 299.4 149.647 302.444 152.683L400.568 250.503C403.612 253.539 403.612 258.46 400.568 261.495L302.444 359.316C299.4 362.351 299.4 367.272 302.444 370.307ZM209.557 152.684C212.602 149.649 212.602 144.728 209.557 141.692L166.008 98.2779C162.963 95.2426 158.028 95.2426 154.983 98.2779L2.28423 250.504C-0.760459 253.539 -0.760459 258.46 2.28423 261.497L154.983 413.723C158.028 416.759 162.963 416.759 166.008 413.723L209.557 370.309C212.602 367.274 212.602 362.352 209.557 359.318L111.434 261.497C108.389 258.46 108.389 253.539 111.434 250.504L209.557 152.684Z"
fill="url(#paint0_linear_78_78)"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M302.444 370.307L345.993 413.721C349.037 416.757 353.974 416.757 357.018 413.721L509.717 261.495C512.762 258.46 512.762 253.539 509.717 250.503L357.018 98.2764C353.974 95.2413 349.037 95.2411 345.993 98.2764L302.444 141.691C299.4 144.726 299.4 149.647 302.444 152.683L400.568 250.503C403.612 253.539 403.612 258.46 400.568 261.495L302.444 359.316C299.4 362.351 299.4 367.272 302.444 370.307ZM209.557 152.684C212.602 149.649 212.602 144.728 209.557 141.692L166.008 98.2779C162.963 95.2426 158.028 95.2426 154.983 98.2779L2.28423 250.504C-0.760459 253.539 -0.760459 258.46 2.28423 261.497L154.983 413.723C158.028 416.759 162.963 416.759 166.008 413.723L209.557 370.309C212.602 367.274 212.602 362.352 209.557 359.318L111.434 261.497C108.389 258.46 108.389 253.539 111.434 250.504L209.557 152.684Z"
fill="url(#paint1_radial_78_78)"
/>
<defs>
<linearGradient
id="paint0_linear_78_78"
x1="547.556"
y1="28.4446"
x2="139.854"
y2="436.149"
gradientUnits="userSpaceOnUse"
>
<stop offset="0.341457" stopColor="#4B52F6" />
<stop offset="1" stopColor="#37B6B6" />
</linearGradient>
<radialGradient
id="paint1_radial_78_78"
cx="0"
cy="0"
r="1"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(239.5 131) rotate(89.3969) scale(285.016 300.945)"
>
<stop offset="0.642769" stopColor="#0B30B2" />
<stop offset="0.705" stopColor="#0B30B2" stopOpacity="0" />
</radialGradient>
</defs>
</svg>
);
export default SvgAgentQL;
24 changes: 24 additions & 0 deletions src/frontend/src/icons/Agentics/agentics.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/frontend/src/icons/Agentics/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type React from "react";
import { forwardRef } from "react";
import SvgAgentQL from "./AgentQL";
Comment thread
Cristhianzl marked this conversation as resolved.
Outdated

export const AgentQLIcon = forwardRef<
SVGSVGElement,
React.PropsWithChildren<{}>
>((props, ref) => {
return <SvgAgentQL ref={ref} {...props} />;
});
Comment thread
Cristhianzl marked this conversation as resolved.
Outdated
3 changes: 3 additions & 0 deletions src/lfx/src/lfx/components/agentics/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .agentics import AgenticsComponent

__all__ = ["AgenticsComponent"]
261 changes: 261 additions & 0 deletions src/lfx/src/lfx/components/agentics/agentics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,261 @@
from __future__ import annotations

from typing import Any

import toml # type: ignore[import-untyped]
from agentics import AG
from agentics.core.atype import create_pydantic_model
from agentics.core.transducible_functions import generate_prototypical_instances
from crewai import LLM
Comment thread
Cristhianzl marked this conversation as resolved.
Outdated

from lfx.base.models.unified_models import (
get_language_model_options,
get_model_classes,
update_model_options_in_build_config,
)
from lfx.custom.custom_component.component import Component
from lfx.io import (
BoolInput,
DataFrameInput,
DropdownInput,
IntInput,
MessageTextInput,
ModelInput,
Output,
SecretStrInput,
TableInput,
)
from lfx.schema.dataframe import DataFrame
from lfx.schema.table import EditMode


class AgenticsComponent(Component):
display_name = "Agentics"
description = "Enables Map Reduce Style Agentic data transformations amongs dataframes"
Comment thread
Cristhianzl marked this conversation as resolved.
Outdated
documentation: str = "github.com/IBM/agentics/"
icon = "Agentics"

inputs = [
ModelInput(
name="model",
display_name="Language Model",
info="Select your model provider",
real_time_refresh=True,
required=True,
),
SecretStrInput(
name="api_key",
display_name="API Key",
info="Model Provider API key",
real_time_refresh=True,
advanced=True,
),
SecretStrInput(
name="project_id",
display_name="Project ID",
info="Required Only for WatsonX",
real_time_refresh=True,
advanced=True,
),
DataFrameInput(
name="source",
display_name="Source DataFrame",
info="Accepts JSON (list of dicts) or DataFrame.",
),
DropdownInput(
name="transduction_type",
display_name="transduction_type",
options=["amap", "areduce", "generate"],
value="amap",
required=True,
),
MessageTextInput(
name="atype_name",
display_name="Generated Type",
info="Provide a name for the generated target type",
value="",
required=True,
# advanced=True,
),
TableInput(
name="schema",
display_name="Generated Fields",
info="Define the structure and data types for the model's output.",
required=True,
# TODO: remove deault value
table_schema=[
{
"name": "name",
"display_name": "Name",
"type": "str",
"description": "Specify the name of the output field.",
"default": "text",
"edit_mode": EditMode.INLINE,
},
{
"name": "description",
"display_name": "Description",
"type": "str",
"description": "Describe the purpose of the output field.",
"default": "",
"edit_mode": EditMode.POPOVER,
},
{
"name": "type",
"display_name": "Type",
"type": "str",
"edit_mode": EditMode.INLINE,
"description": ("Indicate the data type of the output field (e.g., str, int, float, bool, dict)."),
"options": ["str", "int", "float", "bool", "dict"],
"default": "str",
},
{
"name": "multiple",
"display_name": "As List",
"type": "boolean",
"description": "Set to True if this output field should be a list of the specified type.",
"default": False,
"edit_mode": EditMode.INLINE,
},
],
value=[
{
"name": "text",
"description": "",
"type": "str",
"multiple": False,
}
],
),
MessageTextInput(
name="instructions",
display_name="instructions",
value="",
),
BoolInput(name="merge_source", display_name="merge_source_states", value=True, advanced=True),
IntInput(name="batch_size", display_name="Batch Size", value=10, advanced=True),
]

outputs = [
Output(name="states", display_name="Target DataFrame", method="transduce", tool_mode=True),
]

def update_build_config(self, build_config: dict, field_value: str, field_name: str | None = None):
"""Dynamically update build config with user-filtered model options."""
return update_model_options_in_build_config(
component=self,
build_config=build_config,
cache_key_prefix="language_model_options",
get_options_func=get_language_model_options,
field_name=field_name,
field_value=field_value,
)

def _format_row_as_toml(self, row: dict[str, Any]) -> str:
"""Convert a dictionary (row) into a TOML-formatted string."""
formatted_dict = {str(col): {"value": str(val)} for col, val in row.items()}
return toml.dumps(formatted_dict)

def _create_base_row(
self, original_row: dict[str, Any], model_response: str = "", batch_index: int = -1
) -> dict[str, Any]:
"""Create a base row with original columns and additional metadata."""
row = original_row.copy()
row[self.output_column_name] = model_response
row["batch_index"] = batch_index
return row

def _add_metadata(
self, row: dict[str, Any], *, success: bool = True, system_msg: str = "", error: str | None = None
) -> None:
"""Add metadata to a row if enabled."""
if not self.enable_metadata:
return

if success:
row["metadata"] = {
"has_system_message": bool(system_msg),
"input_length": len(row.get("text_input", "")),
"response_length": len(row[self.output_column_name]),
"processing_status": "success",
}
else:
row["metadata"] = {
"error": error,
"processing_status": "failed",
}

async def transduce(self) -> DataFrame:
"""Process each row in df[column_name] with the language model asynchronously."""
# Check if model is already an instance (for testing) or needs to be instantiated
llm = None

# Extract model configuration
model_selection = self.model[0]
Comment thread
Cristhianzl marked this conversation as resolved.
Outdated
model_name = model_selection.get("name")
provider = model_selection.get("provider")
metadata = model_selection.get("metadata", {})

# Get model class and parameters from metadata
model_class = get_model_classes().get(metadata.get("model_class"))
if model_class is None:
msg = f"No model class defined for {model_name}"
raise ValueError(msg)

# 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)

if not api_key and provider != "Ollama":
msg = f"{provider} API key is required. Please configure it globally."
raise ValueError(msg)

if provider == "IBM WatsonX":
llm = LLM(
model="watsonx/" + model_name,
base_url="https://us-south.ml.cloud.ibm.com",
project_id=self.project_id,
api_key=api_key,
temperature=0,
max_tokens=4000,
max_input_tokens=100000,
)

elif provider == "Google Generative AI":
llm = LLM(model="gemini/" + model_name, api_key=api_key)

elif provider == "OpenAI":
llm = LLM(model="openai/" + model_name, api_key=api_key)

else:
return "Please fix model paramters"
Comment thread
Cristhianzl marked this conversation as resolved.
Outdated

source = AG.from_dataframe(DataFrame(self.source))
schema_fields = [
(
field["name"],
field["description"],
field["type"] if not field["multiple"] else f"list[{field['type']}]",
False,
)
for field in self.schema
]
atype = create_pydantic_model(schema_fields, name=self.atype_name)
if self.transduction_type == "generate":
output_states = await generate_prototypical_instances(atype, n_instances=self.batch_size, llm=llm)
output = AG(states=output_states)
else:
target = AG(
atype=atype,
instructions=self.instructions,
transduction_type=self.transduction_type,
amap_batch_size=self.batch_size,
llm=llm,
)
output = await (target << source)
if self.merge_source and self.transduction_type == "amap":
output = source.merge_states(output)

df = output.to_dataframe()
return df.to_dict(orient="records")
Loading