Skip to content

Conversation

@bidyapati-p
Copy link
Collaborator

@bidyapati-p bidyapati-p commented Sep 9, 2025

Summary

LangChain tools support with wrapper class

Explain the features implemented:

- Import the tools and use it in the agent node

How to Test the feature

Steps for reviewers to verify functionality(example to import PlayWright tool):

  1. Add the class (also install relevant libraries)
from langchain_community.agent_toolkits import PlayWrightBrowserToolkit
from langchain_community.tools.playwright.utils import (
    create_async_playwright_browser,  # A synchronous browser is available, though it isn't compatible with jupyter.\n",	  },
)

import nest_asyncio
class PlayWrightBrowserTools(LangChainToolsWrapper):
    def get_tools(self):
        nest_asyncio.apply()

        async_browser = create_async_playwright_browser()
        toolkit = PlayWrightBrowserToolkit.from_browser(async_browser=async_browser)
        return toolkit.get_tools()
  1. Use the class path in the tools list in the graph config yaml file:
tools
    - tasks.examples.agent_tool_simulation.tools_from_class.PlayWrightBrowserTools
  1. Verify the flow for query like "What are the headers on langchain.com?"

Checklist

  • Lint fixes and unit testing done
  • End to end task testing
  • Documentation updated

Notes

Any caveats, future considerations, or known issues.

@bidyapati-p bidyapati-p marked this pull request as ready for review September 9, 2025 07:31
@bidyapati-p bidyapati-p changed the title support langchain tools [Enhancement] Support langchain tools Sep 9, 2025
@bidyapati-p bidyapati-p added the enhancement New feature or request label Sep 9, 2025
@bidyapati-p bidyapati-p requested a review from a team September 9, 2025 07:31
Copy link
Collaborator

@amitsnow amitsnow left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@psriramsnc psriramsnc left a comment

Choose a reason for hiding this comment

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

LGTM

@bidyapati-p bidyapati-p merged commit 1120aa7 into main Sep 9, 2025
1 check passed
@bidyapati-p bidyapati-p deleted the scratch/langchain_tool_support branch September 9, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants