langflow-ai / langflow

Langflow is a low-code app builder for RAG and multi-agent AI applications. It’s Python-based and agnostic to any model, API, or database.
http://www.langflow.org
MIT License
34.19k stars 4.13k forks source link

Compatibility Issue: Tool-Calling Agent and Components with Build Tools and Predefined Argument Schemas #4640

Open edwinjosechittilappilly opened 2 hours ago

edwinjosechittilappilly commented 2 hours ago

Bug Description

When using components with predefined build tools and argument schemas as tools (e.g., SERP API or Retriever), errors are encountered. The components fail to integrate seamlessly with tool-calling agents.

When using components with predefined build tools and argument schemas as tools (e.g., SERP API or Retriever), errors are encountered. The components fail to integrate seamlessly with tool-calling agents.

Tell Us What You See!

Error Messages:

1.  SERP API Tool:

ToolException: Error in SerpAPI search: cannot access local variable 'wrapper' where it is not associated with a value

2.  Retriever as a Tool:

‘RetrieverToolComponent’ object has no attribute ‘set_event_manager’

Reproduction

Steps to Reproduce the Behavior:

1.  Attempt to use a component like SERP API or Retriever as a tool.
2.  Call the agent using these components.
3.  Observe the error output.

Expected behavior

The components should integrate and function normally with the tool-calling agent, creating the desired tools without errors.

Possible Edits

To resolve this issue: • Aggregate the component-as-tools functionality and ensure that build_tools logic aligns with the logic used for components as tools. • Ensure consistent compatibility between tool-calling agents and components with predefined schemas.

Who can help?

No response

Operating System

Mac OS

Langflow Version

1.1

Python Version

3.12

Screenshot

No response

Flow File

No response

edwinjosechittilappilly commented 2 hours ago

cc. @NadirJ @ogabrielluiz