LangChain Agent Tools in 2026: Every Built-in Tool and How to Use It

๐Ÿ“˜ AI Tutorials 2026-08-01 2 min read

LangChain ships 10+ built-in agent tools. This guide shows each one with a real code example.

## LangChain Agent Tools in 2026 LangChain (143,097 stars on 2026-07-31) is the most-used agent framework in the world, and its power comes from tools. Here is every built-in tool worth knowing. ### Core built-in tools 1. **TavilySearchResults** - web search for agents 2. **WikipediaQueryRun** - factual lookups, zero API cost 3. **ArxivQueryRun** - search research papers, essential for academic agents 4. **DuckDuckGoSearchRun** - free search fallback when you have no API key 5. **PythonREPLTool** - the agent executes Python code in a sandboxed REPL 6. **ShellTool** - run shell commands (use with extreme caution in production) 7. **SQLDatabaseToolkit** - query SQL databases safely with schema awareness 8. **requests_tools** - make HTTP calls to REST APIs ### Creating a custom tool [python] from langchain.tools import tool @tool def get_server_status(host: str) -> str: """Check if a server is up.""" import subprocess result = subprocess.run(["ping", "-c", "1", host], capture_output=True, text=True) return result.stdout [/python] ### The 2026 pattern: MCP integration LangChain now loads MCP servers natively: [python] from langchain_mcp_adapters.tools import load_mcp_tools tools = await load_mcp_tools("https://mcp.example.com/sse") [/python] ### Best practices - Give every tool a clear docstring with argument descriptions - the LLM reads it to decide when to call - Add handle_tool_error=True to prevent crashes from bad tool outputs - Bind tools to a function-calling model: llm.bind_tools(tools) ### FAQ **Do I need a Tavily API key?** TavilySearchResults requires a free API key; DuckDuckGoSearchRun does not. **Can tools call other tools?** Yes, through agent routing or sub-agents in LangGraph.
Related Articles
2026-07-14
Local LLM Setup Guide 2026: Run AI Models on Windows, Mac, or Linux
2026-07-13
Run Ollama Locally with Docker: Complete 2026 Setup Guide
2026-07-14
Open Source AI Model Benchmarks 2026: Llama 3.1 vs Qwen 2.5 vs Mistral vs Phi-3

๐Ÿ’ฌ Comments (0)

No comments yet. Be the first!

Login to comment