Building a ReAct AI Agent (Tutorial)
Key Takeaways
This video demonstrates how to build a simple ReAct AI agent using Flowise, a tool built on top of Lang Chain, and integrates it with a language model from OpenAI and a calculator tool. The agent uses the ReAct logic to decide what action to take and is optimized for use with chat models.
Full Transcript
in this demonstration we're going to use flse to create our first basic react agent inside of flowes you will choose chop flows then you will choose add new then you will start off with a blank canvas okay so now what we can do here is we can start off with our language model so we need a language model this is going to help power this agent capabilities such as planning and reasoning and we're going to use chat open AI so here we have chat open Ai and you should have already set up your credentials so we have a video about that as well in the previous section where we introduced LCI and you will take that credential and you're going to set it up here so I'm going to choose my credential here because I already have it stored and then for this I'm going to use the GPD 40 mini which is the one of the latest models from openi and I need to use one of the latest models because I want to use the model that has really good reasoning capabilities but you can experiment with any of these models or different providers as well so we have this model here and then what we need is we need our react agent so instead of flow wise because it's built on top of Lang chain we have the ability to use Lang Chain's react agent functionality so if we go under agents right here you will see that there are several types of agents that have been built in into the FL I tool and so the one that we're going to use is this react agent for chat models so agent that uses the react logic to decide what action to take optimize to be used with chat models so I'm just going to drag this here and so now we have two of the core components that makes this react agent so what I need to do is I need to connect this now and we have our chat model right here and then we're missing two components here we discuss the ability of the react agent to use these external tools so we can connect an external tool right here so we can use for instance something like a calculator as a very basic example here so I'm going to go here and you will see that there's also a tool section so here's a tool section and under Tools we have this calculator tool so I can go and drag that here and now we have a calculator tool it's not asking me to do anything special it's just a calculator but I can now connect that to allow tools so I can continue to add more tools if I want but for this demonstration I'm going to keep it very basic in future use cases and demonstrations we're going to be using all kinds of very complex tools such as search engines and so forth then the last component here is memory so I'm going to take a memory component from here so if we go to the list here we have memory and under memory we have different kinds of memory components one type of memory component that we can use here is this buffer memory and what does it do it retrieve chat messages stored in a database so basically it's going to allow the react agent to use its chat history if it needs to access whatever information it had pulled already from the external tool so I'm just going to drag it here and then I'm just going to connect it right here we have our memory component we have our chat model and we have our calculator so that's it we have developed a very basic react agent and now we can save this so I'm going to go here to this button I'm going to save and I'm going to give it a name I'm going to call this basic react I'm going to save this and the cool thing about flowise is that I can very quickly test this idea so we have this chat feature here that I can go and open and then I can start to interact with my agent so I can type a question like how much is 98,000 times I'm giving it a m problem here I want agent to actually use the calculator because that is what it has access to I'm just going to ask you this question for problems like this you really don't want to trust a language model to do Tas like this so it's going to be very useful for the agent to access this calculator and it's going to see it it's going to see oh I have a sort of mat problem here and it's going to decide okay I need to take these two different numbers and I need to give and provide that to the calculator as some type of input and then the calculator is going to respond back with the result and then it's going to have the result and then the language mod will compose a final answer for us that's sort of what the process is here so you can see here it says 98,000 * 150,000 is this huge number here so again for calculations like this we really want to use like a calculator tool to do this so this is the first example of a basic react agent with OP the different components that we discussed in this module and in upcoming modules we are going to build on top of this idea and build more complex agentic systems that are going to leverage complex tools and leverage this idea of the ability of an agent to use memory to use different tools and use a very powerful large language model to complete very complex tasks
Original Description
Learn more about how to build AI agents in my new course: https://dair-ai.thinkific.com/courses/introduction-ai-agents
Use code AGENTS20 to get an extra 20% off.
--
Tutorial on how to build a simple ReAct AI agent.
#ai #chatgpt #tech
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Elvis Saravia · Elvis Saravia · 0 of 60
← Previous
Next →
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
101 ways to solve search (by Pratik Bhavsar)
Elvis Saravia
TLDR Generation of Scientific Documents | ML Interview #1 with Isabel Cachola
Elvis Saravia
Sentiment Analysis: Key Milestones, Challenges and New Directions
Elvis Saravia
Discriminative Adversarial Search for Abstractive Summarization (by Thomas Scialom)
Elvis Saravia
Question Understanding: COVID-Q: 1,600+ Questions about COVID-19
Elvis Saravia
Getting Started with NLP
Elvis Saravia
Building tools and frameworks for large-scale social media mining (by Dr. Juan M. Banda)
Elvis Saravia
TextAttack: A Framework for Data Augmentation and Adversarial Training in NLP
Elvis Saravia
Dive into Deep Learning (Study Group): Introduction to Deep Learning | Session 1
Elvis Saravia
Dive into Deep Learning (Study Group): Multilayer Perceptrons | Session 4
Elvis Saravia
How I read and annotate ML papers
Elvis Saravia
Keep Learning ML (Session 1) | DSV, CompLex, Modern tools for emotions
Elvis Saravia
Dive into Deep Learning (Study Group): Preliminaries | Session 2
Elvis Saravia
Keep Learning ML #2 | Language-conditioned policy learning, Effective ML Testing, EagerPy
Elvis Saravia
Dive into Deep Learning (Study Group): Linear Neural Networks | Session 3
Elvis Saravia
Dive into Deep Learning (Study Group): Multilayer Perceptrons | Session 4
Elvis Saravia
Keep Learning ML #3 | Contrastively Trained Structured World Models
Elvis Saravia
Dive into Deep Learning (Study Group): Deep Learning Computation with PyTorch | Session 5
Elvis Saravia
Dive into Deep Learning (Study Group): Convolutional Neural Networks | Session 6
Elvis Saravia
Dive into Deep Learning (Study Group): Modern CNNs | Session 7
Elvis Saravia
101 ways to solve neural search with Jina
Elvis Saravia
(Hopefully-Reusable) Life Lessons for PhD Students in NLP
Elvis Saravia
How to save the world and forward your career in 5 easy steps | Women in NLP Talks
Elvis Saravia
Prompt Engineering Overview
Elvis Saravia
Getting Started with the OpenAI Playground
Elvis Saravia
LM-Guided Chain of Thought
Elvis Saravia
Elements of a Prompt
Elvis Saravia
Reasoning with Intermediate Revision and Search with LLMs #chatgpt #ai #llms #science #programming
Elvis Saravia
General Tips for Designing Prompts
Elvis Saravia
Efficient Infinite Context Transformers #ai #machinelearning #research #llms #science
Elvis Saravia
Best Practices and Lessons Learned on Synthetic Data for Language Models #ai #machinelearning #genai
Elvis Saravia
Reducing Hallucinations in Structured Outputs via RAG #chatgpt #ai #llms #programming
Elvis Saravia
Basic Prompt Examples for LLMs
Elvis Saravia
LLM In Context Recall is Prompt Dependent #llms #ai #chatgpt #machinelearning
Elvis Saravia
Zero-shot Prompting Explained
Elvis Saravia
RAG Faithfulness #llms #ai #gpt4
Elvis Saravia
Understanding LLM Settings
Elvis Saravia
Llama 3 is here! | First impressions and thoughts
Elvis Saravia
Llama 3 is Here! #ai #llms #llama3
Elvis Saravia
Microsoft introduces Phi-3 | The most capable small language model?
Elvis Saravia
Microsoft introduces Phi-3! #ai #llms #microsoft
Elvis Saravia
Make Your LLM Fully Utilize the Context #ai #llms #machinelearning
Elvis Saravia
When to Retrieve? #ai #llms #machinelearning
Elvis Saravia
Training an LLM to effectively use information retrieval
Elvis Saravia
State-of-the-art open-source LLM judges #ai #machinelearning #gpt4
Elvis Saravia
Better and Faster LLMs via Multi-token Prediction
Elvis Saravia
AlphaMath Almost Zero #ai #science #machinelearning
Elvis Saravia
SWE-Agent | An LLM-based Software Engineering Agent
Elvis Saravia
[LLM NEWS] AlphaFold 3, xLSTM, OpenAI's Model Spec, DeepSeek-V2, OpenDevin CodeAct 1.0
Elvis Saravia
LLM-powered tool for web scraping #ai #chatgpt #engineering
Elvis Saravia
Learn about LLMs in this NEW course #ai #chatgpt #engineering
Elvis Saravia
[LLM NEWS] KANs, Gemma 10M Context, OpenAI Updates?, Automatic Prompt Engineering, Tokenizer Arena
Elvis Saravia
[LLM News] GPT4-o, Project Astra, Veo, Copilot+ PCs, Gemini 1.5 Flash, Chameleon
Elvis Saravia
Enhancing Answer Selection in LLMs #ai #machinelearning #engineering
Elvis Saravia
On exploring LLMs #ai #promptengineering #chatgpt
Elvis Saravia
Transformers Can Do Arithmetic with the Right Embeddings #ai #machinelearning #engineering
Elvis Saravia
[LLM News] xAI Series B, Codestral, LLM Guide, AutoGen Course, Symbolic Chain-of-Thought
Elvis Saravia
PR-Agent #ai #gpt4 #software
Elvis Saravia
Extracting features from Claude 3 Sonnet
Elvis Saravia
Has prompt engineering been solved?
Elvis Saravia
More on: LLM Foundations
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
How to prepare TIC teacher exams in Spain with AI (oposiciones 2026)
Dev.to AI
This ChatGPT Prompt Replaced 3 Hours of PowerPoint Work
Medium · AI
This ChatGPT Prompt Replaced 3 Hours of PowerPoint Work
Medium · ChatGPT
How AI Assist Turns a Rough Draft into a Polished Document in Minutes
Dev.to · paperquire
🎓
Tutor Explanation
DeepCamp AI