In this video, I will show you how to build an AI agent from scratch using JavaScript - no frameworks! You will learn how agents work, how it calls external tools or functions to perform tasks etc.
If you would like to download the source code, it is available here - https://github.com/anandrmedia/ai-agent-js-scratch
Learn the fundamentals of AI agent logic by creating an appointment scheduler in TypeScript, step by step. This hands-on tutorial will give you a solid understanding of the mechanics behind AI agents, enabling you to build your own custom solutions without relying on third-party libraries.
👉 If you want to learn the basic concepts before you dive into agent/llm development, watch this video first -
https://youtu.be/QtYEPYntfL4
Bookmarks for this video
00:00 Introduction
00:56 Importing dependencies
02:40 send_to_llm function
05:15 creating the chatbot loop using readline library
06:29 First test of the chatbot
08:23 Adding the system prompt
11:48 Defining the tools/functions for function calling
14:20 Testing the agent with system prompt
16:21 Defining the process_llm_response() function
21:39 Testing the final agent
Follow me for more content on software engineering, system design and AI related content.
Twitter - https://twitter.com/anandrmedia
Website - https://anands.me
If you like my video, consider subscribing to my Youtube channel
Thanks for watching,
👋 Anand