inflearn logo

Building an AI Agent from Scratch — RAG · Multi-Agent · MCP

Build an AI agent from scratch using Python and a single while loop, without any frameworks. In the introductory section, you’ll add tool design, failures and costs, memory, human approval, evaluation, and a web interface one by one to complete a small coding agent. In the hands-on section, you’ll implement RAG, multi-agent systems, and an MCP server yourself using real business reports from DART, then compare them numerically with LangChain and LangGraph.

58 learners are taking this course

Level Basic

Course period Unlimited

Python
Python
FastAPI
FastAPI
LLM
LLM
openAI API
openAI API
AI Agent
AI Agent
Python
Python
FastAPI
FastAPI
LLM
LLM
openAI API
openAI API
AI Agent
AI Agent

News

3 articles

  • dante님의 프로필 이미지

    Hello, this is Dante.

    The six-part series in the new section “Practical 9 · Agent Search — When You Have Hundreds of Thousands of Documents, Fetch Them and grep” (Parts 35–40, about 78 minutes total) is now available.

    Agents that dig through documents using only grep and file reading, without vector search, are attracting attention. In this section, we scale that approach to around 650,000 Korean Wikipedia articles and measure firsthand how far it can go—and where it hits its limits.

    • Practical Guide 35: We read a paper claiming that agents using grep beat vector search and examine what it actually compared.

    • Practical Series 36: Measure how search time changes as the number of documents grows to 10,000, 100,000, and about 650,000, then build a tool that distinguishes between missing results, timeouts, and command failures.

    • Practical Series Episode 37: Rebuild find and read to work with document IDs instead of file paths

    • Practical Series, Episode 38: We build a pull tool that brings only the documents selected by the search engine into the working folder for inspection.

    • Practical Series, Episode 39: Weigh and score three approaches under the same conditions: search only, searching everything at once, and pulling documents over to search them.

    • Field Guide 40: Set criteria for when to choose each approach, and add a router that starts with the cheaper option.

    To give you a preview, searching all 650,000 or so documents at once didn’t produce incorrect results—it just got slow (79–95 seconds per query). Retrieving candidate documents first and then searching cut that down to 15–20 seconds while preserving nearly all the correct answers. In the lesson, we’ll look at the execution logs to see why and where it fails.

    The content referred to in the video as “Agent Search Lesson” and “Path Selection Lesson” is summarized at the top of the 35-part practical course notes. You can read it first before getting started.

    Instructions for obtaining the practice code and materials are in the public repository. You only need to download the 10,000-document set (about 12 MB) to follow along with all six lessons.

    https://github.com/dante01yoon/embedding-rag-practice/tree/main/c3

    If you get stuck or have any questions, please leave them in the questions section for each lesson, and I’ll be happy to help.

    Thank you.

    0
  • dante님의 프로필 이미지

    ・

    Edited

    Hello, this is Dante.

    The practical section I previewed is now fully available as of today. If you’re enrolled, you can watch it right away at no additional cost.

    Practical Part Structure (23 Episodes + Deployment Walkthrough Appendix)

    · Practical 1 · Orientation and Report Card: Complete Demo, Environment Check, Agent Loop, and Report Card

    · Hands-on 2 · Tool Design: 15 Disclosure Lookup Tools, 40 Tools and Tool Search

    · Hands-on 3 · Context Engineering: Including the Entire Business Report, Managing Long Tasks, Skills and Subagents

    · Hands-on 4 · RAG: Business report Q&A, BM25 · vectors · reranking, citation and number verification, LangChain · LlamaIndex comparison

    · Practical 5 · Multi-Agent: Corporate Research Team, Citation Verifier, Migrating to LangGraph

    · Hands-on 6 · MCP: Build and deploy your own disclosure-search MCP server, covering security and a LangChain adapter

    · Hands-On 7 · Capstone: FastAPI + SSE backend, React interface, deployment and final report card, step-by-step Render deployment

    An agent that started as a single while loop ends up on the final scorecard with its accuracy on the same 20 questions improving from 90% to 95%, and its sentences with sources attached increasing from 0/63 to 71/72.

    Start with the environment check in Practical Guide Episode 0. You will need an OpenRouter key and an OpenDART key (free).

    Please leave any questions about where you get stuck in the class question section. Thank you.

    0
  • dante님의 프로필 이미지

    Hello, this is Dante.


    A practical section will be added to this course. Building on the agent loop created in the introductory section, we will create an AI investment research workbench using actual business reports from listed companies (DART) and cover the following topics.


    - Practical Tool Design: Expanding 15 disclosure lookup tools to 40, tool search, and caching

    - Context engineering: handling long documents and long-running tasks, skills and sub-agents

    - RAG: BM25 · hybrid · reranking, adding sources and cross-checking numbers, comparison of LangChain · LlamaIndex

    - Multi-agent: Corporate research team, citation verifier, migrating to LangGraph

    - MCP: Implementing a server directly → official SDK → remote deployment and token authentication → security → connecting to LangGraph

    - Capstone: Completing the Workbench with FastAPI · React and the Final Grade Report


    We’ll proceed by directly measuring everything numerically, and the 23 lessons will be released sequentially across 7 sections.

    Those already enrolled can continue watching without any additional payment.


    Thank you.

    0

Limited time deal ends in 20:22:51

$63.80

24%

$84.70