abtsousa
Add initial implementation of LangGraph agent with model and tools integration.
f37e95b
raw
history blame
712 Bytes
from .wikipedia import wiki_search
from langchain_core.tools import StructuredTool
from langchain_community.document_loaders import WikipediaLoader
from langchain_core.tools import render_text_description_and_args
from langchain_core.tools import tool
def get_all_tools() -> list[StructuredTool]:
"""
Get all available tools as a list of LangChain StructuredTool instances.
Returns:
List of StructuredTool instances ready for use with LangChain agents
"""
tools = []
# Add Wikipedia tool
wikipedia_tool = wiki_search
tools.append(wikipedia_tool)
return tools
def list_tools() -> str:
return render_text_description_and_args(get_all_tools()) # type: ignore