Loading video player...
Build a LangChain AI Agent with FREE API and FREE web search — no paid subscriptions, no GPU required. Uses OpenRouter free LLMs + DuckDuckGo search to answer real-time queries in under 16 minutes. In this beginner-friendly tutorial, you'll set up LangChain from scratch, connect it to OpenRouter's free AI models (NVIDIA NemoTron, Inclusion AI Ring 2.61T), and wire up DuckDuckGo as a free real-time web search tool. Perfect for developers who want to explore AI agents without any cost. ━━━━━━━━━━━━━━━━━━━━━━━ ⏱️ TIMESTAMPS ━━━━━━━━━━━━━━━━━━━━━━━ 0:00 Introduction & Overview 0:19 OpenRouter — Get Free AI API Access 0:30 Browsing Free Models on OpenRouter (NemoTron, Ring 2.61T) 1:02 Comparing Latency & Throughput of Free Models 1:33 Copying the Model Address for LangChain 1:51 Installing LangChain in VS Code / Anaconda 2:26 pip install langchain Command 3:09 Verifying LangChain Installation in Jupyter Notebook 3:36 Installing LangChain-OpenRouter Integration 4:08 Getting Your OpenRouter API Key (Free) 5:00 Setting Up the .env File for API Keys 5:52 Installing python-dotenv & Loading Environment Variables 7:26 Importing ChatOpenRouter & Initializing the LLM 8:22 Configuring Model Parameters (Temperature, Max Tokens) 8:29 Testing the LLM — Invoking with a Simple Query 9:39 LangChain Agent Architecture Explained 10:43 Importing create_react_agent from LangChain 11:40 Creating the DuckDuckGo Web Search Tool 13:11 Wrapping DDGS as a LangChain @tool 13:53 Building & Running the Agent 14:12 Invoking the Agent & Passing Messages 15:05 Agent Response — Tool Call vs Direct Answer 16:00 DuckDuckGo Rate Limits & Handling Free Tool Quirks 16:27 Results & Wrap-up ━━━━━━━━━━━━━━━━━━━━━━━ 🔗 RESOURCES ━━━━━━━━━━━━━━━━━━━━━━━ • LangChain Docs: https://python.langchain.com • OpenRouter (Free LLM API): https://openrouter.ai • DuckDuckGo Search Python: https://pypi.org/project/duckduckgo-search • pip install langchain langchain-openrouter duckduckgo-search python-dotenv ━━━━━━━━━━━━━━━━━━━━━━━ 📌 WHAT YOU'LL LEARN ━━━━━━━━━━━━━━━━━━━━━━━ ✅ How to get a free LLM API key from OpenRouter and pick the best free model ✅ How to install and configure LangChain with the OpenRouter integration package ✅ How to use DuckDuckGo (DDGS) as a completely free web search tool for your agent ✅ How to define a custom LangChain tool using the @tool decorator ✅ How to build and invoke a ReAct agent that autonomously decides when to search the web ━━━━━━━━━━━━━━━━━━━━━━━ 🏷️ TAGS ━━━━━━━━━━━━━━━━━━━━━━━ #LangChain #AIAgent #FreeAI #OpenRouter #DuckDuckGo #LangChainAgent #PythonAI #FreeAPIKey #LLM #WebSearchAgent #GenerativeAI #AITutorial #LangChainTutorial #AgenticAI #NoGPU