UNPKG

create-agent-chat-app

Version:
24 lines (21 loc) 827 B
/** * This file defines the tools available to the ReAct agent. * Tools are functions that the agent can use to interact with external systems or perform specific tasks. */ import { TavilySearchResults } from "@langchain/community/tools/tavily_search"; /** * Tavily search tool configuration * This tool allows the agent to perform web searches using the Tavily API. */ const searchTavily = new TavilySearchResults({ maxResults: 3, }); /** * Export an array of all available tools * Add new tools to this array to make them available to the agent * * Note: You can create custom tools by implementing the Tool interface from @langchain/core/tools * and add them to this array. * See https://js.langchain.com/docs/how_to/custom_tools/#tool-function for more information. */ export const TOOLS = [searchTavily];