Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKGet startedIntroductionInstallationQuickstartLangChain Expression LanguageInterfaceHow toCookbookLangChain Expression Language (LCEL)Why use LCEL?ModulesModel I/‚ÄãORetrievalChainsMemoryAgentsAgent TypesConversationalOpenAI functionsOpenAI Multi Functions AgentReActReAct document storeSelf-ask with searchStructured tool chatXML AgentHow-toToolsToolkitsCallbacksModulesSecurityGuidesMoreModulesAgentsAgent TypesStructured tool chatOn this pageStructured tool chatThe structured tool chat agent is capable of using multi-input tools.Older agents are configured to specify an action input as a single string, but this agent can use the provided tools' args_schema to populate the action input.from langchain.agents import AgentTypefrom langchain.chat_models import ChatOpenAIfrom langchain.agents import initialize_agentInitialize Tools‚ÄãWe will test the agent using a web browserfrom langchain.agents.agent_toolkits import PlayWrightBrowserToolkitfrom langchain.tools.playwright.utils import (    create_async_playwright_browser,    create_sync_playwright_browser, # A synchronous browser is available, though it isn't compatible with jupyter.)# This import is required only for jupyter notebooks, since they have their own eventloopimport nest_asyncionest_asyncio.apply()pip install playwrightplaywright installasync_browser = create_async_playwright_browser()browser_toolkit = PlayWrightBrowserToolkit.from_browser(async_browser=async_browser)tools = browser_toolkit.get_tools()Use LCEL‚ÄãWe can first construct this agent using LangChain Expression Languagefrom langchain import hubprompt = hub.pull("hwchase17/react-multi-input-json")from langchain.tools.render import render_text_description_and_argsprompt = prompt.partial(    tools=render_text_description_and_args(tools),    tool_names=", ".join([t.name for t in tools]),)llm = ChatOpenAI(temperature=0)llm_with_stop =
The structured tool chat agent is capable of using multi-input tools.
The structured tool chat agent is capable of using multi-input tools. ->: Skip to main contentü¶úÔ∏èüîó LangChainDocsUse casesIntegrationsAPICommunityChat our docsLangSmithJS/TS DocsSearchCTRLKGet startedIntroductionInstallationQuickstartLangChain Expression LanguageInterfaceHow toCookbookLangChain Expression Language (LCEL)Why use LCEL?ModulesModel I/‚ÄãORetrievalChainsMemoryAgentsAgent TypesConversationalOpenAI functionsOpenAI Multi Functions AgentReActReAct document storeSelf-ask with searchStructured tool chatXML AgentHow-toToolsToolkitsCallbacksModulesSecurityGuidesMoreModulesAgentsAgent TypesStructured tool chatOn this pageStructured tool chatThe structured tool chat agent is capable of using multi-input tools.Older agents are configured to specify an action input as a single string, but this agent can use the provided tools' args_schema to populate the action input.from langchain.agents import AgentTypefrom langchain.chat_models import ChatOpenAIfrom langchain.agents import initialize_agentInitialize Tools‚ÄãWe will test the agent using a web browserfrom langchain.agents.agent_toolkits import PlayWrightBrowserToolkitfrom langchain.tools.playwright.utils import (    create_async_playwright_browser,    create_sync_playwright_browser, # A synchronous browser is available, though it isn't compatible with jupyter.)# This import is required only for jupyter notebooks, since they have their own eventloopimport nest_asyncionest_asyncio.apply()pip install playwrightplaywright installasync_browser = create_async_playwright_browser()browser_toolkit = PlayWrightBrowserToolkit.from_browser(async_browser=async_browser)tools = browser_toolkit.get_tools()Use LCEL‚ÄãWe can first construct this agent using LangChain Expression Languagefrom langchain import hubprompt = hub.pull("hwchase17/react-multi-input-json")from langchain.tools.render import render_text_description_and_argsprompt = prompt.partial(    tools=render_text_description_and_args(tools),    tool_names=", ".join([t.name for t in tools]),)llm = ChatOpenAI(temperature=0)llm_with_stop =