Python: Create a ReAct Agent from Scratch

preview_player
Показать описание
In this video, we dive deep into building intelligent agents from scratch, without relying on popular frameworks like LangChain or LlamaIndex. Instead, we’ll use pure Python and Groq’s free LLMs, making it accessible for everyone!

Links:
===

🔍 Topics covered in this video:
===
- Understanding the ReAct pattern for AI agents
- Utilizing Groq’s LLM to think and choose actions
- Building multi-agent systems from scratch
- Incorporating observations into the prompt in a continuous loop
- Preparing to use advanced tools like LangChain, LlamaIndex, and CrewAI

Timestamps
===
00:00 Intro
1:27 What is an Agent
3:05 What is a React Agent
10:29 Get a Groq API Key
12:41 Init Groq
15:15 Code the Agent Class
22:12 Overview of the System Prompt
27:06 Setup the Agent's Tools
29:20 Run the Agent Manually
38:08 Run the Agent in a Loop
54:59 Outro

Keywords: agents, LLM, OpenAI, multi-agent systems, Groq, CrewAI, AI agents, AI automation, React agent, chain of thought, artificial intelligence, LangChain, LlamaIndex, agentic, teams of AI agents, Anthropic, Llama3
Рекомендации по теме
Комментарии
Автор

I needed it a lot. Everyone is teachine the framework which just make it confusing for the beginners to understand whats happening behind the hood. Thank you so much for the content

ak-mp
Автор

This is hands down the best video out there if you want to understand agents and not just use some abstract frameworks. Congrats!

SOGTULAKlamares
Автор

Beautiful of pure Python - it gives you really deep understanding unlike frameworks! Thank you, man! You have great talent of explaining everything in simple way!

amanzholdaribay
Автор

I just wanted to say, thank you for doing this, understanding how it works under the hood is so important for me and very few others are going this deep on youtube. Prototyping without SDKs, even if I use an SDK for actual production gives me a better grasp of what is happening which helps me build better. So again, thank you.

hickam
Автор

I'm super excited to be considered to be part of your first AI Engineer Cohort Alejandro! Hopefully see you in August. hi from New Zealand!

JonathanLyon
Автор

At 36:00, I see two consecutive "assistant" messages. Does this work well? Doesn't it deviate from the expected chat template of alternating "assistant" and "user" turns.

sambitmukherjee
Автор

Amazing tutorial! This is the tutorial i was looking for. Simple and no frameworks, to understand the basics and fundamental. Thank you very much Alejandro!

facundozupel
Автор

I tried to run the same code with Gemini, but its actually answering all things at once, such as the thought and the action

luanabarros
Автор

Thanks so much for this tutorial. Appreciate going deep inside so we at least have a conceptual view of how these agentic tools work

rembautimes
Автор

This is exactly the video I needed today. Thank you and subscribed!

flamingwoodz
Автор

Hey! I am going to start teaching and I will be taking a few students.

In short, it is 12 weeks of weekly lectures, exercises and live QAs. We will cover GenAI, LangChain, CrewAI, LangGraph and deployment.


I would appreciate your feedback about the landing page, as I am not great at marketing 😅

alejandro_ao
Автор

Dhanyawad. Very informative tutorial. Keep up the good work.

romilsarna
Автор

This is such an important training! Thank you for sharing brother 🙌🏾💜

andydataguy
Автор

🔥Join the AI Engineer Bootcamp:

Hey there! The second edition of the AI Engineering Cohort is starting soon 🚀

- Learn with step-by-step lessons and exercises
- Join a community of like-minded and amazing people
- I'll be there to personally answer all your questions 🤓
- The spots are limited since I'll be directly interacting with you


Cheers!

alejandro_ao
Автор

Excellent video!
You mentioned the JSON format towards the end. Actually, you can ask for a JSON directly in the prompt.
I’ve tried it, and it works really well!”

Example session:
Question: What is the mass of Earth times 2?
Thought: I need to find the mass of Earth
Action: {"action_name": "get_planet_mass", "param": { "planet": "Earth" }}
PAUSE

cohen
Автор

It would be great to have a video about utilizing ReAct in LlamaIndex after this one. A very advanced one with query rewriting (if possible) and mainly the ReAct in the LlamaIndex. To me, the document load and parse are easy to pick up but ReAct is confusing.

hoangng
Автор

thanks for very clear and simple explanation

ZaferCan
Автор

Great video! Please do a video on llama index with librechat.

joreilly
Автор

You also use arc? Nice. I was confused as why is my sidebar not closing. Pressed command s multiple times before realising.

wreckball
Автор

Hi! Thanks for the video, very helpful. Can you explain an example on how to have two or more agents talking to each other? Each one if its own loop

luanabarros
visit shbcf.ru