Loop Engineering And Harness Engineering Crash Course — Transcript
Full transcript
- 0:00Hello all, my name is Krishna and
- 0:02welcome to my YouTube channel. So guys,
- 0:03today in this particular video we are
- 0:05going to have this amazing crash course
- 0:07wherein we are going to discuss about
- 0:10two key terminologies which is called as
- 0:12loop engineering and harness
- 0:14engineering. Here uh in this specific
- 0:16video we are just not going to
- 0:18understand what is the meaning of loop
- 0:20engineering or harness engineering.
- 0:22We're also going to go ahead and
- 0:23implement two amazing end to-end
- 0:25projects wherein you will be able to
- 0:27understand so many things. Make sure to
- 0:29watch this video till the end. Uh Bappy,
- 0:32one of our instructor uh in Krishna
- 0:34Academy, he's going to probably take
- 0:36this entire crash course. Right. So
- 0:38again, this video will be for somewhere
- 0:40around 3 and a half hours. Uh we have
- 0:42made sure that we have uh taught each
- 0:44and everything step by step. So please
- 0:46go ahead and enjoy this specific crash
- 0:48course. Thank you.
- 0:49>> Uh the topic name is loop engineering in
- 0:52agentic. Okay. So here I'm not only
- 0:56going to discuss about the theoretical
- 0:58concept of loop engineering. Apart from
- 1:01that I'm also going to show you the
- 1:03practical demo of that. We'll try to
- 1:04build uh self-correcting multi-agent
- 1:07system. Uh so that you can understand
- 1:10how loop engineering works. Okay.
- 1:12Internally each and everything. Right.
- 1:14Three kinds of uh three types of
- 1:16application we usually develop inside
- 1:19generative AI. The first type is the
- 1:22prompting approach.
- 1:27Okay, prompting
- 1:29approach. Since prompting actually what
- 1:32we do, let's say here we have a large
- 1:35language model.
- 1:40This is our large language model. And
- 1:43here we give a prompt. Okay. and it
- 1:48returns a response
- 1:51or output whatever you can say right. So
- 1:54we call it as LM inference. Okay. And
- 1:57here LM wise we can use anything. We can
- 1:59use GPT,
- 2:01we can use LMA,
- 2:04we can use Gemini.
- 2:06Okay. We can use um any kinds of LM.
- 2:10Okay. We can use uh let's say ML.
- 2:14Okay. Anything you can use. I think you
- 2:16know there are thousands of thousands
- 2:18large language models are available
- 2:19nowadays over the internet. We can use
- 2:21any kinds of large language model here.
- 2:23Okay. So if you have seen uh the first
- 2:28uh first let's say prototype of the
- 2:29application whenever it came in the
- 2:32market especially whenever generative
- 2:34came in the market right so the first
- 2:36application got introduced something
- 2:38called charge GPT right so who already
- 2:42used charge GPT at the very beginning I
- 2:44think you know that we used to pass a
- 2:46prompt okay in the chart GPT and charg
- 2:48used to uh return you some kinds of
- 2:50response let's say you are giving just
- 2:52tell me about Python. Let's say this is
- 2:54this is your prompt. You are asking tell
- 2:56me about Python. So this prompt will go
- 2:58to the LM. Now LLM has the knowledge
- 3:02cutoff. Knowledge cut off means it has
- 3:03the knowledge base. That means large
- 3:06language model has trained with huge
- 3:08amount of internet data. So this Python
- 3:12information definitely it's available
- 3:14over the internet, right? So that that
- 3:16time um let's say uh they train this
- 3:18model. So also Python information was
- 3:20available inside the model. So it will
- 3:22try to utilize that particular knowledge
- 3:24base and it will give you the response.
- 3:25Okay, this is the Python. This Python is
- 3:28a programming language. Okay, now we can
- 3:30use this Python blah blah blah. Okay,
- 3:31this kinds of response you will be
- 3:32getting. So that means if you are asking
- 3:35anything to the large language model if
- 3:37this particular knowledge sources is
- 3:40available in the large language model
- 3:43that time it will be able to give you
- 3:45the response. Okay. Otherwise, it will
- 3:47directly tell you I don't have the
- 3:49informations about the questions you are
- 3:51asking. Okay. I can't help you with
- 3:54that. So, how many of you have let's say
- 3:58faced this kinds of uh let's say
- 4:00problem? Anyone here? So, if you have
- 4:03already used any kinds of large language
- 4:05model, I'm not telling you any kinds of
- 4:08application, any kind of way of AI agent
- 4:11application. I'm talking about only
- 4:12simple large language model application.
- 4:14So if you are asking anything so let's
- 4:16say if I'm sure
- 4:17>> so guys before we go ahead I would like
- 4:18to thank the sponsor of this specific
- 4:20video uh appex uh um I will be
- 4:24explaining you how appetics can be
- 4:25actually used and a huge shout out for
- 4:27them
- 4:29here's the thing about deep research
- 4:31with AI after a few hundred steps the
- 4:34context window conest lines of inquiry
- 4:36collide and the agent is basically
- 4:39proofreading its own blind spots the
- 4:42real problem is the model reflecting on
- 4:44its own draft has the exact same blind
- 4:47spots that made the error in the first
- 4:49place and that's what leads to pseudo
- 4:52correctness reports that look
- 4:54professionalized but may stay factually
- 4:56wrong. So today we have Apex the
- 4:58self-evolving heavyduty solver to
- 5:01research solve and discover at the
- 5:02frontier requires more than the model
- 5:04capacity. It requires rigorous reasoning
- 5:07each step verified. So, ApoDex is an AI
- 5:10system designed for complex and
- 5:12demanding research tasks. There are
- 5:14three levels of depth which is provided
- 5:16by Apoex. The deep research which is
- 5:19fast source grounded research across the
- 5:22full depth of available knowledge. And
- 5:24then we have the deep solve resolve what
- 5:27matters. And finally, we have the
- 5:30toughest one which is the deep discover
- 5:33which generate what is new. the highest
- 5:36rigger heavyduty solver for the hardest
- 5:38questions at the frontier of human
- 5:40knowledge. So, Apoex fixes this at the
- 5:43architecture level. It's a heavyduty
- 5:45solver up to 150 specialized sub aents
- 5:48working as synchronously with
- 5:50independent verification agents that did
- 5:52not do the reasoning. Deep discover hits
- 5:55the browse comp with 90.3 and Frontier
- 5:57Science Olympiad with 87.4.
- 6:01The open models punch way above their
- 6:03weight. Apedex deep research the 35
- 6:06billion model is topping future X right
- 6:10now and the small series at 0.8 8
- 6:13billion, 2 billion and 4 billion are the
- 6:16compact models trained on deep research
- 6:18SFT data alone. The 4 billion beats
- 6:21every open-source 30 billion class model
- 6:24which are all freely available on
- 6:26hugging face. Now let's try ApoDex. So
- 6:30here we are predicting whether Nvidia
- 6:32will maintain more than 70% of the AIGPU
- 6:35market share. Okay. And here you can see
- 6:37we have the three different options. the
- 6:39deep research, the deep solve and the
- 6:43deep discover. So we'll be right now
- 6:45exploring the most capable one which is
- 6:47deep discover.
- 6:50And as you can see that multiple agents
- 6:52are right now being dispatched. So it's
- 6:54right now in the research phase with
- 6:56multiple runs.
- 6:58Now as you can see here multiple agents
- 7:00have done their research. The Nvidia
- 7:02current share research then the AMD AI
- 7:05GPU research, the Intel AI accelerator
- 7:08research. So really the first step is
- 7:10researching and multiple agents are
- 7:12right now working
- 7:20and finally we can see that deep
- 7:23discover has completed.
- 7:25The reasoning has completed. It took
- 7:27around 35 minutes. Total 432
- 7:32claims have been verified with 961
- 7:35evidence. You can get the entire
- 7:38detailed run with respect to the
- 7:39research agent, the verification agent.
- 7:43It used six sub aents for verification.
- 7:46One sub aent then the total number of
- 7:48evidences based on that the claims that
- 7:50came. So it's pretty much a detailed one
- 7:54and right now as I can see that with
- 7:56respect to the competitors also uh for
- 7:59every organization I can say that it has
- 8:01been provided with a lot of detail
- 8:04and finally I can say that all the major
- 8:07references from where it actually got
- 8:09the evidences and finally looked into
- 8:12the claims. So all those are available
- 8:15in our final report. So I can say that
- 8:17this is really impressive. So this video
- 8:20is sponsored by Apodex. So try this
- 8:23solver now. Links in the description.
- 8:25Builders, go grab the open models. Stop
- 8:29proofreading your own blind spots. Go
- 8:31try it today. Showing you if I show you
- 8:34the open AI
- 8:38model list. Okay?
- 8:41Or any any kinds of model list. You can
- 8:43simply open up.
- 8:48Okay, you can open up and you can see it
- 8:52is having a uh knowledge cut off date.
- 8:55Okay, so let me show you uh view all the
- 8:58models. So let's pick one model here. So
- 9:01let's say I'm going to pick this um GPT
- 9:0440 mini. Okay, let's I'll pick this
- 9:06particular model. Now if I open this
- 9:09model you will see that it is having
- 9:11some kinds of information. The first
- 9:13information is nothing but it's a
- 9:14context window. Context window means
- 9:17it's a input size of the model. That
- 9:18means at a time how many tokens it can
- 9:21take as an input. Okay. That means this
- 9:23model can take this amount of tokens.
- 9:26Okay. Then this can generate this this
- 9:28is the maximum amount of tokens it can
- 9:30generate as an as an output. And this is
- 9:32the knowledge cutff date. That means
- 9:34this model got trained till October 1,
- 9:362023. Okay, that means till October 10,
- 9:392023 whatever data was available over
- 9:42the internet this model got trained.
- 9:45Okay, this model got trained and this
- 9:46model is having the u I mean uh
- 9:49information till Octo 2023. If you are
- 9:52asking okay after October 2003 let's say
- 9:55you are asking tell me about 2026 FIFA
- 9:59World Cup okay who won the world world
- 10:01cup right so definitely these kinds of
- 10:03questions your LLM will be able to uh
- 10:06won't be able to give you the response
- 10:07because it doesn't have this kinds of
- 10:09informations okay so this was the main
- 10:11problem with this prompting approach
- 10:13okay this was the main problem with the
- 10:14prompting approach so that's why um what
- 10:18researcher thought let's say right now
- 10:21if you
- 10:22This data is getting updated day by day.
- 10:25Okay. In internet every day there are
- 10:27some new informations are coming. So
- 10:30fine-tuning this kinds of large language
- 10:32model is super hard. Right? So we can't
- 10:34fine-tune this kinds of large language
- 10:35model because it's expensive. We need a
- 10:38good instance. Okay. That is powerful
- 10:40machine
- 10:42context learning or engineering. You can
- 10:45tell
- 10:49learning we also call it as a rag that
- 10:52means retable augmented generation okay
- 10:54I think you already know about this rag
- 10:58rightable augmented generation we call
- 11:00it as a context learning as well okay so
- 11:02in context learning what happens let's
- 11:04say you are having your large language
- 11:06model
- 11:07let's say this is your large language
- 11:09model LLM okay and uh see it is it is
- 11:14not only going to rely on its own
- 11:16knowledge base. Instead of that, we
- 11:18provide additional knowledge sources
- 11:20here. Okay, provide additional knowledge
- 11:22sources.
- 11:25Okay, this is called knowledge base. And
- 11:28here we use a vector database.
- 11:32Vector database. Okay, and this vector
- 11:34database we stores all kinds of new
- 11:37informations and we connect with the
- 11:39large language model. So when every user
- 11:41is asking any kinds of question okay it
- 11:44is giving you the response with respect
- 11:46to this particular context okay or
- 11:49knowledge base. So this is called
- 11:50actually context the information it is
- 11:53getting from the knowledge base this is
- 11:54called context that's why it's called it
- 11:55as a context learning on retable
- 11:58augmented generation that means if user
- 12:00is asking anything let's say if user is
- 12:02asking tell me about let's say uh FIFA
- 12:04world cup 2026 right so that time if
- 12:07this information is not available inside
- 12:09LM knowledge base let's say you are
- 12:11using GPT5 here or let's GPT4 here this
- 12:14for information is not available here
- 12:16that that time what it will do it will
- 12:18go to the knowledge base Okay. And let's
- 12:20say knowledge base we have already
- 12:21stored these informations about the FIFA
- 12:23World Cup 2026. So it will fetch this
- 12:26informations from the knowledge base as
- 12:27a context. It will pass to the LLM.
- 12:30Okay. And LM will try to refine the
- 12:32answer and it will give you the final
- 12:33response. Okay. This is called context
- 12:35learningable augmented generation that
- 12:37means rag. Okay. But what was the main
- 12:40problem with this retable augmented
- 12:41generation as well? The problem is that
- 12:43if you are asking anything real time or
- 12:45if you are giving any kinds of
- 12:46automation. Okay. Okay, automation means
- 12:48let's say you are asking to do let's say
- 12:51send a email to the customer A. So that
- 12:55time this kinds of application won't be
- 12:57able to do that because it can generate
- 12:59the email for you but it can't send the
- 13:01email because it doesn't have any kinds
- 13:03of automation tools right or let's say
- 13:06another example I'll give you if you're
- 13:08asking tell me the current weather tell
- 13:10me the latest news for today's so this
- 13:13kinds of application doesn't have any
- 13:14kinds of tools that can use to fetch the
- 13:17real-time informations okay this was the
- 13:19main problem with the lag application
- 13:21okay so that that's why researcher again
- 13:23introduced another
- 13:25technology we call it as a agentic AI
- 13:29okay agentic AI or AI agents whatever
- 13:32you say right so in agentic what it
- 13:34means you'll have your large language
- 13:36model everybody you will be using large
- 13:37language model only okay but the types
- 13:40should be different now this large
- 13:42language model is having your knowledge
- 13:44base connection it's completely fine
- 13:46let's say have connected with the
- 13:47knowledge base it's completely fine even
- 13:49it will also have connection with the
- 13:51tools
- 13:53okay it will also have connection with
- 13:54the tools. Now what is the tools? Tools
- 13:58could be anything. Any kinds of API, any
- 14:00kinds of database, any kinds of let's
- 14:02say uh any kinds of let's say uh tools.
- 14:06Okay, anything. Okay, anything you can
- 14:09call it as a tools. Okay. So let's say
- 14:12you want to send the email. So to send
- 14:15the email guys, what I need? I need
- 14:17Gmail API key, right? So Gmail API,
- 14:20okay, would be one kinds of tool here.
- 14:22Let's say you want to send the message
- 14:23automatically to your WhatsApp. So
- 14:25WhatsApp API would be your tools. So
- 14:27that means whatever application you use
- 14:30especially software application every
- 14:32application having their developer side
- 14:35that means the API. So you can API you
- 14:38you can use that API to perform some
- 14:40kinds of automations right. So that's
- 14:42why these kinds of tools we provide to
- 14:44the uh alm right that means this is our
- 14:49agent. Okay, this is our agent.
- 14:52Okay, we provide 2D agents. Now, if
- 14:55you're asking anything
- 14:57now, it will utilize that knowledge base
- 14:59as well as the tools. Okay, and it will
- 15:01give you the response. Okay, now it it
- 15:05is not only going to use that tool, it
- 15:07can also perform the automation. Let's
- 15:08say you are telling just send the email
- 15:10to the customer A. Now, first of all,
- 15:12what what it will do? Let's say you will
- 15:14send this particular, it will come to
- 15:16the agents. agents will decide whether I
- 15:19have to generate this email from my
- 15:22knowledge base or I need some additional
- 15:24informations. Let's say I'm talking
- 15:26about this uh let's say I'm talking
- 15:29about let's say one website called
- 15:30krishnagin website. So I'm telling just
- 15:33try to send a email regarding our latest
- 15:36webinar to this particular student. Now
- 15:39how it will get the latest given
- 15:41informations definitely I'll try to put
- 15:44these are the informations in the
- 15:45knowledge base right okay about the
- 15:47Krishna so what will happen this
- 15:50informations will come to the LLM lm
- 15:53will try to uh read that and it will
- 15:55prepare a email okay with the help of
- 15:58some kinds of tool now after uh
- 16:00preparing this particular email I also
- 16:03told this email should be sent to the
- 16:05learner right so what it will do it will
- 16:07take the learner's email
- 16:09It will use the email API key to send
- 16:11that particular email. That means
- 16:12everything is being automated here. You
- 16:14are giving a single prompt and all of
- 16:16this process is getting automated. So
- 16:19this is the main benefit with this agent
- 16:21applications. Okay. Now here whatever
- 16:24tools technology we have used we also
- 16:26call it as a harness engineering. Okay.
- 16:30I think you have also probably heard of
- 16:31this name right harness engineering. So
- 16:34don't worry I'm going to take another
- 16:35webinar there. I'm going to tell you
- 16:37about this hardness in engineering now
- 16:39but just now just try to consider
- 16:41whatever tools and technology we use we
- 16:43try to integrate with the large language
- 16:44model or sorry with our agents we call
- 16:47it as a harness engineering so with
- 16:49right we so without API you can't create
- 16:52any kinds of agent applications every
- 16:54aent applications are using these kinds
- 16:57of tools and API okay to perform the
- 16:59automations
- 17:01guys yes or no tell me in the chat guys
- 17:04are
- 17:06It is getting clear all of you.
- 17:09That means in general there are three
- 17:11types of application we usually create.
- 17:14The first type application we create
- 17:15called based application. Okay. There we
- 17:19uh voice is fine guys. Voice is
- 17:21breaking.
- 17:25Just a mate. Let me check
- 17:32now. Is it fine? I think it's it should
- 17:34be fine. I think it's clear, right?
- 17:39Okay. Fine guys. I told you there would
- 17:42be some kinds of uh like technical
- 17:44issues because this is online seminar.
- 17:46Okay. So, please let me know if you are
- 17:48facing any kinds of problem. Definitely
- 17:50I'm going to fix that. Okay. So, let's
- 17:52continue. So, I told you inside
- 17:54generative we create three types of
- 17:56applications. Okay.
- 17:59One is the prompting applications. Then
- 18:01we only send the prompt. Okay, we try to
- 18:03use the prompting. So that's why at the
- 18:05very beginning you saw that whenever uh
- 18:07we got this kind of generative
- 18:09technology, people used to focus on the
- 18:11prompt engineering. Okay, now have you
- 18:14seen anywhere people are using prompt
- 18:15engineering? No. Right? Because things
- 18:17are getting changed, right? Now we are
- 18:19using agentic AI applications. So
- 18:22traditional prompting approach won't
- 18:23work, right? So that's why prompting has
- 18:25been almost uh I'll say deprecated but
- 18:28yeah this has this has become old,
- 18:30right? Yeah.
- 18:36voice is breaking.
- 18:41I think my connection is also good.
- 18:50My connection is good. I think yep
- 18:58voice is clear too, right? Uh yeah,
- 19:00someone is telling uh many people are
- 19:02telling voice is uh voice is clear.
- 19:04Okay, but uh some of you are getting
- 19:06issues. I don't know what is happening.
- 19:33Let me check my mic as well. Yeah, mic
- 19:35is also fine, I think.
- 19:40[clears throat]
- 19:45Now guys, uh is it clear? Am I clear?
- 19:48Right.
- 19:52Okay. Fine. I think I'm clear right now.
- 19:55Okay. Now let's continue. Um yeah. So
- 19:58now what I told you guys? I told you in
- 20:00generative way there are three kinds of
- 20:02application we develop. One is the
- 20:03prompting, one is the context landing or
- 20:05rack and another is the agent
- 20:06applications. Okay. Now you can ask me.
- 20:09Okay. It's completely fine. We got to
- 20:11know in generative there are three types
- 20:14of applications. Okay.
- 20:16we uh we usually develop inside
- 20:20generative eBay. But what is this loop
- 20:23engineering exactly? Okay, why people
- 20:24are talking about the loop engineering
- 20:26nowadays? I think if you open your
- 20:28LinkedIn, if you open your Instagram
- 20:30right now, you will try to see this
- 20:32kinds of loop engineering concept is
- 20:34very trending, right? Even on YouTube
- 20:36channel also lots of creators are
- 20:38creating this kinds of content. Now
- 20:40let's try to understand what is loop
- 20:42engineering whether it's a different
- 20:43field or it is the same thing we usually
- 20:45using okay but we don't know about that
- 20:48we'll just try to uh discuss this
- 20:50particular point
- 20:57yeah I'm going to clarify all of your
- 20:59questions please uh be with me first of
- 21:00all let me clarify okay everything now
- 21:03let's try to see what is loop
- 21:05engineering
- 21:08loop engineering
- 21:11See, I'm going to give you the
- 21:12definition. Don't worry. First of all,
- 21:14let me just give you a high level
- 21:15overview about the loop engineering.
- 21:24Okay. Now see what happens.
- 21:27The same the type three application
- 21:30agent. I'll take this particular example
- 21:32only. Let's say we are having
- 21:36uh we are having
- 21:41one agent.
- 21:44Okay, we are having an agent.
- 21:48Okay, and you know that it has a
- 21:50connection with lots of tools.
- 21:54Okay, tools with with the help of these
- 21:56tools, it can perform some kinds of
- 21:58automations. Okay. And here we are
- 22:00giving the questions and here we're
- 22:01giving getting the responses. Okay. Now
- 22:05the simple AI agents we usually develop
- 22:09it has the two connections only. One is
- 22:11the input. Okay. And another one is the
- 22:15output. Okay. So this is the simple
- 22:18agent uh architecture usually correct.
- 22:21So that means if user is giving any
- 22:22kinds of input these agents will uh
- 22:26decide. Okay. It will use the large
- 22:28language model for the reasoning and it
- 22:30will understand the user requirement
- 22:32based on that it will select a tools and
- 22:34with the help of these tools it will
- 22:35generate that particular response or it
- 22:37will perform some kinds of work and it
- 22:39will give you the output right so this
- 22:41is what actually we usually create okay
- 22:43inside applications but this is not
- 22:46enough okay if you're creating this
- 22:48kinds of agent application this is kinds
- 22:50of oneshot agents you are creating why
- 22:53I'm telling as a oneshot agents because
- 22:55you are giving a out input and you are
- 22:57getting an output there is a direct
- 22:59communications okay there is no there is
- 23:02no any kinds of verifications okay so
- 23:04what happens in real world let's say if
- 23:06I'm learning anything from my teacher
- 23:09right so definitely teacher will give me
- 23:11some kinds of task and I will complete
- 23:13that task and again I will go go to my
- 23:16teacher for the review okay uh teacher
- 23:18will try to review the entire task and
- 23:21he or she will give me the feedback
- 23:23right let's say you have done a mistake
- 23:25here or your uh work is completely fine.
- 23:27Okay, we can approve the your work. So
- 23:29these kinds of feedback is needed
- 23:31whenever you are learning anything
- 23:32whenever you are doing anything for the
- 23:34first time right if you're getting this
- 23:36kinds of feedback if you're getting this
- 23:38kinds of suggestion so it will help me a
- 23:40lot to learn that particular topic in
- 23:42depth but if I'm directly I getting the
- 23:45task and if I'm completing and there is
- 23:47no verification there is no marking so
- 23:49now tell me would it be good or bad
- 23:53definitely this is not a right right way
- 23:55to learn right anything so that's why
- 23:58there should be some kind of
- 24:00verifications. There should be kinds of
- 24:01feedback layer. Okay. So that whatever
- 24:04things we are doing for the first time
- 24:06we get we get a feedback based on that
- 24:08we can improve either we can continue.
- 24:10Okay. Now especially nowadays those who
- 24:13are using any kinds of coding agents. I
- 24:15think you were using coding agents
- 24:16right? Can you name some of the coding
- 24:19agents you were using in your life? So I
- 24:21think the first one you will tell okay
- 24:23sir I'm using cloud code. I'm using VS
- 24:26code copilot. I'm using cursor ID. Okay.
- 24:30I'm using anti-gravity. I'm using
- 24:33codeex. So what is this? What are these
- 24:36informations about?
- 24:38Okay. This information is all about it's
- 24:41a coding agents, right? It's a coding
- 24:43agents. Even charge GPT also we can
- 24:46consider it can also generate the code.
- 24:48Again we don't use charg for the coding
- 24:50purpose. Yes, some someone might be
- 24:53using that. Especially for coding
- 24:55agents, there are some kinds of software
- 24:57they have created for us. Okay. Now, if
- 24:59you have seen the coding agents, what
- 25:02coding agent does? Let's say you are
- 25:03giving a prompt. Just generate let's say
- 25:06a flask project for me or let's say you
- 25:08are giving uh let's say uh my name is
- 25:11Buppy. I done a YouTube channel called
- 25:14DS with Buppy. For this, I need a
- 25:16website. Okay, just try to create this
- 25:18particular website for me. Now, what
- 25:20will happen? your agents will start
- 25:22write the code, right? And it's not like
- 25:24that. Whenever it will start writing the
- 25:26code and once code is prepared, it will
- 25:29directly give you the code. Okay, it's
- 25:30not like that. What coding agent does
- 25:33once it has generated the code, okay,
- 25:35once it has generated the code or any
- 25:37kinds of functions, it will verify
- 25:39whether this code works or not. If you
- 25:41are generating any kinds of buggy code,
- 25:43okay, and if you're giving to me, that
- 25:45time your application is not good to me,
- 25:47right? I'm not going to use your
- 25:48application. if you're giving a buggy
- 25:50code to me so I can even write a better
- 25:53code than your applications right so
- 25:55that's why this kinds of application is
- 25:57having one verification layer nowadays
- 25:59okay so what this verification layer
- 26:02does whatever your agents are generating
- 26:04let's say this is my codeex okay or
- 26:06let's say this is my cloud code it is uh
- 26:09here I'm going to draw another example
- 26:12let's say this is my agent
- 26:16okay here we're giving the input
- 26:19And instead of directly giving the
- 26:21output, it is passing this particular
- 26:23output to a verifier.
- 26:26Okay, verifier. And what this verifier
- 26:28is doing, it is verifying whether the
- 26:31generated code or generated response is
- 26:33fine or not. Okay, if it is fine, it
- 26:36will give you the output directly. Okay,
- 26:38it will give you the output. If it is
- 26:40not fine, what will happen? It will
- 26:42generate the feedback and again this
- 26:45feedback will go to the agent. Okay,
- 26:47this is called actually feedback loop.
- 26:49Okay, this is called actually feedback
- 26:51loop. So this feedback loop will be
- 26:54running unless and until your agent is
- 26:56generating the perfect output for you or
- 26:59perfect code for you. Okay, so this is
- 27:01called actually agentic loop. What it
- 27:04called? This is called actually agentic
- 27:06loop.
- 27:08Okay, now I can show you one realtime
- 27:10example. If you go to the cloud code
- 27:12documentations and if you go go to this
- 27:15code component called how cloud code
- 27:17works. Okay. Now here in this particular
- 27:19sections they have already discussed
- 27:20about this agentic loop. Can you see
- 27:22guys agentic loop? Now here they have
- 27:25already told that whenever user is
- 27:26giving any kinds of prompt. Okay. So
- 27:29what it is doing it is first of all
- 27:30gathering the content taking the
- 27:32actions. Okay. That taking the action
- 27:34means it is generating that code for
- 27:36you. Okay. Because cloud code is
- 27:38specially for the uh coder okay it will
- 27:41generate the code for you. So it will
- 27:43generate the code. So after generating
- 27:45code it is not directly giving you okay
- 27:47instead of that it is trying to to the
- 27:50another layer called verify layer. Okay.
- 27:52And this verify layer will try to verify
- 27:54whether this generating code generated
- 27:57code is fine or not whether it is
- 27:58running or not. Is there any bugs or
- 28:00not? If there is not any kinds of bug it
- 28:02will directly give you it will tell
- 28:04done. Okay, let's say this is your code,
- 28:06just try to use that or else if it is
- 28:08found any kinds of bug, if it founds any
- 28:10kinds of issue, then again it will try
- 28:12to give the feedback to the agents.
- 28:15Okay, it will try the agents. Okay, this
- 28:16is the feedback. It has this kinds of
- 28:18problem again try to regenerate that
- 28:20particular code. Again agent will take
- 28:22the actions. Okay, again it will
- 28:24generate something. Again it will pass
- 28:25to the verification layer. Again
- 28:27verification layer will check if fine it
- 28:30will send done otherwise again it will
- 28:31go to the agents again. That means this
- 28:33is kind of agentic loop is running.
- 28:35Okay, I think you have already studied
- 28:37about the loop in Python, right? How
- 28:39many of you have studied about the loop
- 28:40concept? I know you already already know
- 28:43about loop, right? What loop means? Loop
- 28:46means you are giving a task which would
- 28:49be continuously running and this should
- 28:51be definitely a termination condition.
- 28:54If there is not any kinds of termination
- 28:56condition, this loop would be completely
- 28:58infinite. That means if you send a
- 29:00prompt to the agents, agents will run I
- 29:02mean infinite time. Okay, [laughter]
- 29:05your entire life you have to wait in
- 29:06front of your in front of your computer.
- 29:09Okay, so definitely there should be
- 29:10kinds of some kinds of interruption.
- 29:13Okay, that's why it is telling there
- 29:14should be some kinds of interruption
- 29:16either this interruption you provide as
- 29:18a HITL that is human in the loop either
- 29:21you can assign any kinds of condition
- 29:24either you can give any kinds of maximum
- 29:26iteration limit. Okay. So this thing you
- 29:28will try to provide to the infinite
- 29:30loop. Okay. So that means inside aentic
- 29:33loop there there are main two component
- 29:36the first component is the verifier. The
- 29:38second component is the interruption
- 29:40rule. Get it guys.
- 29:44Is the feedback consist of human in the
- 29:47loop. Uh question I think you have now
- 29:49got it. Not only human you can either
- 29:52use human either you can write any kinds
- 29:54of condition. Okay. Either you can give
- 29:56any kinds of other let's say termination
- 29:59condition. It's completely up to you
- 30:00your design pipeline. It's not necessary
- 30:03to always put the human verifications
- 30:05here. Okay.
- 30:09Okay. Because if you have already used
- 30:11coding agents, so coding agents
- 30:12sometimes it will ask for the human
- 30:14input. If you're giving human input
- 30:16again it will run the loop and once it
- 30:18found like okay this content is
- 30:20completely fine that time this loop
- 30:21would be automatically break. Right?
- 30:23Definitely one condition we know which
- 30:25is that if our generated response is
- 30:28completely fine. Okay, this condition
- 30:30again just try to understand this
- 30:31condition. Once this generated output is
- 30:34completely fine, there is no issue this
- 30:36agent will break this loop. Okay,
- 30:38because user will get the result and
- 30:40this loop would be break, right? But if
- 30:42it is not uh if it is not good, if it is
- 30:45having some kinds of issue, then this
- 30:47root would repeat again. Okay, but there
- 30:51is a possibility every time your agents
- 30:53will generate some buggy code. Okay, and
- 30:55it's not like that you have to always
- 30:57run this again and again. Okay, so there
- 30:59should be some kinds of termination
- 31:00condition in case let's say if your
- 31:02agents is not able to do that. There
- 31:04would be some kinds of termination
- 31:06conditions either you can give set any
- 31:07kinds of maximum iterations either you
- 31:09can ask your human to stop that
- 31:11particular conditions for you. Okay.
- 31:15[clears throat]
- 31:16Yeah, definitely it will use it will use
- 31:19the tool to perform the actions right
- 31:20Krishna agents always remember agents
- 31:23means it has the tool connection none of
- 31:26the agent I mean it doesn't have the uh
- 31:29sorry none of the agents uh don't have
- 31:32the tools okay every agents have the
- 31:34tool
- 31:38got it
- 31:42so whenever I'm talking about
- 31:44applications definitely there would be
- 31:45tool connection without tool
- 31:47we can create the agents. Okay, two
- 31:49would be definitely there.
- 31:52Okay, now I think you have understand
- 31:55how these kinds of coding agent works
- 31:57especially the cloud a code then we have
- 32:00codex we have cursor ID we have my uh
- 32:04viscode copilot okay whatever agentic uh
- 32:08agentic let's say this kinds of coding
- 32:10agents you are using every coding agents
- 32:13use this kinds of agentic look to part
- 32:16uh to uh give you this uh kinds of let's
- 32:19say uh free code. Okay. It's not like it
- 32:22is directly generate. It is not uh it's
- 32:25not like that is directly generating the
- 32:27code for you and it is giving to you
- 32:29before giving to you. It is doing one
- 32:31kinds of verification with the help of
- 32:33verify. Okay. And it is giving you the
- 32:36output. If this particular particular
- 32:38output is good, you will be getting the
- 32:40output otherwise this feedback loop
- 32:42would be running continuously. This is
- 32:44what actually loop engineering is. Okay.
- 32:46This is called actually loop
- 32:47engineering. See this is nothing but our
- 32:50agent concept only only the things they
- 32:53have added this looping concept okay
- 32:55that means we are not going to trust one
- 32:58short response instead of that we'll
- 33:00verify that okay just try to match with
- 33:02your real life whenever you are learning
- 33:04something definitely you need a mentor
- 33:06and mentor will give you the feedback
- 33:08okay you are doing great or this is the
- 33:10issue uh um you are facing okay or let's
- 33:12say this improvement you have to do if
- 33:14you're getting this kinds of feedback
- 33:15right from the teacher itself then you
- 33:18can do something good in your life
- 33:20otherwise you don't know what is
- 33:21happening to you right whatever things
- 33:23you are doing you don't know whether
- 33:24it's right or wrong so that's why one
- 33:26kinds of verification is required so
- 33:28these kinds of verification we add
- 33:30inside loop engineering only and we make
- 33:32this kinds of agent more powerful and
- 33:34whatever output we are getting this is
- 33:36more reliable more safe okay this is the
- 33:39concept of loop engineering is there one
- 33:42agents or one agent for generation
- 33:44another agents for verifications exactly
- 33:47Adil you are right Okay. Now it it not
- 33:49necessary to only use two agents here.
- 33:51There should be multiple agents. Let's
- 33:53say you are creating a blog writing
- 33:56agents. Okay. Now in blog writing agents
- 33:58what happens? One agents would be your
- 34:01topic research. Okay. It will do the
- 34:02topic research. Then it will pass to the
- 34:04another agent. Another agents will try
- 34:06to research this particular topic over
- 34:08the internet. Then it will send to the
- 34:10another agents. Another agent will try
- 34:11to write that. Okay. After writing it
- 34:13will send uh send this particular uh
- 34:16content to the reviewer agents. Okay.
- 34:18Now reviewer is the verifier here. Okay.
- 34:20It will review whether this particular
- 34:21resulted blog is fine or not. If this is
- 34:24fine, it will directly pass to the final
- 34:27response and final response agent will
- 34:29provide uh the final format to the user.
- 34:31Otherwise, it will give the feedback to
- 34:33the where to the again writer agents.
- 34:37Okay, it will give the feedback to the
- 34:38writer agents. Try to improve this.
- 34:40Right. Okay. Again writer agents will
- 34:42work. So this is called actually your
- 34:43agentic loop that time.
- 34:47Get it guys? So it's not necessary to
- 34:49add one agents only. It depends upon
- 34:51your design philosophy whether you are
- 34:53creating a single agent, whether you are
- 34:54creating a multi- aent system.
- 35:01Yeah, this session is recorded Imran.
- 35:03Okay, it it would be recording. So got
- 35:06it guys. So far everyone is clear. If
- 35:08you're clear clear guys, please write
- 35:09clear in the chat all of you. I want
- 35:11confirmation from you. Then I will go to
- 35:13the next part. Let me know guys if
- 35:15you're clear. Still here.
- 35:22Okay. Now we'll try to deep dive into
- 35:25this loop engineering mode. Okay. Don't
- 35:26worry. I have just given you high level
- 35:28overview. Now we'll try to understand.
- 35:30Okay. For this I have created a PP for
- 35:32you. Okay. We'll try to go through this
- 35:33entire PPT and we'll try to understand
- 35:34about this loop engineering. Now let's
- 35:37open this PT and let's try to understand
- 35:39about this loop engineering. So this is
- 35:40the PPT guys. Don't worry I'm going to
- 35:42share with you uh as well. Okay. Now see
- 35:45guys on my screen
- 35:47I have already written the definition
- 35:49about this loop engineering. So as you
- 35:51can see what is loop engineering? Loop
- 35:53engineering means designing an agents
- 35:54that repeatedly works checks its result
- 35:58learn from the feedback and tries again
- 36:00until the goal is achieved. Now you are
- 36:03getting this definition I think uh but
- 36:06if I showed you this definition at the
- 36:08very first time definitely you would you
- 36:10would have the confusions right? That's
- 36:11why first of all I have given you that
- 36:13high level overview okay through this
- 36:15architecture now I think you can
- 36:17understand this particular definition
- 36:18okay what is loop engineering exactly
- 36:20now instead of human continuously
- 36:22telling the agents let's say try again
- 36:24fix this problem check your answer
- 36:26improve the output okay we are using
- 36:29loop engineering concept that means we
- 36:31are writing a agentic loop we are
- 36:33integrating our agentic loop our agent
- 36:35itself is automatically correcting its
- 36:37own mistake okay so pre uh see the main
- 36:40issue with the charg GPT is it doesn't
- 36:42have the looping concept. Yeah, you can
- 36:44generate the code with the chart GPT but
- 36:46it will give you one shot output, right?
- 36:47Let's say I need uh image classification
- 36:51code with tensorflow. It will give you
- 36:53the code but charge GP even don't know
- 36:56whether this code will work or not. So
- 36:58what it will do you will do you will
- 36:59just try to copy that code run in your
- 37:02local machine and you will face any
- 37:03kinds of issue. Again you will copy the
- 37:05issue and you will tell your f uh charge
- 37:08to fix this problem. Again charg will do
- 37:10some research again it will fix that
- 37:12problem again it will give some kinds of
- 37:14code again it will run this code if the
- 37:16if let's say this uh uh is not uh looks
- 37:21good with you again it will tell try
- 37:22again or check your answer improve the
- 37:24output it will give different different
- 37:26manual prompting we don't want that we
- 37:28need some kinds of system this will
- 37:30automatically work for me right so this
- 37:32is called actually agentic agentic loop
- 37:35application especially whatever coding
- 37:37agents we are using nowadays
- 37:39getting
- 37:42how it's a different from a deep
- 37:43learning model. Deep learning model is
- 37:45different. Okay, deep learning model
- 37:46means it's a predictive model. But here
- 37:49we are working with the generative
- 37:50model. Hubernus
- 37:53is it very token heavy? uh definitely uh
- 37:56whenever you are creating this kinds of
- 37:58uh let's say agentic loop uh especially
- 38:02uh it will cost more tokens than your
- 38:04simpler agents because every time it has
- 38:07to take the output it has to verify it
- 38:10will give the feedback again based on
- 38:12the feedback it will work again will get
- 38:13the output so this kinds of loop is
- 38:15going right so definitely some uh I mean
- 38:18token heavy would be available that's in
- 38:20this case of um um I mean um coding
- 38:23events is having a subscript
- 38:25subscription plan. Okay, they will take
- 38:26good amount of money from you. Why?
- 38:28Because of this token. Okay, you are you
- 38:32are spending the tokens here, not
- 38:33anything else. So none of the coding
- 38:36agents are free nowadays. If you're
- 38:37using any kinds of coding agents, you
- 38:39have to pay for that. Okay.
- 38:43Yeah. Now let's try to see one example.
- 38:47Let's say in our traditional aentk
- 38:49application, not traditional. Yeah.
- 38:51See it's not like that you always need
- 38:53to add the verification layer inside
- 38:54your agents. It depends upon the problem
- 38:57statement. Let's say you're creating a
- 38:58coding agents that needs the
- 38:59verification. But if you're creating a
- 39:01simple let's say a simple let's say uh
- 39:04trip planner agents that will only plan
- 39:06the trip for you. That mean this kinds
- 39:08of verification is not required. So I'll
- 39:10give a trip topic and it will do some
- 39:12research over the internet and it will
- 39:14give me the plan. Let's say I want to
- 39:16visit from Bengal to Japan, right? So I
- 39:20need a trip plan like uh in Japan which
- 39:23place I have to visit, what kinds of
- 39:25food I have to eat, right? So these
- 39:26kinds of things we can easily do with
- 39:28the help of these kinds of agents. Okay,
- 39:29we don't need any kinds of verification
- 39:31layer here. So again it depends upon
- 39:33your problem statement. If your problem
- 39:36statement needs a verifications that can
- 39:38go with loop engineering concept
- 39:39otherwise the simple agents whatever you
- 39:41have learned so far. Okay.
- 39:44So this is what your simple approach
- 39:47that means if user is asking anything
- 39:48agent is returning the answer in one
- 39:50shot. There is no verifications. Okay
- 39:52you are getting the output and this
- 39:54agent is getting stopped terminated. In
- 39:56loop engineering in agentic loop what is
- 39:59happening? User is asking a questions.
- 40:01Okay it is going to the agents. Agents
- 40:03is generating something. This generation
- 40:05is giving to the feedback layer. Okay.
- 40:06Feedback lane or verify. Verify will try
- 40:09to verify whether this particular result
- 40:11is fine or not. If it is fine, it will
- 40:13return otherwise again it will return
- 40:15you the feedback. That means this loop
- 40:17will continuously run.
- 40:20Okay,
- 40:21great guys. So that's why a normal AI
- 40:24call usually gives one response and
- 40:26stops. Okay, that is fine for the simple
- 40:28question answer but risky when the task
- 40:31has many requirement especially the
- 40:33coding agents. Okay. Uh a loop adds a
- 40:36check uh checking st if the output fails
- 40:38feedback goes back into the agents for
- 40:41another attempt. Okay. So simple media
- 40:44answer once this is risky. Okay. But if
- 40:47you check and improve this is more
- 40:48reliable.
- 40:52Yeah. You were right. Okay.
- 40:57H. Now let's take one very simple
- 41:00example. I already taken that classroom
- 41:03example. Let's see if you are a learner.
- 41:05So first of all your teacher will give
- 41:07you something any kinds of task. Let's
- 41:08say you are giving exams. So after
- 41:10giving these exams you are giving this
- 41:12exam paper to the teacher teacher is
- 41:14giving you some kinds of feedback some
- 41:16kinds of improvement you are again um I
- 41:19mean doing that particular task okay
- 41:20that's how we usually learn right
- 41:24okay now we can see simple definition
- 41:27loop engineering means designing an AI
- 41:29agents that can generate work evaluate
- 41:31the result receive feedback try again
- 41:33and stop when the goal is met okay that
- 41:36means generate check improve repeat so
- 41:38this is the architecture of uh loop
- 41:41agents. Okay. Now this is the classroom
- 41:43analogy I have already given you. Yeah.
- 41:46Now non- aent loop. Let's try to
- 41:49understand in non-agent loop. What will
- 41:51happen? User is giving a goal. It will
- 41:53generate once. Okay. Return the answer.
- 41:56Your agents will stop. There is no
- 41:57repeatation. There is no looping. Right?
- 41:59Example a customer support reply. So it
- 42:02will write customer support reply and it
- 42:04will stop. Okay? Okay, if you are using
- 42:07agentic loop that time what will happen?
- 42:09It will write the customer support
- 42:11message. Okay, it will understand first
- 42:13of all customer customer let's say
- 42:16intention customer let's say uh feelings
- 42:19based on that it will write the message
- 42:21to you. Let's say someone is asking sir
- 42:23uh I need to I I need a uh I need a
- 42:25carrier guidance uh from you. I'm not
- 42:29getting a job. That means this person is
- 42:31get frustrated right? So the way I have
- 42:33to reply to this particular letter that
- 42:35would be kinds of different tone but if
- 42:36I'm telling uh let's say I I can't help
- 42:40you with that or let's say go go ahead
- 42:42and try to find a job okay so this is
- 42:44not a right tone so I have to understand
- 42:46the customer behavior customer feelings
- 42:49based on that I have to generate the
- 42:51response okay so that's why if this
- 42:53kinds of uh response you are generating
- 42:56with the help of non uh loop aents that
- 42:59time there is a possibility it will only
- 43:00generate this answer runtime it will not
- 43:03even verify whether this is perfect for
- 43:04this user or not and user will not
- 43:07interest in your applications right it's
- 43:09better to have a verifications so that
- 43:12it will understand this output uh and it
- 43:15will verify okay whether this is match
- 43:18with this customer or not okay I hope
- 43:20you got it guys
- 43:22how feedback is giving to the agents
- 43:26I'll tell you this part see here you can
- 43:28understand okay how this feedback is
- 43:29going to the agents now see whenever
- 43:31where user is giving any kinds of input
- 43:33to the agents. Agents is generating
- 43:34something. Okay. And here you have the
- 43:37verifier. Okay. Now if this particular
- 43:39answer is good, it will directly send
- 43:41you this output. Okay. Otherwise this
- 43:44verification will give you feedback.
- 43:45Okay. Feedback means it will check this
- 43:48output and definitely the verifier we're
- 43:50using this would be a kinds of this
- 43:53would be kinds of agent. Okay. See this
- 43:55verifier you are using right? This
- 43:57should be also kinds of agent. it it
- 43:59will also have some kinds of language
- 44:01language model okay to understand this
- 44:04particular output now here there are
- 44:06different different techniques you can
- 44:07use either you can use your custom
- 44:09agents either you you can use some kinds
- 44:12of tool here okay I'm going to show you
- 44:14two approach today we'll be creating one
- 44:16agents with the help of uh our own
- 44:19custom agents with the help of large
- 44:20language model even I'm also going to
- 44:22show you an amazing tool called test
- 44:24sprite okay with the help of test sprite
- 44:26also you can create this particular
- 44:27verifier
- 44:29Do we have framework for the
- 44:31implementation the loop or it has to be
- 44:33custom function? See this is just a
- 44:36custom things. Okay, you have to create
- 44:38this particular verifier whether
- 44:40whenever you are creating any kinds of
- 44:41agents. Okay, let's say you're creating
- 44:43a blog wring agents. So after generating
- 44:45the blog just try to create another
- 44:46agents to verify that particular blog
- 44:48before publishing it getting Rajes. So
- 44:51this is a custom things you are writing
- 44:53that things. There is no direct
- 44:55framework you can integrate here. Okay.
- 44:57But there are some tools definitely you
- 44:59can use to create this particular
- 45:01verifier. Okay. Some more tools are
- 45:03available. One of the tools we'll be
- 45:05using called sprite. Okay. I'm going to
- 45:07show you these tools as well how to work
- 45:08work with that tool.
- 45:10Okay. Don't worry. So this particular
- 45:14verifier will verify this answer or this
- 45:16output. If it is good it will return
- 45:18otherwise it will give the feedback to
- 45:20the agents again based on the feedback
- 45:22agents again it will work and it will
- 45:24generate another output and again
- 45:26verifier will check that. So that's how
- 45:28this loop will continuously run unless
- 45:29and until we are not getting our actual
- 45:32output. Okay, whichever we are expecting
- 45:34from the agents. This is what actually
- 45:36our goal. This loop should not be
- 45:38infinite loop. There should be some
- 45:40kinds of termination condition. Either
- 45:42you can terminate with the help of HITL,
- 45:45either you can give any kinds of maximum
- 45:46iteration. Either you can Okay, either
- 45:50you can provide a different condition
- 45:51for that. Okay. So that's why you will
- 45:54see that in this loop agents what will
- 45:56happen? First of all, it will generate
- 45:57an answer. Evaluate an that particular
- 46:00answer. If it fails, create the
- 46:02feedback. Try again with the feedback.
- 46:04Stop when this passes or reaches the
- 46:06limit. One thing you have to remember
- 46:08important things, a loop must have a
- 46:11stopping rules otherwise the agents may
- 46:13keep spending tokens and time without
- 46:15reaching the better result. So that's
- 46:17why one termination condition is super
- 46:19important here. Okay. Now we'll try to
- 46:22understand how this termination
- 46:24condition we can add. Okay. So whenever
- 46:26we see the practical I'll show you this
- 46:27part as well. Now see this is what our
- 46:30actually this verifier this is what our
- 46:34custom verifier that means we're using
- 46:35some kinds of low language model some
- 46:37kinds of agents here right but one one
- 46:40more architecture I want to show you you
- 46:42can create with the help of test pride
- 46:43verifier so let's say this is your
- 46:45agents it is uh getting a Google your
- 46:48agents is running okay let's say it it
- 46:51has generated one uh website it this
- 46:54website is live okay on the server and
- 46:57you have used This test sprite verifier.
- 46:59Okay, test sprite is a tool. Okay, I'm
- 47:01going to tell you it's a testing tool.
- 47:03It's a testing tool. You can test your
- 47:05applications. So, this tool
- 47:06automatically checks your application is
- 47:08having any kinds of bugs or not. If it
- 47:10is found any kinds of bugs, okay, what
- 47:12will happen? It will generate some kinds
- 47:14of bug snapshot. Snapshot means it will
- 47:17understand the bugs where it found the
- 47:19bug. What is the problem? It will
- 47:21automatically understand. Okay? And it
- 47:23will generate a snapshot. Okay? This
- 47:26this snapshot will go to the agents
- 47:27again. Now agents will understand okay
- 47:29so I have a problem in this particular
- 47:31section in this particular line this is
- 47:32the problem. Now it will again that take
- 47:35this particular snapshot it will improve
- 47:36the code again it will make it live
- 47:39again test sprite will check that if now
- 47:41it is found completely good it will send
- 47:43the pass and you will achieve your goal.
- 47:45Okay otherwise this loop will
- 47:47continuously learn would be some kinds
- 47:49of stopping condition. Okay either you
- 47:52can stop either you can set some kinds
- 47:54of maximum iteration from your end.
- 47:56Okay, now you can see the coding agents
- 47:58builds or change the app. Test sprite
- 48:00checks the live app. Test sprite says
- 48:02pass or fail. The agent uses the failure
- 48:05evidence to fix the issue. Test sprite
- 48:07return the same verifications. So the
- 48:09loop is agent acts test sprite verify
- 48:12agent fixes test price verify again. So
- 48:14this is what our loop is running here.
- 48:19Okay.
- 48:21Huh. kinds of treatment you can say but
- 48:23this is kinds of different purpose we'll
- 48:25be using okay I'm going to do this part
- 48:27don't worry okay stay with me I'm going
- 48:29to clarify each and everything
- 48:34okay now see um we'll try to understand
- 48:37this anatomy of a good good loop that
- 48:40means inside a good loop what are the to
- 48:41uh things should be available definitely
- 48:43the goal observation feedback actions
- 48:46evaluation and most importantly the
- 48:48stopping rule okay without stopping rule
- 48:51didn't create any kinds of loop guys.
- 48:54Okay, so simple formula loop is equal to
- 48:57Google plus action plus evaluation
- 48:59feedback plus stopping conditions. If
- 49:01you combine all of them, you'll be
- 49:02writing a good loop inside your agents.
- 49:05Now let's try to see the difference
- 49:07between non-loop agents and loop agents.
- 49:09Now non-loop agents answer once. Okay,
- 49:12fast and simple, low cost, no automatic
- 49:16self corrections best for low-risk task.
- 49:18Okay. But in on the other hand, loop
- 49:21agents can try multiple times, checks
- 49:23the output, uses feedback to improve,
- 49:26higher cost, best for multi-step task.
- 49:29Okay. So this is the difference between
- 49:30your non-loop agent and loop agents. Now
- 49:33we can decide which one you have to use
- 49:35based on your requirement. If your
- 49:36requirement is having a reliability mode
- 49:39that time you can use loop aence. If
- 49:41your problem statement is having some
- 49:43kinds of low-level task that time go
- 49:45with non-loop agents. Okay? It's
- 49:47completely up to you because if you're
- 49:49going with loop agents definitely there
- 49:50would be higher cost because of the
- 49:52tokens. Okay. But if you're going with
- 49:53the non-loop agents there would be lower
- 49:55cost because it generates the output
- 49:57only one shots.
- 49:59Okay. So here speed matters here quality
- 50:01matters. So whenever you are worrying
- 50:03about the speed you need a faster
- 50:05response that time go with non-loop
- 50:06agents because it runs one time. But
- 50:08whenever you need quality that time go
- 50:11with okay loop agents because if you are
- 50:14using scans of quality agents I will you
- 50:16will see that here time doesn't matter
- 50:18okay we we can wait until our execution
- 50:21is over we only wait for the quality of
- 50:24the output we are getting from the
- 50:25coding agent right so here time doesn't
- 50:27matter so that's why they're using loop
- 50:30agents but if you're worrying about the
- 50:32time especially charge we need a faster
- 50:35response that time we'll be using non
- 50:37loop agents I think you are getting
- 50:39like I'm doing a self projects I will
- 50:41manage that with prompt only but for
- 50:44quality it's required yes okay
- 50:48so one line you can tell in non-loop
- 50:51agents answer once a loop agents work
- 50:53checks improve and repeat
- 50:58yeah we'll we'll do the project okay
- 50:59definitely I'll show you the practical
- 51:01don't worry okay stay with me I'll show
- 51:02you two practical one practical we'll
- 51:04develop with the custom agents we'll
- 51:07create a custom verification. Okay,
- 51:09verifier and one more agents will be
- 51:11creating. Okay, especially see this this
- 51:13thing test sprite we use with the
- 51:15existing existing actually uh um loop
- 51:18agent that means our coding agents
- 51:20either you are using copilot codeex okay
- 51:23or let's say cursor ID then you will be
- 51:24using test plate so both I'm going to
- 51:26show you I'm going to show you
- 51:27application level
- 51:29even I'm also going to show you the
- 51:31existing uh agents we are using how to
- 51:34integrate these things okay this
- 51:36verifier I'm going to show you
- 51:40I will send you Okay, everything don't
- 51:41worry. Okay,
- 51:44now let's take one example of this uh
- 51:46coding agents. Um so sorry uh let's try
- 51:50to take an example of this loop
- 51:52engineering. I'll take this coding agent
- 51:54example. So the agents write the code
- 51:56runs tests. Okay, read the error, fix
- 51:58the codes and runs the test again. Okay,
- 52:01that means in coding agents what
- 52:02happens? You are writing the code, your
- 52:04code is getting verified if found the
- 52:05bugs. Okay, again it will give the
- 52:07feedback again your agents will write
- 52:09that. And once it is fixed you will get
- 52:10the output. Okay. So typical coding loop
- 52:13is issue generate the code run test read
- 52:15errors fix code reset final patch. Okay.
- 52:19Stopping condition all test pass or the
- 52:21agent reaches the maximum number of
- 52:23repair items. Okay. So this is our
- 52:24termination condition here. Okay. Now
- 52:27one example is uh travel planning. Let's
- 52:30say you want to build a very robust
- 52:32travel planner. It will generate a
- 52:35travel travel plan for you. First of all
- 52:37it will check the hotel. It will checks
- 52:39the different different places. It will
- 52:41also check the flight. Okay. So it needs
- 52:43a different verifications. Let's say if
- 52:45I if I'm using aent so there is a
- 52:47possibility it will generate a dummy
- 52:49flight for you. Okay. Let's say this
- 52:51flight doesn't exist. But if I'm using a
- 52:53verify this verify will verify whether
- 52:55this flight is exist or not. If exist
- 52:58okay what time? Okay. What date? Which
- 53:01input? Again it will verify everything.
- 53:03Then it will give you the final
- 53:05responses.
- 53:10Okay. So as you can see um loop checks
- 53:14is within the budget are dates valid is
- 53:17travel time realistic are hotels
- 53:20available does it follow user
- 53:22constraint? Okay. So these are the
- 53:24checks it will do in the loop itself. If
- 53:27it is matches then you will be uh
- 53:29getting the final uh travel planning uh
- 53:33output otherwise this loop will
- 53:34continuously run unless and until you
- 53:37are getting this particular response.
- 53:41Okay
- 53:44H
- 53:51now let's do the final recap. As you can
- 53:54see in loop engineering um we'll do
- 53:58definitely the looping concept. So
- 54:00whatever things we have learned so far
- 54:02the non loop okay the basically it
- 54:04answer once and stop use for simple and
- 54:08lowest task and loop work check improve
- 54:12and repeat until the result passes.
- 54:14Evaluator will evaluate the quality of
- 54:17the answer we are getting. You can even
- 54:20add the guardrails okay if you want.
- 54:22Let's say nowadays people are also
- 54:23integrating guardrails safety right uh
- 54:26to prevent the violation okay or let's
- 54:28say any kinds of sexual content or let's
- 54:30say any kinds of harmful content okay so
- 54:33they're using guardrails to prevent that
- 54:36you can either integrate guard this is
- 54:38optional okay but if you're creating
- 54:40agent application I'll suggest you also
- 54:41use the guards here then definitely
- 54:43there would be a stopping conditions
- 54:45that means your agent should not be
- 54:48infinite okay infinite loop there would
- 54:51be some kinds of stopping conditions.
- 54:56H evaluation is a later step. Uh I mean
- 55:00after creating your agents you can do
- 55:02the evaluations but guards should be
- 55:03added. Okay, guards is important here.
- 55:06So that's why there is another PP you
- 55:08can see guards inside the loop. If you
- 55:10want you can add a guards. Okay, guard
- 55:12means whether the content you are
- 55:15getting from the user this is safe or
- 55:17not. Okay, this is safe to execute or
- 55:19not. So this is what actually you have
- 55:21to add inside the guardrails.
- 55:24Great. H So yes uh this is all about our
- 55:28loop engineering understanding at least
- 55:32on the theoretical level. Now guys are
- 55:35you clear the entire concept I told you
- 55:38about this loop engineering. If you are
- 55:39clear then I will go to the practical
- 55:41implementation right now.
- 55:45guardrails rule is that let's say if
- 55:48user is giving one input so let's say
- 55:50I'll take this example
- 55:53okay let's say you are using the coding
- 55:55agent okay you are using a coding let's
- 55:57say you are using uh client desktop or
- 56:00sorry uh not you are using let's say
- 56:02co-pilot Microsoft copilot okay so now
- 56:06you're telling Microsoft copilot to
- 56:09write a code to hack Google platform now
- 56:13tell me will your Hope it will write
- 56:16that code for you. Just try it right now
- 56:18and tell me definitely you will see that
- 56:20it will tell no I can't help you with
- 56:22that. It doesn't meet with our
- 56:25guardrails. Right? It doesn't meet with
- 56:28our policy.
- 56:30This is what your guardrails. That means
- 56:33if you're doing any kinds of illegal
- 56:35related task, if you're giving any kinds
- 56:37of illegal related prompt which is
- 56:39having a violation which is having uh
- 56:42let's say
- 56:44um I mean uh harmful related content. So
- 56:47these kinds of work your agents will not
- 56:50work. Okay. This is called actually
- 56:52guardress. The role of the address
- 57:00it's provides security on the AI
- 57:03generated things. Yes, exactly.
- 57:07Yeah.
- 57:10Okay.
- 57:11H
- 57:14now I will go to the practical uh
- 57:17development. First of all, we'll try to
- 57:19develop this this architecture. Okay,
- 57:23first of all, we'll work on this this
- 57:24architecture. That means here we'll try
- 57:27to create a multi- aent system and here
- 57:29we'll try to write a verification
- 57:32agents. Okay. So, whatever answer,
- 57:35whatever result we'll be getting from
- 57:37our agents first of all, we'll verify
- 57:38that if this verification meets then
- 57:41we'll continue otherwise we'll give the
- 57:43feedback to the agents again. Okay. So
- 57:45for this example I'm going to take one
- 57:48uh very simple example uh so that
- 57:50everyone can understand because I know
- 57:51that in this webinar there are different
- 57:53types of learners are available. Some of
- 57:56the learners are completely beginners.
- 57:57Some of the learners are intermediate.
- 57:59Some of the learners are advanced. Okay.
- 58:00So I have to take uh take care everyone.
- 58:02So that's why I'll take a very simple
- 58:04example. We'll be creating a blog
- 58:06writing agents. Okay. We'll be creating
- 58:08a blog writing agents multi- aent blog
- 58:10writing agents and there we'll try to
- 58:11integrate this agentic loop. Okay. And
- 58:14even after that I'm going to show you
- 58:16this application level verification as
- 58:18well. Let's say if you're using
- 58:20Microsoft VS code. Let's say uh I think
- 58:23you use VS code right.
- 58:26Let's say this is our VS code. So in VS
- 58:28code you have the agents as well. Right?
- 58:30Here we give the prompt and this uh uh
- 58:33copilot will generate the code for me.
- 58:36So this is one kinds of coding agents.
- 58:38Then you will be using cursor ID codeex
- 58:40right
- 58:42code. So these are the coding agents. So
- 58:44how we can utilize test sprite as a
- 58:46verifier in this kinds of existing uh
- 58:49agentic applications? We'll also try to
- 58:51see this example as well. Okay, both
- 58:52example I'll show you first of all this
- 58:54example then this example. Okay, we'll
- 58:56try to see both example.
- 58:59Okay fine. So for this let's try to uh
- 59:02create a folder here. So I'm going to
- 59:04create a folder and I'm going to name it
- 59:07as let's say uh
- 59:14I'm going to name it as let's say
- 59:17loop agent
- 59:22okay sale correcting agent whatever name
- 59:24you can give it's up to you here I'm
- 59:26going to open up my terminal
- 59:34And I'm going to open up my visual code
- 59:36studio here.
- 59:44H So I believe everyone is having VS
- 59:46Code Anaconda installed in your system.
- 59:48Yes or no? I'm expecting you have these
- 59:50are the tools, right? These are the
- 59:53things are common. I'm not going to
- 59:54repeat it again. Okay.
- 1:00:09H. [clears throat]
- 1:00:19Okay. Now see guys uh the agents I'm
- 1:00:21going to develop. Uh first of all let me
- 1:00:24show you the architecture.
- 1:00:30So this is the agents I'm going to
- 1:00:31develop
- 1:00:33save correcting multi- aent system with
- 1:00:37the help of loop engineering. So this is
- 1:00:39the architecture. So he here user will
- 1:00:41give a questions. Okay that means the
- 1:00:43blog topic
- 1:00:45and what will happen
- 1:00:48uh this will go to the writing agents.
- 1:00:50Okay writing agents will write that.
- 1:00:52Okay, see for the simpler purpose here
- 1:00:54I'm not going to add any kinds of tools.
- 1:00:56You can integrate any kinds of tool if
- 1:00:58you want. You can integrate any internet
- 1:01:00search tool which is tably SAR API.
- 1:01:03Okay, you can use anything but for the
- 1:01:05simpler purpose I'm going to directly
- 1:01:06invoke the large language model to
- 1:01:08generate the content for us. Okay, then
- 1:01:10what will happen? This writer agents
- 1:01:13will write something and this is our uh
- 1:01:16verifier. Okay, this agents will be
- 1:01:18creating for the verification. That
- 1:01:20means whatever writer agent is writing
- 1:01:23before I give this particular content to
- 1:01:26to my uh let's say user first of all
- 1:01:30I'll try to give to the reviewer agents
- 1:01:32reviewer agents will try to review that
- 1:01:34okay it will try to verify that whether
- 1:01:37this written content is good or not now
- 1:01:40definitely there should there should be
- 1:01:42some kinds of condition will add what
- 1:01:44kinds of what kinds of let's say blog I
- 1:01:47want what kinds of content I want from
- 1:01:48the writing agents. Let's say someone
- 1:01:50pref someone will prefer beginner
- 1:01:53friendly more clear. It will also have
- 1:01:56the examples. Okay. So these are the
- 1:01:58let's say my rules. Okay. Whenever I
- 1:02:01want to generate some kinds of content
- 1:02:02from my agents, I should have some kinds
- 1:02:05of rules. Let's say every time whatever
- 1:02:07content it is generating, it should have
- 1:02:09a beginner friendly okay beginner
- 1:02:11friendly
- 1:02:13discussion. It will also have some kinds
- 1:02:15of example. Okay. It will also have some
- 1:02:18kinds of let's say code example any
- 1:02:21kinds of rules you can assign here. So
- 1:02:23my reviewer agents will try to review
- 1:02:25that whether it is meet uh meeting that
- 1:02:27particular criteria or not. If it is
- 1:02:30meeting the criteria this will pass that
- 1:02:31that means user will able to see the
- 1:02:33final answer. Okay. Otherwise what will
- 1:02:36happen? It will send this particular
- 1:02:39okay it will send this particular
- 1:02:40feedback to the revi uh revisor agent
- 1:02:44again. Okay. Either you can directly
- 1:02:46send to the writer again agent again but
- 1:02:48you can also create a different agent
- 1:02:50for that for the revision operation that
- 1:02:52means whatever writer agent has done
- 1:02:54some mistake you already captured inside
- 1:02:57this writer agents okay so reviewer
- 1:02:59agents that means all of the feedback
- 1:03:01now this feedback you are giving to the
- 1:03:02another agents called re reviser agent
- 1:03:05okay reviser will try to revise that
- 1:03:06that means whatever content I generated
- 1:03:09again I'll try to improve that okay
- 1:03:11based on the feedback after improving
- 1:03:13that I'll try to I'll try to send to the
- 1:03:18reviewer. Okay, reviewer will again try
- 1:03:20to review. Again, it will check whether
- 1:03:22this particular things are perfect or
- 1:03:24not. If perfect, it will give you the
- 1:03:25final answer. Otherwise, again, it will
- 1:03:27give the feedback to the revisor agents.
- 1:03:29That mean this is the loop we are
- 1:03:30creating here. I think you can see this
- 1:03:32is the loop guys here. Okay. Now,
- 1:03:34instead of reviser agent, you can
- 1:03:35directly also pass to the writer agents.
- 1:03:37But here, I'm going to create a reviser
- 1:03:38agent. Okay. This is completely your
- 1:03:41design philosophy. Okay. You can either
- 1:03:43keep only one agent either you can keep
- 1:03:45multiple agents. You are designing your
- 1:03:47own agents. Okay. So the way I'm
- 1:03:49creating it's not necessary to create
- 1:03:51it. Okay. You can also change this
- 1:03:53architecture as per your requirement.
- 1:03:55Okay. So here what is the stop condition
- 1:03:58reviewer get it passed that means once
- 1:04:00it is passed either maximum revision
- 1:04:02limits. Okay. We'll try to add the
- 1:04:03iteration limits. Let's say after five
- 1:04:06iteration if we are not able to get the
- 1:04:08output whatever final output we got
- 1:04:11we'll try to show as a final answer
- 1:04:13answer okay so this is what our stop
- 1:04:15condition is here
- 1:04:17so are you clear guys with this
- 1:04:18architecture yes or no tell me clear
- 1:04:21this architecture you are getting the
- 1:04:24loop condition you are getting now let's
- 1:04:26try to implement with the help of lang
- 1:04:27graph okay I'll be using lang graph
- 1:04:29framework to implement this particular
- 1:04:31agents now how many of your family with
- 1:04:33lang graph here guys tell
- 1:04:35Lang graph is a aentk orchestration
- 1:04:37framework. Okay. With the help of
- 1:04:38langraph we create aentk applications.
- 1:04:41Okay. If you are not famili familiar
- 1:04:42guys I think on krishna academy there
- 1:04:45are different different courses
- 1:04:46different different tutorials are
- 1:04:47available on the langraph. You can go
- 1:04:49ahead with that. Okay.
- 1:04:51I think it will help you a lot to
- 1:04:53understand. Again uh I'm going to
- 1:04:55explain in a simpler manner. I think you
- 1:04:57will try to understand.
- 1:04:59Fine. So let's try to use langraph to
- 1:05:01implement this uh this self correcting
- 1:05:04multi-agent system. Okay. So for this
- 1:05:06I'm going to open up my VS code and here
- 1:05:08first of all I'm going to do the project
- 1:05:10setup. Okay. So first of all here I'm
- 1:05:13going to uh write a readme file.
- 1:05:16Here I'm going to show you all the
- 1:05:18commands you need to execute.
- 1:05:21First of all you have to create the
- 1:05:22environment. Okay. So contact create
- 1:05:24rate.
- 1:05:25You can also use UV but I'm going to use
- 1:05:27cond
- 1:05:29N. You can give the environment name.
- 1:05:31Let's say I'll give agent.
- 1:05:35Okay.
- 1:05:37Agent test or anything you can give.
- 1:05:40Then you can take the Python. Let's say
- 1:05:41Python is equal to uh 3
- 1:05:4511. Okay. Or you can also take it as a
- 1:05:48demo. Okay. It's up to you. Any kinds of
- 1:05:49name you can take from here and you can
- 1:05:51give the yes permission. So this is what
- 1:05:53you have to execute to create the
- 1:05:54environment for you. Now I'll copy this
- 1:05:57uh okay command and execute from your
- 1:06:00terminal. Okay. So I already have this
- 1:06:02environment guys. I'm not going to
- 1:06:03create but if you don't have you have to
- 1:06:04create this environment. Okay. So after
- 1:06:06creating that you have to activate this
- 1:06:07environment. So for this you have to
- 1:06:09write this command ponda activate.
- 1:06:12Okay demo.
- 1:06:18So ponda activate demo. So see this is
- 1:06:20our environment I already created. Okay,
- 1:06:22but if you don't have, please try to
- 1:06:23create. Okay, after creating it, you
- 1:06:25have to install the requirement. So,
- 1:06:27let's write pip install
- 1:06:31r requirement.
- 1:06:34Okay, [clears throat]
- 1:06:37requirements
- 1:06:39txt. Okay, so we'll be creating a
- 1:06:41requirement.txt file here
- 1:06:44and inside that I'm going to mention all
- 1:06:46of this requirement I need.
- 1:06:48Yeah, you can also use UV. Okay, there
- 1:06:50is no issue. any kinds of package
- 1:06:52manager you can use. Now here I need
- 1:06:55some of the package guys. So here I'll
- 1:06:57be using these are the package langraph
- 1:06:58langchain. I'll be using gro provider
- 1:07:01guys to access the large language model
- 1:07:03because I know that many people doesn't
- 1:07:04have the open API key. That's why we'll
- 1:07:06be using free model. Okay. Python dnb to
- 1:07:09manage the environment variable. That
- 1:07:10means here we'll try to mention all of
- 1:07:12the API key and everything. Identic for
- 1:07:15the uh structured output. Fast API will
- 1:07:18be also creating a simple user interface
- 1:07:19and backend API with the help of fast
- 1:07:21API. UNO is the dependency package of
- 1:07:24fast API and ginger 2 also dependency
- 1:07:26package of fast API. Okay. Now simply
- 1:07:28you just need to copy this command
- 1:07:30and execute from the terminal. Okay. It
- 1:07:32will install all of the necessary
- 1:07:34package in your environment. So for me
- 1:07:36it is already uh telling it's satisfied.
- 1:07:38Okay. One thing you will be doing which
- 1:07:40is you have to take the version of the
- 1:07:42package. Okay. Otherwise, if you're
- 1:07:44running this project after uh let's say
- 1:07:46one month, there is a possibility this
- 1:07:48project should not be run because there
- 1:07:50should be some kinds of dependency
- 1:07:52change. That's why always you have to
- 1:07:53track the version. So for this you can
- 1:07:55write pip list and you can check the
- 1:07:57version. Okay. So these are the version
- 1:07:59just try to take one by one and add it
- 1:08:02here. Do pip freeze operation because
- 1:08:05pip freeze actually saves all of these
- 1:08:07package but I don't want that. I only
- 1:08:09want to add the version I'm using here.
- 1:08:11Add the package I'm using here. Let's
- 1:08:13say lang graph. Okay. So for lang graph
- 1:08:15I'm using this version. So I'll copy
- 1:08:16this version and add it here.
- 1:08:20Now find for langen.
- 1:08:23For langen
- 1:08:26I'm using this version. Copy that. Add
- 1:08:29it here. So this looks like more clean.
- 1:08:31Okay. I like this approach. Okay. Then
- 1:08:34langen gro.
- 1:08:36Lenchen gro. Langen. Lenchen.
- 1:08:39Langen gro. I'll copy this.
- 1:08:42and add it here.
- 1:08:45Okay, I think I have done some mistake.
- 1:08:48Lang chin growth 1.1.3. Copy that and
- 1:08:52add it here.
- 1:08:55Now, Python envy
- 1:08:58Python.v Python. Env this one.
- 1:09:06Yeah. Pip list.
- 1:09:09Then identic
- 1:09:20past API
- 1:09:31then econ
- 1:09:39And last we have ginger too.
- 1:09:51Okay. Yeah. So I have captured all of
- 1:09:53the version. Okay. Now this is more
- 1:09:55clear enough. Okay. Instead of preap
- 1:09:57phrasing I only have uh mentioned those
- 1:10:00are the package actually I'm using here.
- 1:10:02Langen uh verb is not copied properly.
- 1:10:06Langen. Okay. Uh let me check. Lenin.
- 1:10:09Langen. Lenin. Okay. A good observation.
- 1:10:11I'll copy this and mention it here.
- 1:10:14Okay. Now I think it looks good, right?
- 1:10:16Yeah. So now you just keep it this
- 1:10:18requirement with you. So if you're
- 1:10:20running this project after one year
- 1:10:21also, there should not be any kinds of
- 1:10:22problem because you have already
- 1:10:24captured the version. Okay. Fine. Now
- 1:10:28next thing guys, I have to collect the
- 1:10:29API key. So here I need some API key
- 1:10:31guys. Uh I need actually these are the
- 1:10:34informations. Yeah, first of all you
- 1:10:36need Gro API key. So here we'll be using
- 1:10:38Gro provider. You can use any kinds of
- 1:10:40provider. You can use Gemini, Open AI,
- 1:10:42open router, anything you can use but
- 1:10:44I'm going to use Gro Gro API here. And
- 1:10:47Grock model wise I'm going to use Lama
- 1:10:483.37 billion versatile model and max
- 1:10:52revisions. Okay. Now can anybody tell me
- 1:10:54what is this max revision parameter? I
- 1:10:56think you can see the architecture this
- 1:10:58stop condition maximum revision that
- 1:11:00means limit let's say if my reviewer uh
- 1:11:04let's say if my writer agents or let's
- 1:11:06say revision agents is not able to write
- 1:11:08the content properly okay after two
- 1:11:12revision that means two iteration okay
- 1:11:15it will stop the condition uh sorry it
- 1:11:17will stop the loop because I have I have
- 1:11:19added the maximum revision here okay but
- 1:11:22in real world this maximum iteration
- 1:11:24should be a little bit bigger but for
- 1:11:25example Example, I have only taken two
- 1:11:27here. Okay, after two iteration, it will
- 1:11:29stop. But in real world, you have to
- 1:11:31take a little bit more iteration here at
- 1:11:34least 20, 30, 40, 50. Okay, you have to
- 1:11:37take this kinds of iteration.
- 1:11:39Okay, this is our safer purpose for the
- 1:11:41safer purpose. But there's a possibility
- 1:11:44our uh revisor agents will revise based
- 1:11:47on the feedback and it will generate
- 1:11:49something good for okay, good for the
- 1:11:51user and this particular check would be
- 1:11:53pass. Okay, we are expecting but in case
- 1:11:55if it is failing that time it will
- 1:11:58depend upon the maximum revision uh
- 1:12:00stopping condition that time. Okay, so
- 1:12:02these are the informations we have put
- 1:12:04inside my now let's collect this GO API
- 1:12:07key. Now how to collect the GO API key
- 1:12:09guys? Very simple. Uh you have to go to
- 1:12:11the Gro platform.
- 1:12:14Gro API key
- 1:12:18search for Gro API key. Go to the first
- 1:12:20website and make sure you create one
- 1:12:22account. I already have the account
- 1:12:24guys. Here you have to create an API
- 1:12:25key. Okay. So I already have created
- 1:12:27this API key and if you don't have you
- 1:12:29just create it here. Okay. So I already
- 1:12:30have the API key. I'm not going to
- 1:12:32create again. Okay. But don't use my API
- 1:12:34key guys. I'm going to remove after this
- 1:12:36session only. Okay. And here I'm using
- 1:12:38this model. Now how you can get the
- 1:12:39model? Go to the playground. Expand it
- 1:12:42here. Now you are having different
- 1:12:43different model. Which model you like?
- 1:12:44Just try to select here. Let's say I'm
- 1:12:46using this model. I just copied this ID
- 1:12:48and paste it at here. Okay.
- 1:12:51Get it guys?
- 1:12:54Yeah. Now I'll be creating some more
- 1:12:56folder. Uh I'll be creating uh first of
- 1:12:59all I'll be creating a file called
- 1:13:01backend.py
- 1:13:07and app.py.
- 1:13:10Okay. Then I'll be also creating user
- 1:13:12interface. We'll be using fast API. For
- 1:13:14this I need templates folder.
- 1:13:19I also need static folder.
- 1:13:23How many you know about
- 1:13:26uh this one first API guys? If you know
- 1:13:29first API I think you know that whatever
- 1:13:31I'm writing right static templates you
- 1:13:33know that. So inside templates we keep
- 1:13:36our HTML code
- 1:13:39index HTML. This is the page
- 1:13:43and static we keep our CSS design and
- 1:13:46JavaScript
- 1:13:48style
- 1:13:51dot CSS
- 1:13:54and uh
- 1:13:56app dot js and again if you're doing
- 1:13:59front end development guys don't worry
- 1:14:01you can take the help from ch and you
- 1:14:02can create this user interface okay but
- 1:14:05in company there are different uh job
- 1:14:07role for that front- end developer they
- 1:14:09will basically take care part this part
- 1:14:11for you. Okay. So here I'll be creating
- 1:14:13a very simple user interface. Even I
- 1:14:15have also taken the help from chart GP
- 1:14:17to create this user interface. Okay.
- 1:14:18HTML CSS code. If you don't know it's
- 1:14:20completely fine.
- 1:14:22Yeah.
- 1:14:26Now first of all let's write our backend
- 1:14:28file because this should be my main
- 1:14:30agentic workflow. Okay.
- 1:14:33H [cough]
- 1:14:34[clears throat]
- 1:14:37Okay. So first of all here we'll try to
- 1:14:39import all of the necessary library. So
- 1:14:44these are the necessary necessary
- 1:14:45libraries guys I need. I need um
- 1:14:49just a media I need operating system. I
- 1:14:52need uh uh literal type dictv
- 1:14:56chat gro from langen grog. Then from
- 1:14:59lang graph I'm importing end start and
- 1:15:02state graph. Okay. So definitely you
- 1:15:04should have knowledge on lang graph
- 1:15:05otherwise this session might be little
- 1:15:06bit confusing to you. Uh that's why I uh
- 1:15:10strongly recommend after this session
- 1:15:12please try to complete the langraph at
- 1:15:13least like how langraph works. Okay,
- 1:15:16what is the syntax? Just try to study
- 1:15:17about. Okay, now from importing base
- 1:15:20model and field. These are the things
- 1:15:22are required
- 1:15:25uh GitHub repo uh I'm going to create.
- 1:15:27Okay, first of all, let me complete the
- 1:15:29implementation. After that, I'm going to
- 1:15:30share you the source code. Okay, don't
- 1:15:32worry about that. Okay, I'm going to
- 1:15:34share each and everything. But first of
- 1:15:36all, just try to be with me and try to
- 1:15:37learn everything.
- 1:15:39Okay, now I'll load my invement
- 1:15:42variable.
- 1:15:44So this is my environment variable. I'm
- 1:15:46loading it.
- 1:15:49Okay. After that we'll try to load my
- 1:15:52model as well as the maximum revision
- 1:15:54from my environment variable. So this is
- 1:15:56the syntax for that. OS.get env. I'm
- 1:15:59loading my groth model and I'm also
- 1:16:01loading my maximum iterations. Okay.
- 1:16:03Even I'm also giving the default value
- 1:16:04in case let's say you haven't mentioned
- 1:16:06these are the var uh values here. So it
- 1:16:09will use that default one. Okay. at that
- 1:16:11time.
- 1:16:13Now we'll try to define a model. So here
- 1:16:16we'll be using this group provider. We
- 1:16:20are giving the model ID, temperature and
- 1:16:23API key. Whatever API key we're loading.
- 1:16:25Okay. API key. I think uh
- 1:16:28huh. So we are loading it here. W.get
- 1:16:30env. Okay. We are loading the API key
- 1:16:32here as well.
- 1:16:35Get it.
- 1:16:38H
- 1:16:41now those who already know lang graph
- 1:16:45right in lang graph the first thing we
- 1:16:47have to create which is state
- 1:16:50okay state means let's say
- 1:16:54uh I'll go to the architecture yeah
- 1:16:59[clears throat]
- 1:17:02I I'll share this code after the
- 1:17:04implementation okay uh first of all try
- 1:17:06to see the implementation after the
- 1:17:07implementation I'm going to share this
- 1:17:09code with you. Don't worry. So see every
- 1:17:12agents every nodes will return some
- 1:17:16kinds of output. Okay. To save this
- 1:17:18output I need a state here in langraph
- 1:17:20we call it as a state state memory.
- 1:17:22Okay. So here we'll try to prepare the
- 1:17:24state right now. So these are the state
- 1:17:28I need.
- 1:17:31First of all I need a topic draft
- 1:17:34feedback decision revision. Okay, let me
- 1:17:37explain what I have written here. See
- 1:17:39topic. Topic means whatever topic user
- 1:17:42will provide. Let's say user has
- 1:17:43provided agentic AI. Okay, this is the
- 1:17:46topic. Based on that, our writer agents
- 1:17:49will write something, right? So this
- 1:17:50topic information will save in this
- 1:17:52particular topic state and the type
- 1:17:54should be string type. Now we have
- 1:17:56draft. Okay, draft means whatever my
- 1:17:59writer agents will write on top of the
- 1:18:01agent TKI, this is called draft. So this
- 1:18:04draft result will try to save inside the
- 1:18:06draft variable draft state memory. Again
- 1:18:09the type should be string. Now the
- 1:18:11feedback okay feedback means my reviewer
- 1:18:15will generate some kinds of feedback
- 1:18:16whether this particular written is good
- 1:18:18or bad. This feedback will try to save
- 1:18:21while inside the feedback variable.
- 1:18:23Again the type should be string. Okay.
- 1:18:25Now decision. Okay. Decision means our
- 1:18:28reviewer agents will also give me some
- 1:18:29kinds of decision. Okay. Decision means
- 1:18:32whether this particular written should
- 1:18:35be pass or revised. If it is pass that
- 1:18:38means your user will getting the final
- 1:18:40response. If it is revised that means it
- 1:18:42will go to the revise agent again. So
- 1:18:44this is called decision. So this is
- 1:18:45decision pass or fail will try to save
- 1:18:47inside the decision variable. Again this
- 1:18:49should be string. Okay. Now the revision
- 1:18:52count. Revision count means how many
- 1:18:54time this loop is running. This
- 1:18:56information will save while in the
- 1:18:58revision count because here I have to
- 1:19:00save the maximum revision. Okay, I think
- 1:19:02you have already saw that maximum
- 1:19:04revision I have added two that means how
- 1:19:07many times my loop is running this
- 1:19:09information should be saved inside my
- 1:19:10revision count and this should be
- 1:19:12integer type. Clear guys this state
- 1:19:15definition is clear all of you. This is
- 1:19:18called state memory in langraph.
- 1:19:25You can increase the temperature
- 1:19:26parameter. It's the creativity
- 1:19:28parameter. You can either keep it to
- 1:19:30zero. Either keep it to one. It's up to
- 1:19:31you. But I have kept to zero only. I
- 1:19:34don't want my let's say uh agent to more
- 1:19:37creative. Okay. I want like the
- 1:19:39authentic output. That's why I given
- 1:19:40that. Yeah. Clear guys. This state
- 1:19:44definition is clear. And definitely uh
- 1:19:47if you have little bit of knowledge on
- 1:19:49the langraph this uh code would be
- 1:19:52completely um I mean easy for you. But
- 1:19:54if you are completely first to the
- 1:19:56langraph it might be little bit
- 1:19:58confusing but I strongly recommend try
- 1:20:00to learn the langraph. Okay. Yeah.
- 1:20:02Because langraph is the most demandable
- 1:20:05orchestration framework nowadays in the
- 1:20:07market. So try to master the langraph as
- 1:20:09soon as possible. Okay. If you want to
- 1:20:11be a engineer. So fine guys we have
- 1:20:14already created all of the state all the
- 1:20:16utility variable we have created now
- 1:20:19we'll try to work on the agent okay now
- 1:20:21the first agent guys we'll try to create
- 1:20:23the writer agent
- 1:20:26type we need to uh to let's say define
- 1:20:29the state here see here okay type dick
- 1:20:33means this is a dictionary type we have
- 1:20:35defined this is the key this is the
- 1:20:36value this is the key this is the value
- 1:20:38so whenever it will save the information
- 1:20:40in the memory it will save as a
- 1:20:41dictionary that's why the type is
- 1:20:43dictionary. Okay, we call it as a type
- 1:20:45dict and this type dict we have already
- 1:20:47imported from typing and we have
- 1:20:49inherited in this inside this particular
- 1:20:51class. Get it? This is a Python concept.
- 1:20:56And to define the state we're using
- 1:20:58state function
- 1:21:00uh no you can take this state uh uh
- 1:21:05state class uh as per your requirement.
- 1:21:07You can give any kinds of name but I
- 1:21:09have given state here.
- 1:21:12Now we'll try to create this writer
- 1:21:14agent. Okay, let's try to quickly create
- 1:21:15this writer agent. So I already created
- 1:21:17our writer agent guys. Let me just show
- 1:21:19you this things are very simple. I'm not
- 1:21:22going to create from scratch. See this
- 1:21:24is our writer agent. So writer agent is
- 1:21:27taking this state okay as an input. And
- 1:21:30here in the writer agent guys we are
- 1:21:31directly invoking the model. Okay which
- 1:21:33model? The model we have defined here.
- 1:21:36Okay. Now here we are giving a prompt
- 1:21:38role content. You are a beginner
- 1:21:41friendly teacher. Explain the topic in
- 1:21:44let's say uh 120 or 160 words. Okay. So
- 1:21:48basically we are generating a topic.
- 1:21:50Okay. Topic or blog whatever you can say
- 1:21:52we are generating a topic and this is
- 1:21:54our condition. Just try to generate a
- 1:21:56beginner friendly okay blog for that or
- 1:21:59content for that. Use a simple language
- 1:22:01one everyday analogy and one tiny
- 1:22:04examples. Okay. and whatever user topic
- 1:22:06is giving. Okay. So just try to take the
- 1:22:09topic from the state because inside the
- 1:22:10state we have the topic that's why from
- 1:22:12the state we're taking the topic because
- 1:22:14this is a dictionary type right now.
- 1:22:15Okay. Now based on the topic it will
- 1:22:17generate a content for that particular
- 1:22:21uh topic and it will return the draft
- 1:22:24result. Now this draft we are saving
- 1:22:26inside the draft variable. Okay. And
- 1:22:28apart from that whatever things we have
- 1:22:30like feedback decision, revision we are
- 1:22:31making it as a completely empty because
- 1:22:33at the very first time we don't have
- 1:22:35feedback decision and revision count.
- 1:22:37Okay. These are the things are empty.
- 1:22:38Okay. This is our writer agent is great.
- 1:22:41That means this writer agent we have
- 1:22:42created. Now we'll try to create our
- 1:22:45reviewer agent. Okay. Now we'll try to
- 1:22:47create this verifier guys. This verifier
- 1:22:49again this verifier should be one kinds
- 1:22:51of agent custom agent. Okay. Now see
- 1:22:54here this is my verifier. Very simple.
- 1:22:57This is not a very complex topic guys.
- 1:23:00The agents you are creating the same
- 1:23:01agents only only you just need to making
- 1:23:05it as a verifier in the prompt itself.
- 1:23:06You can tell you have to verify this
- 1:23:08particular result. Okay. Now to verify
- 1:23:11it guys I'm going to use another model
- 1:23:14but in a structured way.
- 1:23:17Have you studied about pientic? Anyone
- 1:23:19here? Pentic I think you know with the
- 1:23:21help of pyic we can generate a
- 1:23:23structured output. So this is what yeah
- 1:23:25we have generated we have written a
- 1:23:27pentic class guys as you can see we have
- 1:23:28in inhited with the base model of
- 1:23:30pientic and here we are telling the
- 1:23:33generated output should be decision and
- 1:23:36feedback okay we are telling our model
- 1:23:38to strictly generate only decision and
- 1:23:41feedback decision means pass or revise
- 1:23:43and feedback means what feedback you
- 1:23:45want to give to the revise agent okay so
- 1:23:48this is what I need from the this agent
- 1:23:51okay this agent and to generate the
- 1:23:53structured output I need this particular
- 1:23:55pyentic class okay but if you're not
- 1:23:58using this pentic class every time your
- 1:23:59large language model will generate
- 1:24:01something new new format but I don't
- 1:24:03want that if you want your agents or llm
- 1:24:06format should be same that time you can
- 1:24:08use pentic class for that okay this is
- 1:24:10called pyic structure or data
- 1:24:12verifications
- 1:24:15okay now this thing we'll be using guys
- 1:24:18this thing we'll try to use but before
- 1:24:20that we'll try to create an object for
- 1:24:22that So this is the object we have
- 1:24:24created here. So reviewer model is equal
- 1:24:27to model with structured output and we
- 1:24:30are giving this identic class. Now this
- 1:24:33object will be using here. Now you can
- 1:24:35see we're using here for the invoke
- 1:24:36operation. Now whatever prompt you will
- 1:24:39give to this particular model. It will
- 1:24:41only give you two things. One is the
- 1:24:43decision, one is the feedback. Get it?
- 1:24:47uh decision means pass or fail and
- 1:24:50feedback means whatever feedback it will
- 1:24:52provide to the revised agent. This is
- 1:24:54how your re reviewer agents. Okay. Now
- 1:24:56inside review agents you can see I
- 1:24:58strictly mentioned you are the strict
- 1:25:00reviewer check the answer using only
- 1:25:02this rules. If it is easy for the
- 1:25:05beginner it contains every analogy
- 1:25:07everyday analogy. It consists a tiny
- 1:25:10concrete example. It says focus on the
- 1:25:12requested topic. If any fails okay
- 1:25:15choose revise and give to the uh give
- 1:25:19one or two practice improvement. Okay.
- 1:25:22So here I'm directly mention to the
- 1:25:24reviewer you strictly review or verify.
- 1:25:27Okay. Your task is to verify whatever
- 1:25:31writer agent is giving you. Okay. So
- 1:25:33whatever draft you are getting from the
- 1:25:36writer agents just try to review that
- 1:25:38and give your own feedback. Okay.
- 1:25:40Whether this should be pass or fail and
- 1:25:43what is your feedback on that getting
- 1:25:46guys? This is our verifi.
- 1:25:51Okay. This is our verifier is got it. So
- 1:25:55this verifier we have created right now.
- 1:25:57This verifier
- 1:26:01clear. Now I think this part is clear.
- 1:26:04All of you see this verifier you can
- 1:26:06create anything. You can create either a
- 1:26:08custom agent either you can you simply
- 1:26:12use a large language model but I will
- 1:26:14suggest you to use a agent here that
- 1:26:16would be good for you
- 1:26:25see uh again uh this be out pentic to
- 1:26:29understand you should have knowledge on
- 1:26:30pentic okay because in single session I
- 1:26:32can't cover each and everything I'm
- 1:26:34expecting you know about pentic
- 1:26:36line graph. Okay, these are the things I
- 1:26:38think you should know at least. So after
- 1:26:40this session, please try to check one
- 1:26:42tutorial, small tutorial about pentic. I
- 1:26:45don't think you will have any kinds of
- 1:26:46questions. Okay.
- 1:26:48Yeah. So pentic we use for the uh
- 1:26:52structured output to get from the LLM.
- 1:27:04Okay. Now my reviewer agent is done.
- 1:27:07That means my verifier is done. So here
- 1:27:08let me comment. This is my verifier.
- 1:27:12This is my verifier
- 1:27:18in the loop.
- 1:27:20Okay.
- 1:27:23H. Now we'll try to create this agent
- 1:27:26which is nothing but rei reviser agent
- 1:27:28that means whatever review uh feedback
- 1:27:31it will get based on that it will do the
- 1:27:33improvement of the content. Okay. Now
- 1:27:35let's try to create this agent.
- 1:27:42So this is my revisor agent guys as you
- 1:27:45can see. So here we are uh again inoking
- 1:27:48the model and we're telling you reviser
- 1:27:50improve the answer using the reviewer
- 1:27:53feedback. That means whatever feedback
- 1:27:54we are getting from the reviewer just
- 1:27:56try to use the feedback and improve
- 1:27:58that. Keep it beginner friendly and
- 1:28:00concise. Written only improved answer.
- 1:28:02Okay. So whatever topics and draft we
- 1:28:05got and whatever feedback we got based
- 1:28:07on that it will do the improvement.
- 1:28:09After doing the improvement, okay, it
- 1:28:11will again save the content to the
- 1:28:13draft.
- 1:28:15Get it?
- 1:28:17And that means this part is also done.
- 1:28:20Okay. Now what is left? left is nothing
- 1:28:22but the connection. Okay. Now we have to
- 1:28:24connect all of the agents together. This
- 1:28:26is called connection in line graph.
- 1:28:27Okay. Now we'll try to connect
- 1:28:28everything. We'll create a graph. We'll
- 1:28:31add the nodes and connect the edges.
- 1:28:33Okay. But before that I need to create
- 1:28:34another function. So this function will
- 1:28:36basically route your uh direction. That
- 1:28:40means if your reviewer agent is giving
- 1:28:44pass that means it will directly end
- 1:28:46that particular workflow. That means
- 1:28:48user will get the final answer. But if
- 1:28:49it is written revised that time revise
- 1:28:52agent will be triggered. Okay. So this
- 1:28:53is what we are writing. If our decision
- 1:28:56is pass that time return done otherwise
- 1:28:58okay just try to check the maximum
- 1:29:01revision okay and try the loop okay and
- 1:29:05uh what to return return revise that
- 1:29:07means it will go to the revise again.
- 1:29:10Okay revise will continuously generate
- 1:29:12and improve that particular content.
- 1:29:14Okay once this iteration is done just
- 1:29:16try to break this loop and return done.
- 1:29:18Okay, this is one simple condition we
- 1:29:20have written. Now we have to add inside
- 1:29:22the graph. Lang graph graph. Okay, now
- 1:29:24how to add this lang graph graph? This
- 1:29:27is what we usually write.
- 1:29:29Okay. So state graph we are using this
- 1:29:32function state graph. Inside that we are
- 1:29:35giving the state and we're adding the
- 1:29:38nodes. First of all we are adding the
- 1:29:39writer agent. Writer agent then reviewer
- 1:29:42agent.
- 1:29:45Reviewer agents. Okay. Then we are
- 1:29:47adding the revisor agent. These are my
- 1:29:49agents. Okay, these are my note. After
- 1:29:52that we are doing the connection. Start
- 1:29:53to writer. So start to writer. Writer to
- 1:29:58reviewer.
- 1:30:00Writer to reviewer. Then conditional
- 1:30:02edges. That means if reviewer returns
- 1:30:05if reviewer returns done it will
- 1:30:08directly end the workflow. Otherwise if
- 1:30:10if it is return revise, it will go to
- 1:30:12the revise agent again. So this
- 1:30:15additional conditional ages right
- 1:30:17basically this change the direction that
- 1:30:19means this direction this is the loop if
- 1:30:22it is returns it will directly end
- 1:30:24otherwise it will go to the revise
- 1:30:25agents and this loop will run so this is
- 1:30:27what we are doing here okay then at the
- 1:30:29last we're adding reviser to reviewer
- 1:30:32reviser to reviewer that means it will
- 1:30:34again send for the review operations
- 1:30:36okay so this is our simple graph
- 1:30:39definitions okay inside lang graph and
- 1:30:41we are compiling the graph at the very
- 1:30:44Okay. After that we'll try to run this
- 1:30:46workflow.
- 1:30:48So to run this workflow we'll be using
- 1:30:49one function for that. So this is the
- 1:30:52function we'll be using. Okay. These a
- 1:30:55very simple function we using run the
- 1:30:57workflow. So here what we are doing we
- 1:30:59are first of all generating all of the
- 1:31:01state topics draft feedback decision re
- 1:31:05uh revision count. Now see at the very
- 1:31:06first time only topic would be there.
- 1:31:08These are the things would be completely
- 1:31:09empty. At the very first time whenever
- 1:31:11you are executing your agents there
- 1:31:13should not be any draft feed feedback
- 1:31:15decision. Okay. So that's why these are
- 1:31:17the empty. So every time whenever it
- 1:31:19will run these are the variables should
- 1:31:21be added that time. Okay. Only at the
- 1:31:23very first time topic should be there
- 1:31:25because we are getting the topic from
- 1:31:26the user. Then what we are doing we are
- 1:31:29executing the graph. Okay. This graph
- 1:31:31whatever we have we are executing the
- 1:31:33graph and we are giving the input and
- 1:31:36whatever output we are getting we are
- 1:31:38returning it. That's it. Okay. Now let's
- 1:31:41try to test whether it's working or not.
- 1:31:43Now to test that simply what you can do
- 1:31:46uh either you can also test in your
- 1:31:48terminal
- 1:31:51uh in terminal demo. Let me show you. I
- 1:31:53created another function for this
- 1:31:55terminal. So this is the function you
- 1:31:58can use to check your agents in the
- 1:32:00terminal. So we are invoking this run
- 1:32:02workflows. Okay with the topics and
- 1:32:05we're running it. Okay. Now let me show
- 1:32:07you how this works. So for this I'm
- 1:32:08going to open up my terminal
- 1:32:13and clear it
- 1:32:16python backend.py.
- 1:32:20Now it is asking for the topic. Let's
- 1:32:22say I will give agentic
- 1:32:25AI.
- 1:32:27Enter. Now see guys uh it has configured
- 1:32:31the model everything. Writer agent has
- 1:32:33written something. Reviewer agent
- 1:32:35decision is pass. Okay, they see first
- 1:32:37writer whatever it has written at the
- 1:32:40very first loop my reviewer agent
- 1:32:43selected that that means this particular
- 1:32:44content is good. It is easy to
- 1:32:46understand. It has the example. Okay.
- 1:32:48Whatever constraint we have given in the
- 1:32:50reviewer it is checking everything and
- 1:32:52it is making it as a pass feedback. No
- 1:32:55change needed.
- 1:32:57And this is what our final answer.
- 1:33:00Okay. But if you're giving any complex
- 1:33:03topic
- 1:33:08agentic
- 1:33:10AI
- 1:33:13in advance
- 1:33:19let's say advanc way
- 1:33:27now see guys here multiple revision
- 1:33:29required. So this is the first write
- 1:33:31written
- 1:33:33uh this is the reviewer reviewer it is
- 1:33:36see decision is revised now this
- 1:33:37particular generation it has done this
- 1:33:40is not beginner friendly that means this
- 1:33:42condition is not matching right now
- 1:33:47this condition it not it it's not
- 1:33:49matching okay that's why it is giving
- 1:33:51the suggestion again okay it is giving
- 1:33:53the suggestion the answer provides a
- 1:33:55good analogy and example but it could be
- 1:33:57improved by adding more focus on the
- 1:33:59advance Okay, that means whatever user
- 1:34:01wants. Okay, based on that it is giving
- 1:34:04a feedback again reviewer. So is
- 1:34:07generating something. Okay, again
- 1:34:09reviewer is checking now it is got
- 1:34:11passed. Okay, no change is needed and
- 1:34:12this is the final answer. Get it? Now
- 1:34:15you can see revision used one that means
- 1:34:17one revision required that is one
- 1:34:19iteration happened inside my loop. It is
- 1:34:22yes or no. Tell me yes or no. Are you
- 1:34:25clear this looping concept? How it is
- 1:34:27working?
- 1:34:31Now this is moreable output. Okay, this
- 1:34:33is not a single short generator. This is
- 1:34:35using some kinds of verifier. After
- 1:34:38verification, it is giving me the final
- 1:34:40answer. Although token is getting more
- 1:34:42cost here. But yeah, we are getting some
- 1:34:44reliable output. Now this thing I have
- 1:34:47executed in the terminal. This not locks
- 1:34:49uh this uh not looks good. Now we'll try
- 1:34:51to add a user interface. Okay, simple
- 1:34:54user interface so that you can use it
- 1:34:56from the user interface.
- 1:34:59So for this in the app.py we'll just
- 1:35:01write the fast API code. Guys again
- 1:35:03don't worry if you don't about the fast
- 1:35:05API if you don't know about the HTML CSS
- 1:35:08it's completely fine you can generate
- 1:35:09this code from SGPT. Okay. So only you
- 1:35:11just need to import fast API. So these
- 1:35:15are the libraries are required from fast
- 1:35:17API and we also need to import this
- 1:35:21this this function
- 1:35:24run flow because this is our final
- 1:35:26function. Okay. inside app.py. So I'll
- 1:35:28just write from
- 1:35:31back end
- 1:35:34import
- 1:35:39run workflow.
- 1:35:41Okay, after that we'll try to initialize
- 1:35:45the first API.
- 1:35:48So that's how we initialize the first
- 1:35:49API and make sure you write all of the
- 1:35:51HTML content and CSS everything. Again,
- 1:35:54don't worry about the HTML CSS. you can
- 1:35:56easily generate it from chart GP okay I
- 1:35:58also generated from chart GPT these are
- 1:35:59the things now I'll add the CSS design
- 1:36:03that means the color in gradient okay
- 1:36:05everything in the CSS and some
- 1:36:08JavaScript code to work with my API
- 1:36:12yeah so these are my JavaScript code I
- 1:36:14generated from charg okay now simply
- 1:36:16I'll just add my remaining code
- 1:36:20uh this is the simple fast API route I
- 1:36:22created let me show
- 1:36:26So this is the simple fast API route. So
- 1:36:28this is my home route. That means if
- 1:36:30user hits my application, user will able
- 1:36:33to see the index.html page. Okay. And if
- 1:36:36user hits the API/ run, it will execute
- 1:36:39my
- 1:36:41um function run markflow functions.
- 1:36:43Okay. And we're running on local host
- 1:36:45port number um port number
- 1:36:498,000. And this is running in app.py.
- 1:36:52Pi. So here also I have to provide app.
- 1:36:56Sorry
- 1:37:00app. Okay. App is this to app because
- 1:37:02here I have created the app object.
- 1:37:06Simply you can copy this backend code.
- 1:37:08Okay. You can copy this back end code
- 1:37:10and you can give the chart uh you can
- 1:37:12give to chart GPT uh to generate a user
- 1:37:14interface for this particular project.
- 1:37:16Okay. Charge GP will automatically
- 1:37:17understand what kinds of user interface
- 1:37:19it needs. It will give you these kinds
- 1:37:21of CSS HTML design. Simple. Okay. Now
- 1:37:25let's run and try to check whether
- 1:37:27everything is fine or not. So I'll open
- 1:37:29up my terminal. Clear. Run the Python
- 1:37:32app.py.
- 1:37:34Now this application is running
- 1:37:36localhost port number 8,000. Now I'll go
- 1:37:37to my Google search for localhost port
- 1:37:40number 8,000. Now see that's how my
- 1:37:42application looks like. Is it good guys?
- 1:37:45The interface is good. So again I
- 1:37:47generated from chat GPT but I think it
- 1:37:49looks good. Okay. Yeah. Now simply here
- 1:37:51I have writer agent, reviewer agent,
- 1:37:53reviser agent. Okay. Now let's give a
- 1:37:55topic. Let's say I'll give what is
- 1:37:56agentic AI. Now if I run this loop,
- 1:37:59you'll see that writer agent has written
- 1:38:02something. Reviewer agent has reviewed
- 1:38:05and it got passed because the first
- 1:38:07iteration the content it has generated
- 1:38:10it looks good. Okay. And this is our
- 1:38:12final response. But let now let's try to
- 1:38:14give another one. Let's say what is
- 1:38:16agenti in advance
- 1:38:22add
- 1:38:24advanc
- 1:38:27uh way.
- 1:38:30Now if I run this loop
- 1:38:34now it should do multiple iteration. See
- 1:38:36first of all right agent has written
- 1:38:38something reviewer has reviewed that and
- 1:38:40it got revised. Okay it is telling the
- 1:38:43answer is not easy for the beginner.
- 1:38:44Okay. Again you have to generate
- 1:38:46something. It has generated. Again it
- 1:38:48got reviewed. Okay. Then again it saw
- 1:38:50that this answer is not good. Again it
- 1:38:52needs some revision. Again it generated
- 1:38:54some feedback. Again uh revisor agent
- 1:38:56will generate something. Again it will
- 1:38:58review. Okay. Now see how many iteration
- 1:39:00it has done. Just try to check. Revision
- 1:39:03one, revision two. What was my maximum
- 1:39:06iteration? What was my max maximum
- 1:39:09iteration? Tell me. Two. That means two
- 1:39:11maximum iteration is over. that time
- 1:39:14whatever final answer I got this should
- 1:39:15be my final result okay but if you
- 1:39:18increase it to little bit more let's say
- 1:39:20I'll give I'll give five now let's try
- 1:39:23to see what happens
- 1:39:26I'll give this prompt again
- 1:39:32now see first time
- 1:39:35second time yeah second time it got
- 1:39:37approved only okay so this is what we
- 1:39:40give for the safest purpose if in Yes,
- 1:39:43my loop is not breaking it will break as
- 1:39:45per the maximum iteration otherwise if
- 1:39:49it is matching with the uh reviewer
- 1:39:52rules that time this particular loop
- 1:39:55should be break clear guys yes or no
- 1:39:58tell me I think in the user interface it
- 1:40:01is more clear so how was this project
- 1:40:03how was this example of this loop on
- 1:40:05this loop engineering did you like it
- 1:40:09are you able to understand.
- 1:40:12Yeah, I kept everything simple so that
- 1:40:14everyone can understand.
- 1:40:17Thank you guys.
- 1:40:23Thank you.
- 1:40:27Perfect. And all of the source code I'm
- 1:40:29going to share each and everything. No
- 1:40:30need to worry. I'm going to share you
- 1:40:32each and everything. You can execute
- 1:40:34from your end.
- 1:40:37Yeah. Loop engineering only consist of
- 1:40:38selfcorrection aspect. Yeah, Sharma you
- 1:40:41are right because if it is not doing the
- 1:40:43self-improvement then how it will
- 1:40:45generate the perfect result for you.
- 1:40:47Okay, that's why self-improvement is
- 1:40:49required. So in everyone live also this
- 1:40:52loop engineering concept should be
- 1:40:54included. Okay, everyone live. So if I'm
- 1:40:57running my own live I should have this
- 1:40:58loop that means the verifier. Okay, so
- 1:41:01that whatever work I'm doing I need some
- 1:41:04kinds of feedback so that I can improve
- 1:41:06myself daily basis.
- 1:41:09No, I haven't created a GitHub link, but
- 1:41:11I'll create a GitHub link. Just give me
- 1:41:13a minute. And I'm going to share the
- 1:41:16source code. Let's create one GitHub
- 1:41:18link, guys.
- 1:41:23Repository.
- 1:41:26So, this is my GitHub. You can search
- 1:41:27with the name entpre.
- 1:41:32give
- 1:41:37what I can give
- 1:41:44self-correcting multi-agent system
- 1:41:46that's this name I'll give
- 1:41:59now I'll keep it as public uh addi file
- 1:42:02file uh I think I already have the
- 1:42:05readmi file not required get ignore I'll
- 1:42:08add python we using python and license
- 1:42:11let's take any license let's say I'll
- 1:42:12take apache one and create the
- 1:42:14repository and one thing you can do you
- 1:42:16can uh write the readmi in a good way so
- 1:42:19you can ask your agent to do that uh
- 1:42:24update the readmi file
- 1:42:29for this project
- 1:42:34like and
- 1:42:37open source repo. So it will
- 1:42:40automatically understand my code based
- 1:42:43on that it will write the readmi file
- 1:42:45for me because readmi should be properly
- 1:42:47written otherwise uh nobody can
- 1:42:50understand your project. Okay.
- 1:42:52Yeah.
- 1:42:58See this is what our coding agents now
- 1:43:00see one prompt I have given it is also
- 1:43:02using the agentic loop concept in the
- 1:43:03back end. Now I'm going to show this
- 1:43:05example as well. Okay. How to utilize
- 1:43:07these kinds of coding agents and add a
- 1:43:09verification layer there.
- 1:43:13Yeah. So it is writing the readmi right
- 1:43:15now. It is understanding my project and
- 1:43:17writing the readmi for me. I can also
- 1:43:20write but it will take time. Okay. Line
- 1:43:21by line I have to write everything. I
- 1:43:23don't want that because AI is
- 1:43:25everywhere. Now see readmi has written
- 1:43:27completely properly. See even I can show
- 1:43:30you the preview. Now see now this readmi
- 1:43:33is more readable. Okay. Now let's try to
- 1:43:37commit the changes. I'll click on code.
- 1:43:40Copy the link address. I'll uh open up
- 1:43:43my terminal. Stop the execution. I'll
- 1:43:46just write get clone. Paste the URL.
- 1:43:50Clone it. And inside that
- 1:43:54whatever I have. Okay. Okay, I have to
- 1:43:56also enable the hidden items. Okay, now
- 1:44:00I can see the G folder. Let's copy
- 1:44:02everything and paste it inside my
- 1:44:05project directory and I'll delete this
- 1:44:06folder. Okay, I have opened it in a
- 1:44:11uh what I can do, I can simply close
- 1:44:14this file and now let's delete it. Okay,
- 1:44:18now done. Now I'll open my VS code
- 1:44:21again. Code space dot
- 1:44:29Okay, now let's commit the changes.
- 1:44:32Clear. So, get add space dot then get
- 1:44:39commit-
- 1:44:42m updated code
- 1:44:46then get push
- 1:44:49origin
- 1:44:52main.
- 1:44:55So it has pushed. Now I'll go to my
- 1:44:57GitHub
- 1:45:00and do refresh. Now see my repo is
- 1:45:04updated. Okay. Now I'm going to share
- 1:45:05the URL.
- 1:45:08Uh everyone I'm going to share the URL.
- 1:45:10Now tell me guys, are you able to access
- 1:45:12my GitHub?
- 1:45:17Are you able to open the GitHub?
- 1:45:20Okay. Now keep the code and please try
- 1:45:22to execute in your system as well. Okay.
- 1:45:24And if you found any issue do let me
- 1:45:25know.
- 1:45:29Okay.
- 1:45:34Perfect. Now what I will do guys I'll uh
- 1:45:37simply go to uh show you the next
- 1:45:39example which is this architecture.
- 1:45:42Okay. Now I'm going to use existing
- 1:45:45um agentic uh um agentic application
- 1:45:49that means we'll be using coding agent.
- 1:45:52Uh see I'll be using the VS code agent
- 1:45:54only. You can use also cursor ID then
- 1:45:57codex anything you can use but VS code
- 1:46:00comes up with by default is uh okay uh
- 1:46:03copilot. So I'm going to utilize the
- 1:46:05copilot and we'll try to see how we can
- 1:46:09use test sprite. Okay, test sprite as a
- 1:46:11verifier uh to run the tests and find
- 1:46:15the bugs and how we can fix it
- 1:46:16automatically. Everything we'll try to
- 1:46:18see that.
- 1:46:21Perfect. So let's start with this uh
- 1:46:24second example that means test sprite as
- 1:46:26a verifier. Now first of all let me tell
- 1:46:29you what is test sprite exactly. So you
- 1:46:31can search for test sprite okay.com. So
- 1:46:34this is their platform. So this is
- 1:46:36agentic testing for AI native teams.
- 1:46:38Okay, that means you can test your AI
- 1:46:40users. That means you can use it for the
- 1:46:41verifier. Okay, now they're having uh
- 1:46:46two kinds of like one is the MCP server.
- 1:46:50You can directly use MCP server. Either
- 1:46:52you can use test sprite CLI. Okay, test
- 1:46:55sprite
- 1:46:57uh test sprite cla
- 1:47:01we'll be using. Okay, we'll be executing
- 1:47:03everything from the command line.
- 1:47:10Okay. So this is the CLI. So
- 1:47:14as you can see uh test sprite this is
- 1:47:16the verification layer for the agentic
- 1:47:18agentic coding error. That means if
- 1:47:20you're using any kinds of coding agents
- 1:47:23that time you can use this test sprite
- 1:47:25as a verifier. Okay that means the
- 1:47:27verifier I told you this verifier.
- 1:47:30Please verify that means whatever code
- 1:47:33your agents is generating definitely
- 1:47:35there is a possibility there should be
- 1:47:37some kinds of mistake okay in the code
- 1:47:40see you are using coding agents it's
- 1:47:41completely fine but after using coding
- 1:47:44agent also there is a possibility
- 1:47:46there should be some kinds of bugs your
- 1:47:49application is not working the way you
- 1:47:51are expecting that's why you can use
- 1:47:54test sprite as a verification layer so
- 1:47:56whatever coding agency is writing
- 1:47:58definitely test sprite It needs the live
- 1:48:01application. Okay. So you first of all
- 1:48:03need to deploy this application. Okay.
- 1:48:05And after that you have to give this
- 1:48:07deployment URL to the test pride
- 1:48:08verifier. Now test pride verifier will
- 1:48:11go to the deployment server. It will
- 1:48:12check the application. So I think you
- 1:48:14know right previously we we uh we had to
- 1:48:18head inside company. Have you seen that?
- 1:48:26You will get this resources inside this
- 1:48:28uh uh platform only. Okay, when I have
- 1:48:30already shared you my GitHub URL, so
- 1:48:33this is the GitHub inside that you will
- 1:48:35get all of the resources. Okay,
- 1:48:38uh test sprite is a production grade.
- 1:48:39Okay, it's a production grade platform.
- 1:48:41Okay, so have you seen um previously all
- 1:48:46of the company used to hire tester,
- 1:48:49software tester or AI tester guys? Have
- 1:48:52you seen?
- 1:48:55So what is the work of a tester? Tester
- 1:48:57means they will test the applications.
- 1:48:59Okay. And they will find the bugs.
- 1:49:02So this you can use as a tester inside
- 1:49:04your application. So basically it will
- 1:49:06test the application. If it founds any
- 1:49:08kinds of bugs, it will generate the f
- 1:49:12final uh failure bundles. Okay, failure
- 1:49:14bundles mean it is a snapshot. That
- 1:49:16means where it has the issue, what line
- 1:49:18it has the issue, what is the issue? It
- 1:49:20will give you the complete evidence.
- 1:49:22Okay, this evidence will try to send to
- 1:49:23the coding agents again. Coding agents
- 1:49:25will try to read that again. It will fix
- 1:49:27the code. Again we'll deploy again we'll
- 1:49:29try to run the test sprite test will
- 1:49:32verify the server again it will try to
- 1:49:34find the bugs if bug not found then it
- 1:49:36will pass that otherwise again it will
- 1:49:38generate the failure bundle again it
- 1:49:40will try to send to the coding agents
- 1:49:43okay so this is the loop actually we
- 1:49:44have to create right now now we'll be
- 1:49:47using this sprite verifier as a sorry
- 1:49:49test sprite as a verifier now this is
- 1:49:51the test sprite cla we'll be using for
- 1:49:53that okay now you can see it what is
- 1:49:55test sprite cla So despite is a AI
- 1:49:59testing platform. Uh they have that many
- 1:50:02of teams to use their software front end
- 1:50:04and back end both you can test in the
- 1:50:06cloud against the live product not Mox
- 1:50:08the repo it's official CLI. Okay. Now
- 1:50:11they have already given their quick
- 1:50:13start guide like how to use that how to
- 1:50:15install that everything they have given.
- 1:50:17Uh for this definitely you need NodeJS
- 1:50:19install in your system which is very
- 1:50:21easy. Simply you can copy this and you
- 1:50:23can search over Google NodeJS install or
- 1:50:27download and as per your operating
- 1:50:29system just try to download and install.
- 1:50:31Okay, those are using Windows uh use the
- 1:50:33MSI downloader. If you're using any
- 1:50:35other operating system you can check
- 1:50:37your operating system and you can also
- 1:50:39execute. Okay, so for me I have already
- 1:50:41installed NodeJS. Okay, the first step
- 1:50:43guys you have to install the NodeJS.
- 1:50:46Okay, after installing NodeJS guys, you
- 1:50:49have to install this um install this uh
- 1:50:52test plate CLL. Okay, so I'm going to
- 1:50:54show you step by step everything. First,
- 1:50:56first of all, let me show you the
- 1:50:57application. So, see what I have done
- 1:50:59guys. I already created one application.
- 1:51:02Okay, with the help of my coding agent,
- 1:51:04let me show you this application. So,
- 1:51:06this is the application I created.
- 1:51:09Now, let me show you first of all this
- 1:51:11application how this looks like. Now
- 1:51:13again this application I created with
- 1:51:15the help of NodeJS. Okay NodeJS this is
- 1:51:17the uh web application I created. Let me
- 1:51:20show you
- 1:51:22now you can use any application not
- 1:51:24NodeJ application you can use Python
- 1:51:26application any kinds of agent
- 1:51:27application it's up to you step you have
- 1:51:30to see how we can use this test bit as a
- 1:51:32verifier. Okay, now I'll open up my
- 1:51:34code.
- 1:51:43Let me zoom.
- 1:51:49Yeah. So what I'm doing guys, see I have
- 1:51:52open VS code and I told VS code to
- 1:51:56create a
- 1:51:58uh loop cut application. Do you know
- 1:52:01what is look at application? I think
- 1:52:03those who have already used any
- 1:52:05e-commerce site any purchasing website
- 1:52:07you will see that you will select a
- 1:52:09product after that you will do the check
- 1:52:11check checklist right and if you are
- 1:52:14having a coupon code you can provide the
- 1:52:16coupon code you can get the discount
- 1:52:19have you seen this kinds of application
- 1:52:20guys I think every platform is having
- 1:52:22this kinds of functionality even course
- 1:52:25purchase also whenever you want to
- 1:52:27purchase the course you will have a
- 1:52:28capon code right if you give the capon
- 1:52:30code let's say save 20% you will get 20%
- 1:52:34offer and you will get the final amount.
- 1:52:36Okay, this kinds of application I
- 1:52:37created here. Let me show you. I'll
- 1:52:39first of all run this application and
- 1:52:40let me show you. So to run this
- 1:52:42application guys, uh I already given the
- 1:52:44command in the readmi file. So in the
- 1:52:46readmi everything is available. I'll
- 1:52:49make it as preview. So you have to run
- 1:52:51this command. Okay, but before that you
- 1:52:52have to install NodeJS guys. Okay, the
- 1:52:54way I showed you. So let's copy this
- 1:52:56command and execute from my terminal.
- 1:52:59Now this application is running local
- 1:53:00host uh port number 5173. So this is the
- 1:53:04application
- 1:53:07uh this is the application guys. Look at
- 1:53:09check out. So let's say I have purchased
- 1:53:10one mechanical keyboard and aentic
- 1:53:12engineering book. Let's say this is $60.
- 1:53:15This is uh $40. How much? $100. Okay.
- 1:53:20Let's say I have a capon code. The capon
- 1:53:22code is save.
- 1:53:25Save. This is the capon code. I'll copy
- 1:53:30and paste it here. Now see if I apply
- 1:53:32capon that means how much percent
- 1:53:35percentage it should return return me
- 1:53:37guys tell me if I apply this apply this
- 1:53:39capon so what would be the total price
- 1:53:41as per your knowledge
- 1:53:4580 right but see what I have done I have
- 1:53:49added a bug in this application let me
- 1:53:51show you if I apply this coupon code it
- 1:53:54will show you 20 sorry $2 discount only
- 1:53:58is it correct it should give me $20
- 1:54:01discount It is giving $2 discount. Is it
- 1:54:03correct?
- 1:54:05Let me let me know. No, it's not
- 1:54:06correct. Right. That means total amount
- 1:54:08I have to pay $98. That means definitely
- 1:54:11this application is working fine. But
- 1:54:14there is a bug. So these kinds of
- 1:54:16mistake your coding agent can do because
- 1:54:18it's not a human, right? Again it's an
- 1:54:20AI. So there is a possibility whatever
- 1:54:24whatever code you are generating from
- 1:54:26the coding agent whether you are using
- 1:54:27copilot whether you're using codeex
- 1:54:29whether you're using cursor ID it
- 1:54:31doesn't matter there is a possibility
- 1:54:33there should be kinds of bug okay and
- 1:54:36this bug we have to figure out we have
- 1:54:38to test this bug now either you can test
- 1:54:40it manually either you can use some
- 1:54:43kinds of okay and the will be using test
- 1:54:46sprite cla for that test sprite cla what
- 1:54:48it will do it will automatically figure
- 1:54:51out the bugs from the application. It
- 1:54:53will generate the evidence. This
- 1:54:55evidence it will send it to the agents.
- 1:54:56Agents will try to fix that. Again it
- 1:54:58will test run the test and again it will
- 1:55:01check whether this bugs is available or
- 1:55:03not. How many it will run unless and
- 1:55:05until this application got fixed.
- 1:55:08Okay. Now we'll try to see this
- 1:55:12application. We'll try to check this
- 1:55:13application with the help of test sprite
- 1:55:15as a verifier.
- 1:55:31Okay,
- 1:55:37just a minute. All right,
- 1:55:41so now what did I do guys?
- 1:55:45So it's like a coding agent to test
- 1:55:48sprite uh and feedback and fix. Yeah,
- 1:55:51see test sprite it's a tool. Okay. And
- 1:55:56you are using whatever coding agent it's
- 1:55:58completely fine.
- 1:56:01So you can use test sprite as a verifier
- 1:56:04so that whatever coding agent is
- 1:56:06generated let's say I generated this
- 1:56:07project with the help of this copilot in
- 1:56:10the VS code copilot I have right I given
- 1:56:12a prompt I need this kinds of website
- 1:56:14please generate for me. So it has given
- 1:56:16me this website. Now when I executed
- 1:56:18this website I saw it's working fine.
- 1:56:21Only mistake I saw that this is giving
- 1:56:23me $98 or it should give me $80. So this
- 1:56:27is a bugs right now. Either I can like
- 1:56:30fix it. Okay, I can fix it manually.
- 1:56:32Either I can ask my agent to do that.
- 1:56:35But there is a possibility.
- 1:56:38Okay, this this error is like very major
- 1:56:41error. Let's say there are there are
- 1:56:44thousands of thousands code you have
- 1:56:45written very big application you have
- 1:56:47created that time it's would be a little
- 1:56:49bit difficult for you to find the right
- 1:56:51bugs that we can use test sprite as a
- 1:56:53verifier so what I will do I'll use test
- 1:56:56sprite and I'll tell test sprite to
- 1:56:58verify this project test this project
- 1:57:01test sprite will run all the test cases
- 1:57:03and it will figure out the bugs if it
- 1:57:05having any kinds of bug and these bugs
- 1:57:07it will show me as evidence okay I will
- 1:57:10be able to see the bugs in live demo
- 1:57:13only I will be able to see I'll show you
- 1:57:14okay and this live evidence I'll again
- 1:57:18provide to my agent that I got this bug
- 1:57:21my test sprite found this bugs now try
- 1:57:23to fix that then my agents will again
- 1:57:25fix that then we'll try to correct this
- 1:57:27application that's how the things works
- 1:57:29get it
- 1:57:31how it will know the test cases
- 1:57:35already having all of the functionality
- 1:57:37that's how test right has been designed
- 1:57:39okay this is the one of the test pite it
- 1:57:41will run all of the test cases and how
- 1:57:44it will run the test cases everything
- 1:57:45they have created in that test CLA
- 1:57:47itself we don't need to worry about that
- 1:57:49we will be only executing few commands
- 1:57:52that's it
- 1:57:54okay yeah first of all let me show you
- 1:57:56the demo that time you will understand
- 1:57:57okay now see this application is running
- 1:57:59completely fine there is no error uh
- 1:58:01sorry uh error definitely when bugs is
- 1:58:03there uh now first of all see test
- 1:58:06doesn't work locally it has to be remote
- 1:58:08server so first of all we'll be
- 1:58:10deploying this application over the
- 1:58:11Versel website. Okay, Versel cloud. So,
- 1:58:15make sure you create one account in
- 1:58:16Versel guys. Okay, free account you
- 1:58:19create uh Versel also you can deploy
- 1:58:21your application as free. You just need
- 1:58:23to create one Versel account. Okay, so
- 1:58:26this is my account. I already logged in
- 1:58:28and now we'll try to deploy this
- 1:58:30application. How will you deploy this
- 1:58:31application? We'll try to open the
- 1:58:32terminal, stop the application and few
- 1:58:36commands you have to execute. So first
- 1:58:38of all you have to execute
- 1:58:42uh this command.
- 1:58:44First of all you have to install versel.
- 1:58:47So this is the command for that. npm
- 1:58:50installg versel.
- 1:59:06Now you can deploy anywhere. You can
- 1:59:08deploy AWS, you can deploy render,
- 1:59:10anywhere you can deploy. This is the
- 1:59:12NodeJS application. That's why I'm using
- 1:59:14Versel cloud. Okay? Because this would
- 1:59:16be easy for me to deploy.
- 1:59:28Okay, I think it has uh
- 1:59:32installed. Now we'll just try to run
- 1:59:34this command versus login.
- 1:59:44So this is the login URL and it will
- 1:59:47automatically launch one website. Okay,
- 1:59:49authentication website. Now here you
- 1:59:51have to allow that. Make sure you
- 1:59:53already logged in with the versel. Okay,
- 1:59:54otherwise it won't be able to select the
- 1:59:57account. So I already logged in with my
- 1:59:58versel. So that's why uh see this
- 2:00:01account I will be able to see that.
- 2:00:02Okay. Now I'll just try to give the
- 2:00:04authorization. Allow.
- 2:00:29Let's wait for the authentication.
- 2:00:34Okay, authentication is done. Even you
- 2:00:37will also see the success message here
- 2:00:49see it uh it is getting congratulation
- 2:00:52you were signed in. Okay now we are also
- 2:00:54giving the successful message. Now I can
- 2:00:56close this window even I will go get
- 2:00:58back to my versel. Now let me close some
- 2:01:00of the tab because too many tabs I have
- 2:01:02created. I'll close this. I'll also
- 2:01:05close this. I'll also close this. Also
- 2:01:07close this one. Okay. And this one. This
- 2:01:10one. I'll close this. Okay. Now fine.
- 2:01:12Now I successfully logged in with my
- 2:01:14versel. Now I have to deploy my
- 2:01:17application. Okay. Now to deploy your
- 2:01:19application you have to write this
- 2:01:20command.
- 2:01:26H sorry not this one.
- 2:01:30>> [snorts]
- 2:01:34>> Marcel sorry hypen broad
- 2:01:40now it is asking do you want to create a
- 2:01:42new project I'll tell yes use your arrow
- 2:01:44key I'll go down I'll tell yes create a
- 2:01:47new project
- 2:01:49now it is telling please give the name
- 2:01:51of your project let's say I'll give this
- 2:01:54name
- 2:01:58uh loop card test sprite
- 2:02:02or let's say loop card project
- 2:02:08you can give any name now it is telling
- 2:02:11uh do you want to copy all of the source
- 2:02:13chrome from your right directory I'll
- 2:02:14tell yes I'll press enter
- 2:02:17now it is telling do you want to change
- 2:02:19any setting I'll tell no
- 2:02:21enter now it is connect connected g
- 2:02:26repository See
- 2:02:28uh connect detected git repository. I'll
- 2:02:31tell I'll tell no
- 2:02:36it is deploying.
- 2:02:42Now it's ready. Okay. Now I'll go to the
- 2:02:43versel website. Uh see my application
- 2:02:46got registered here. Now I'll click here
- 2:02:49and there is a live URL I'll get. Okay.
- 2:02:51Domains. Now I'll open it. Now see my
- 2:02:54application is live right now. Okay. See
- 2:02:56now even you can also access my
- 2:02:57application guys. I'll give the URL. Now
- 2:03:00tell me are you able to access my
- 2:03:01application?
- 2:03:05No it only work live application not
- 2:03:07local host guys. Are you able to access
- 2:03:09my application? Okay. Now let's test.
- 2:03:11Okay. I'll give save 20.
- 2:03:16Apply coup. Now see this is having the
- 2:03:18bug. Okay. Now I will run test sprite
- 2:03:20test cases. Okay. So how to do that? So
- 2:03:22for this I have already given all of the
- 2:03:25command you have to execute. Okay. So
- 2:03:27first of all here you have to install
- 2:03:30the test sprite. Okay. Now we'll try to
- 2:03:32install the test sprite. So to install
- 2:03:35the test sprite
- 2:03:37what you have to do.
- 2:03:40Okay. But before that you have to create
- 2:03:41one account in the test sprite website.
- 2:03:43So this is the test sprite website. Just
- 2:03:45make sure you create a free account. So
- 2:03:47I already have the account. I'll just
- 2:03:48try to sign in because you need a API
- 2:03:51key. Okay. from the test sprite.
- 2:03:55So this is the dashboard and from here
- 2:03:58you have to get one API key. Okay. So
- 2:04:00let's create one API key.
- 2:04:05So I already created some API key
- 2:04:07before. I'm going to remove them.
- 2:04:11I'm going to create a new one. Let's
- 2:04:14name it as demo. Create.
- 2:04:19copy this API key and keep it somewhere
- 2:04:21safe so that I can use it later on.
- 2:04:24Let's say I'll keep it here.
- 2:04:27Okay, just for your reference. I'll keep
- 2:04:29it here. And right now what I'm going to
- 2:04:32do, let's close this as of now. Okay,
- 2:04:35[snorts] now what I have to do guys, I
- 2:04:37have to
- 2:04:39I have to go to the test CLI GitHub.
- 2:04:42Okay, now here they have already given
- 2:04:43the installation guideline. So you have
- 2:04:45to copy these two command. Okay, now
- 2:04:47let's copy this command. Open up your
- 2:04:49terminal.
- 2:04:51Clear and execute. Paste. Anyway, so
- 2:04:55first of all, it will install test
- 2:04:56sprite CLI. Okay, it got installed. Now
- 2:04:59it will do the setup. Now again execute.
- 2:05:05Now you have to pass your API key. Okay,
- 2:05:07now you have the API key guys. Copy your
- 2:05:10API key
- 2:05:12and paste it here.
- 2:05:18Okay, once you have done you'll see that
- 2:05:21one folder would be create created
- 2:05:22called clot. Okay, say test pride
- 2:05:24internally use clot. Okay, internally it
- 2:05:27use clot for the testing operation. Now
- 2:05:31see it got created successfully. Okay,
- 2:05:33now inside that test pride onboard test
- 2:05:35sprite verify. Okay, whatever utility it
- 2:05:37needs it will automatically create for
- 2:05:39you. Now the next thing guys what I have
- 2:05:42to do we have successfully installed
- 2:05:44test sprite configured the test sprite
- 2:05:45we have already seted the API key
- 2:05:47everything is fine now simply we'll try
- 2:05:50to
- 2:05:52uh run the test sprite now we'll try to
- 2:05:55add
- 2:05:56this project to the test sprite server
- 2:05:59first of all for this this is the
- 2:06:00command you have to run this command
- 2:06:02guys again these are the test sprite
- 2:06:04related command let me mention
- 2:06:10test I'm going to share all of the
- 2:06:12command guys this command will remain
- 2:06:13same don't need to memorize test write
- 2:06:16related command
- 2:06:19test write command
- 2:06:31okay
- 2:06:33so first of all you have to run this
- 2:06:35command So this command will register
- 2:06:37your application in the test sprite
- 2:06:38server. But make sure you have to give
- 2:06:39your live URL here. So what is my live
- 2:06:42URL? So this is my app. This is the live
- 2:06:45URL. Copy that
- 2:06:47and
- 2:06:49make sure you are giving the URL here.
- 2:06:52Once you have given the URL, copy this
- 2:06:53entire command.
- 2:06:57Okay. Open up your terminal.
- 2:07:00Clear and just write execute.
- 2:07:08Okay, if you do that, it will give you a
- 2:07:10project ID. Now, let's copy this project
- 2:07:12ID and keep it somewhere saved. Okay, so
- 2:07:15let's say I'll keep it here. This is my
- 2:07:17project ID. So, don't lose this project
- 2:07:20ID. Okay, this is required. Now, you can
- 2:07:22go to the test sprite website. Close it.
- 2:07:26Go to the home. Now, see, look at
- 2:07:29project created. Okay, see automatically
- 2:07:32this project got registered in the
- 2:07:33testpite website. Okay, now you can see
- 2:07:36there is nothing right now because we
- 2:07:38haven't run any test of test cases.
- 2:07:40Okay, so previously I also created some
- 2:07:42test cases that's why it's showing but
- 2:07:43for you it would be completely working
- 2:07:45project. Okay, you can even delete the
- 2:07:47previous project as well. So now the
- 2:07:49next thing guys I have to execute
- 2:07:52uh after
- 2:07:54uh after uh registering my application I
- 2:07:57have to generate the test plan. Okay.
- 2:07:59Now to generate the test plan guys, this
- 2:08:01is the second command you have to
- 2:08:02execute. Now you have to copy this ID,
- 2:08:06the project ID you have copied and here
- 2:08:10after project underscore you have to
- 2:08:12replace it.
- 2:08:14Okay. Now copy the entire command,
- 2:08:18open up your terminal and execute.
- 2:08:22So it will generate a plan for me. Now
- 2:08:25you can see it has created a test sprite
- 2:08:26plans folder. I'll open it up. inside
- 2:08:29that one JSON file is created. Now if I
- 2:08:31open this JSON file now see whatever
- 2:08:33action it should perform whatever test
- 2:08:36cases it should perform it has
- 2:08:37automatically created by reading my
- 2:08:39project. Now you can see this is the
- 2:08:41plan step action. Open the loop homepage
- 2:08:44and confirm the card subtotal is
- 2:08:47$100.
- 2:08:49Enter save 20 in the capon code field
- 2:08:52and click apply capon. Verify the p
- 2:08:55confirms the save capon was applied.
- 2:08:57Verify the discount is 20. Okay. Verify
- 2:09:01shipping fee and final cost is $80. Now
- 2:09:04see automatically test sprite listed
- 2:09:08down what are the test it should run in
- 2:09:09the application. This is the beauty of
- 2:09:11test sprite. Now tell me if you are a
- 2:09:13human for you it would be uh it would be
- 2:09:17easy for you to find out these are the
- 2:09:19step at the very first time of your
- 2:09:20application if you are running your own
- 2:09:23test cases. Tell me guys no right but if
- 2:09:26you're using test sprite see easily in
- 2:09:28just a one command automatically I got
- 2:09:30whatever test cases I have to run even
- 2:09:32you don't need to run okay manually test
- 2:09:33sprite will automatically run let me
- 2:09:35show you now what I'll do guys here
- 2:09:38project ID just try to remove this
- 2:09:40project ID this part just try to remove
- 2:09:43okay this is not required right now save
- 2:09:45it now let's go to the next command now
- 2:09:49after generating plan you have to run
- 2:09:50the first test sprite test okay so for
- 2:09:52this this is the command command. Now
- 2:09:55here you have to
- 2:09:57uh you have to copy this command.
- 2:10:02Okay, you have to copy this command. Now
- 2:10:04this command what it does, it will open
- 2:10:07the test sprite.plans folder. It will
- 2:10:09take the JSON file as you can see save
- 2:10:11JSON file. Okay, it will take this JSON
- 2:10:13file. This JSON file and it will run the
- 2:10:15test cases over the test sprite server
- 2:10:18and it will find out the bugs. Okay,
- 2:10:20after that it will launch all of the
- 2:10:21information in the test prite server.
- 2:10:25Yeah. So this is the okay we are using.
- 2:10:28Now I'll copy this command. Open up the
- 2:10:31terminal. Execute. Now see the magic.
- 2:10:36It will take some time because it will
- 2:10:37run all the test cases. Okay. We'll
- 2:10:39wait. And the beauty is that you can see
- 2:10:42even the video. Okay. It is
- 2:10:44automatically going to your website
- 2:10:46clicking on that button giving the u
- 2:10:49couple code. It will even get that
- 2:10:52video. Okay, I'll show you.
- 2:10:55First of all, let's complete that.
- 2:11:01And definitely you will be getting one
- 2:11:03failed message. Okay, because your
- 2:11:05application has a box. Okay, it will
- 2:11:07give you one failed message. I'll show
- 2:11:09you show you.
- 2:11:12Yeah, this is for production only. Okay,
- 2:11:14this is not a demo purpose. You can use
- 2:11:16it for the production. People are using
- 2:11:18that.
- 2:11:28Everything is happening over your live
- 2:11:30server. Okay, this is the beauty.
- 2:11:44This is the application level verifier
- 2:11:46and previous example was the code level
- 2:11:48verifier
- 2:11:49custom verifier we created. Now see we
- 2:11:52got the execution result. One thing you
- 2:11:54have to copy which is test ID. Okay just
- 2:11:56try to copy this test ID and save it
- 2:12:00here. Okay this thing I need. This is
- 2:12:02your test ID. Okay
- 2:12:04fine. Now you can see I got a failed
- 2:12:07message error message. Now see okay what
- 2:12:09is the error I got. Now I'll go to the
- 2:12:10test sprite server. Now see it has run
- 2:12:13the test but it got failed. Okay. Now
- 2:12:15I'll see what what is what was the
- 2:12:17problem. I'll click here. Now it will
- 2:12:19give me the user interface for you. See
- 2:12:21it failed. Save 20 applies. This
- 2:12:24discount got failed. Okay. I'll open it
- 2:12:26up. Now see guys, you can see the
- 2:12:29preview as well. Now if I play this
- 2:12:30preview now see automatically it saved
- 2:12:3520. Save 20 applied and it was 89. Okay,
- 2:12:39that's how see it has executed all the
- 2:12:42step whenever it it was applied the
- 2:12:45capun code that time my application got
- 2:12:47failed even it has also captured the
- 2:12:48screen record
- 2:12:51how how was this uh process guys tell me
- 2:12:53good
- 2:12:55no I haven't given this recording it has
- 2:12:59already recorded this screen
- 2:13:02sir did you provide whole recording of
- 2:13:05the webinar to us huh it would be
- 2:13:06available over the krishnak.in main
- 2:13:08website. Okay, see that's how as a
- 2:13:11developer now you can understand. Okay,
- 2:13:13I got the mistake here. Now I can I have
- 2:13:16to fix it here. You don't even need to
- 2:13:17fix it. Your AI will fix that. Let me
- 2:13:19show you. Okay, now let's say even you
- 2:13:22can see the code level understanding
- 2:13:24preview. Okay, but we don't see that. We
- 2:13:26only see this error. Okay, now what I
- 2:13:28will do? I will ask test sprite to
- 2:13:32download that evidence for me. Let's say
- 2:13:34whatever error it figured out, right? I
- 2:13:36have to download that as a evidence. So
- 2:13:38for this now uh what I'm going to do I'm
- 2:13:41going to download the evidence. To
- 2:13:43download the evidence this is the code a
- 2:13:44command you have to run but here you
- 2:13:46have to give the test ID. Now I'll copy
- 2:13:47this test ID. I copied and paste it
- 2:13:50here. Okay. But before that you have to
- 2:13:53create one folder. The folder name is
- 2:13:56test sprite failure. So I'll open up my
- 2:13:58terminal.
- 2:14:01Clear. M K D I R
- 2:14:05this is the folder you have to create
- 2:14:07okay test sprite uh /f failer
- 2:14:12so I already created I think
- 2:14:16syntax command failed
- 2:14:22okay
- 2:14:24I'll only give test sprite
- 2:14:28okay now it created test sprite folder
- 2:14:30got created Okay.
- 2:14:33Now, what I'm going to do, I'm going to
- 2:14:35copy the entire command
- 2:14:37and I'm going to download the evidence.
- 2:14:52See my evidence got downloaded. Now, if
- 2:14:55I open the test sprite folder inside
- 2:14:58that all of the evidence got saved.
- 2:15:00Okay, even that video also, the video
- 2:15:03you saw right here, this video also got
- 2:15:05downloaded.
- 2:15:07This video also got downloaded and
- 2:15:09whatever error message. Okay, whatever
- 2:15:11cause fix everything has downloaded
- 2:15:14here. Just a minute. I opened
- 2:15:18closed my Yeah,
- 2:15:21just a minute guys. Let me
- 2:15:26Yeah. Can you can you see my screen
- 2:15:27guys? Can you see the browser? I think
- 2:15:29it was uh closed.
- 2:15:32Can you see that?
- 2:15:37Okay. Now see my evidence got
- 2:15:39downloaded. Okay. Failure meta result
- 2:15:43all the analysis all the error all the
- 2:15:45bugs it found. Okay. It has given all of
- 2:15:47this thing as evidence. Okay. Now this
- 2:15:49evidence I'll be using to fix my
- 2:15:51problem. Okay. Now see how how what I
- 2:15:54will do simply I'm going to
- 2:15:58ask my agent to fix that.
- 2:16:00Let me show you.
- 2:16:11Okay. Now I'll ask my agent to fix that.
- 2:16:18So I'll give a prompt to my agent right
- 2:16:20now.
- 2:16:27Now I'll open my agent that means your
- 2:16:29coding agent whatever coding agent you
- 2:16:31are using just try to open and here give
- 2:16:34this prompt
- 2:16:38read every file inside test sprite
- 2:16:40failure folder explain why save 20
- 2:16:44verification failed. Fix only the root
- 2:16:47cause. Do not change weaken the test
- 2:16:50requirement. Save 20 must apply 20%
- 2:16:53discount and
- 2:16:55$200 subtotal. Resulting $20 discount
- 2:16:59$80 should should be after fixing it.
- 2:17:02Show show me the exactly what you
- 2:17:05changed. Okay. Now this is the prompt I
- 2:17:07have given to my coding agent and I'm
- 2:17:09telling just try to refer this evidence
- 2:17:11as a reference why you did the mistake.
- 2:17:14Why do you have to fix that? Now see if
- 2:17:16I give this prompt now my agent will
- 2:17:19automatically fix it for me. Now I'll
- 2:17:21allow it. Now you just need to
- 2:17:25take a cup of coffee and you have to
- 2:17:27wait. Okay. Now see that
- 2:17:34that's how you can solve any kinds of
- 2:17:36big big problem. Okay. See as of now I'm
- 2:17:38showing you a simple project but in
- 2:17:40reality we'll be creating a very complex
- 2:17:42agent that time or complex project that
- 2:17:44time it's required so manual testing
- 2:17:47that time won't work okay it will take
- 2:17:49of time that time you can use this test
- 2:17:52bite as a verifier even though your
- 2:17:54agent is doing mistake you can still
- 2:17:55verify
- 2:18:06Yes. Now see it has already fixed inside
- 2:18:09my pricing dojs file. I'll keep that
- 2:18:11changes. I'll skip it. It's not
- 2:18:14required.
- 2:18:20I'll also skip it.
- 2:18:43Okay. Now you can see previously inside
- 2:18:46pricing.js
- 2:18:47it was 0.2
- 2:18:50uh 02 that means 2%. Okay. So it has
- 2:18:53changed to 0.2 that means 20%. So that
- 2:18:57was the problem in my pricing.js file.
- 2:19:00Okay. Now it got fixed. Okay. Now we'll
- 2:19:03redeploy this application. So again I
- 2:19:05will redeploy. To redeploy it you have
- 2:19:07to run this command npm run build. Okay
- 2:19:11you have to build. Then you have to
- 2:19:12again redeploy. You just need to run
- 2:19:17prompt.
- 2:19:25Now deployed again. I'll go to my live
- 2:19:27app. Refresh.
- 2:19:30Now let's test. I'll copy this save 20
- 2:19:34coupon code. Now apply this coupon code.
- 2:19:36Now tell me guys, is it correct? Is it
- 2:19:39correct? Yes or no?
- 2:19:42Now I'm getting the correct answer.
- 2:19:46Okay. Now again I don't trust my
- 2:19:49application. Again I trust my agent.
- 2:19:51Okay. Again I'll try verification. Okay.
- 2:19:54What I will do again? I'll open up my
- 2:19:56terminal. I'll again ask my test sprite
- 2:19:58to test that everything. Okay. Now to
- 2:20:00again what I will do
- 2:20:03uh again I'll copy my test ID.
- 2:20:08I'll paste it here.
- 2:20:14I'll copy this.
- 2:20:21Okay. And I'll run the test again.
- 2:20:27Again you have to wait for some times.
- 2:20:28Again it will uh check everything
- 2:20:34then it will give you the final
- 2:20:37uh conclusion.
- 2:20:57So that's how you have to test your
- 2:20:58application guys before going for the
- 2:21:00production there are lots of test case
- 2:21:03you have to run then you have to uh you
- 2:21:07have to let's say confirm your
- 2:21:08application is completely good that time
- 2:21:10you will be productionize your
- 2:21:11application this is so important so if
- 2:21:14this kinds of uh uh case you get in the
- 2:21:18production right so definitely that
- 2:21:20should be problem so people will get
- 2:21:24let's say you have given 2% discount
- 2:21:28your agent is making it as let's say
- 2:21:32200% discount that time no p price is
- 2:21:35needed people will purchase your course
- 2:21:37freely it's not good right
- 2:21:43okay now see execution is complete there
- 2:21:46is no field message okay now I'll go to
- 2:21:48the server again my test flight server
- 2:21:52go to the home
- 2:21:56Now see the latest test case got passed.
- 2:21:59Okay. Now you can see there is no error.
- 2:22:01I'll open it up. Uh
- 2:22:04even see this is pass also. I'll open it
- 2:22:06up. Now even you can see the preview.
- 2:22:13See I'm getting $80.
- 2:22:15Okay. Now this is completely working
- 2:22:17fine. There is no error with that. Now I
- 2:22:20can finalize this application. Okay. Now
- 2:22:23I don't need to run this loop anymore.
- 2:22:26Uh today's it's all about harness
- 2:22:29engineering in agentic AI and uh after
- 2:22:34learning this particular concept we'll
- 2:22:36be also implementing uh multi- aent
- 2:22:38system and we'll try to understand like
- 2:22:42how this engineering works. Okay. Each
- 2:22:44and everything we'll try to see in this
- 2:22:46session.
- 2:22:48Perfect. So first of all guys uh what
- 2:22:51I'm going to do I'm going to uh clarify
- 2:22:54about this harness engineering um in
- 2:22:57detail I mean in the theoretical
- 2:22:58understanding. So after understanding
- 2:23:00this theoretical uh concept we'll try to
- 2:23:03start with the practical development as
- 2:23:04well. Okay. So here I'm expecting one
- 2:23:08thing uh one prerequisite should be
- 2:23:09there for this particular session which
- 2:23:12is uh that you should familiar with AI
- 2:23:15agents implementation at least with
- 2:23:17langraph. Yeah. So I am expecting guys
- 2:23:19you are familiar with agentic AI at
- 2:23:21least agentic means uh here we create a
- 2:23:23different different AI agents okay and
- 2:23:25what is AI agents AI agents is nothing
- 2:23:27but it's a kinds of applications there
- 2:23:29we try to automate the workflows okay
- 2:23:32including some tools okay and uh some
- 2:23:35other uh let's say services like
- 2:23:37memories database okay these are the
- 2:23:38thing we'll try to integrate and we'll
- 2:23:40try to automate our workflow now let's
- 2:23:43try to understand what is hardness
- 2:23:44engineering then okay so see harness
- 2:23:47engineering is nothing but it's a part
- 2:23:48of the agents. Okay, it's a part of the
- 2:23:50agents. Why I'm telling it it's it's a
- 2:23:52part of the agents. See whenever I'm
- 2:23:54talking talking about it's part of the
- 2:23:56agents that means harness engine is
- 2:23:58nothing but it is your AI agents only.
- 2:24:00Okay. Whatever tools and technology we
- 2:24:03use uh for creating these kinds of AI
- 2:24:05agents this is called actually harness
- 2:24:08engineering. Okay. Now I think first
- 2:24:09time this sounds would be a little bit
- 2:24:11confusing for you but I'm going to
- 2:24:12clarify. So as you can see in this high
- 2:24:14level diagram we have the LLM and
- 2:24:17definitely every agents has the LLM for
- 2:24:19the reasoning operation for the uh main
- 2:24:22brain okay then it has the harness
- 2:24:24harness means it's a controlling system
- 2:24:27because agents will have the uh agents
- 2:24:30will have some of the component okay and
- 2:24:33you know about the component like tools
- 2:24:34memory database right with the it
- 2:24:38controls something so let's say whenever
- 2:24:39you are assigning any kinds of task to
- 2:24:41the agents so this particular the task
- 2:24:43it will take as a goal and it will divi
- 2:24:45it will divide that goal as a multiple
- 2:24:47task and this task would be done by this
- 2:24:50kinds of controlling component. Okay,
- 2:24:52let's say you are telling your agents to
- 2:24:53generate an email and send it to the
- 2:24:55customer. So what it will do it will
- 2:24:57first of all generate the email. It will
- 2:24:59verify whether this email is fine or not
- 2:25:01based on the user topic. Then it will
- 2:25:03automatically use your email tool and
- 2:25:05send the email over the customer. So
- 2:25:08each and everything is is being
- 2:25:09automated here. Okay, we are creating
- 2:25:11the automated pipeline and the entire
- 2:25:13system we call it as a production app.
- 2:25:15Okay, entire system we call it as a
- 2:25:17production app. Now see guys here what
- 2:25:20are the things we're going to learn in
- 2:25:21this particular session. First of all,
- 2:25:22we'll see what is harness engineering
- 2:25:24means AI agent. Why a good prompt is not
- 2:25:27enough for uh production. Okay, how
- 2:25:29routing state guardrails and validation
- 2:25:32works. How a harness controls multiple
- 2:25:34specialized agents. how Langra fits into
- 2:25:36the harness and how to think about
- 2:25:39production reliability. Okay. So see
- 2:25:42guys first of all let's try to
- 2:25:44understand the problem and LLM uh call
- 2:25:47is not a production system. Okay. I
- 2:25:49think those who have already studied
- 2:25:51about generate I think you would know
- 2:25:52that uh previously the application we
- 2:25:55used to create we call it as a prompting
- 2:25:57based application. There we had a uh
- 2:25:59single large language model and user
- 2:26:01will send some kinds of prompt and he
- 2:26:03will be getting some kinds of direct
- 2:26:04response. Okay. But what was the missing
- 2:26:07in this particular area? That means the
- 2:26:09first missing um component was the
- 2:26:11safety then routing validation uh then
- 2:26:14permission and observability. Okay.
- 2:26:15Production system needs software around
- 2:26:17the model to decide what uh what's
- 2:26:19happening before, during and after the
- 2:26:21agents run. Okay. Now we can see what is
- 2:26:25harness engineering. Then harness
- 2:26:26engineering is the design of the control
- 2:26:28layer around AI agents. Okay, that means
- 2:26:31whenever we are developing an AI agents
- 2:26:33that AI agents need needs some of the
- 2:26:35component. First of all, routing is
- 2:26:37required. Routing means uh who should do
- 2:26:40what kinds of work. Let's say we are
- 2:26:41creating a multi- aent system. Okay. And
- 2:26:44multi- aent system means there would be
- 2:26:45multiple agents. Now whenever I'm
- 2:26:47getting a task from the user, we have to
- 2:26:49decide which task should be performed by
- 2:26:53uh which particular agents. So this is
- 2:26:56called routing. So agents will have this
- 2:26:58routing uh features so that agent can
- 2:27:00automatically route the task. Let's say
- 2:27:02you are creating a uh you are creating a
- 2:27:04customer support agents that can solve
- 2:27:06technical query, general query as well
- 2:27:08as the let's say any kinds of uh any
- 2:27:12kinds of let's say financial query. Now
- 2:27:14whenever a user is giving a prompt,
- 2:27:16let's say user is giving I'm having some
- 2:27:17problem with my software X. Now can you
- 2:27:20tell me what kinds of uh what kinds of
- 2:27:22question it is? whether it is technical,
- 2:27:24financial or general. Tell me guys,
- 2:27:27let's say user is having a problem. I'm
- 2:27:30having a problem with my software X.
- 2:27:32Now, this is the this is related for
- 2:27:34what? Definitely technical. Okay. Now,
- 2:27:37if I'm sending this request to my
- 2:27:39financial agents, so will it be able to
- 2:27:42generate the response in a correct
- 2:27:44manner? No, definitely. Right. So,
- 2:27:46that's why we have to use the routing.
- 2:27:48Routing means it will automatically
- 2:27:49decide the questions we are getting the
- 2:27:52task we are getting from the user which
- 2:27:54agent should I route it right so this is
- 2:27:57called routing and this component should
- 2:27:59be available in every AI agents if you
- 2:28:01especially whenever you're creating the
- 2:28:03multi- aent system guys okay then the
- 2:28:05second thing is the state okay state
- 2:28:07means what do we know that means
- 2:28:09whenever we are having the multiple
- 2:28:11agents let's say agents Agents B agent C
- 2:28:13agent D so let's say the first agent is
- 2:28:16working
- 2:28:18and it will have some kinds of input and
- 2:28:20it will also give some kinds of output.
- 2:28:22So this is called actually state data
- 2:28:24and this state data we have to save
- 2:28:26somewhere. For this we use some kinds of
- 2:28:28state memory. Okay. This is another
- 2:28:30component of a AI agents. Then you have
- 2:28:32the guardrails. Okay. Guardils means
- 2:28:34this is the safety features. That means
- 2:28:36what kinds of input you should allow
- 2:28:38kinds of [snorts] input you should not
- 2:28:40allow. What kinds of output you should
- 2:28:42allow? What kinds of output you should
- 2:28:43not allow from your AI agents. Okay.
- 2:28:45That means if anyone is asking any kinds
- 2:28:48of violation related prompt, if anyone
- 2:28:50is asking any kinds of let's say harmful
- 2:28:52or sexual content definitely you have to
- 2:28:54block that particular request and how
- 2:28:56you will be doing that with the help of
- 2:28:57guardrails you can do that okay so
- 2:28:59guardrails is also part of an AI agents
- 2:29:01okay then you have the validation
- 2:29:04validation is also part of a guardrails
- 2:29:05but here we just try to validate the
- 2:29:08output okay output means let's say we
- 2:29:10are generating a content from the agents
- 2:29:12let's say we are generating a technical
- 2:29:13block before publishing this blog first
- 2:29:16of all I want to validate that whether
- 2:29:17this particular blog is correct or not
- 2:29:20whether the code I'm having it is
- 2:29:21correct or not okay we perform this
- 2:29:23validation now most of the people here
- 2:29:26they can recall the concept we have
- 2:29:27learned in our previous webinar guys can
- 2:29:29you tell me what we do inside this
- 2:29:31validation can anybody tell me here if
- 2:29:33you have joined my previous webinar guys
- 2:29:38what we perform inside validation
- 2:29:43loop engineering concept
- 2:29:45What is loop loop engineering does? Loop
- 2:29:47engineering means no loop engineering
- 2:29:49means it will take the output then it
- 2:29:52will verify it will verify that. Okay,
- 2:29:54it will verify and give the feedback
- 2:29:56whether this particular output is good
- 2:29:57or not. If not output if if it is not
- 2:30:00good then it will send the feedback to
- 2:30:02the agents. Agents will again generate
- 2:30:04something again it will do the
- 2:30:05validation. That's how this loop will be
- 2:30:07running. Okay. And there would be some
- 2:30:09termination condition unless and until
- 2:30:12this particular output is not good or it
- 2:30:14is matching with our maximum threshold
- 2:30:16this loop will continuously run. Okay,
- 2:30:17this is called loop engineering. We have
- 2:30:19already studied in our previous webinar
- 2:30:21guys.
- 2:30:23Did it then the tracing. Okay, tracing
- 2:30:25is also important. You have to also
- 2:30:26trace each and every execution. Either
- 2:30:28you can use any kinds of uh tracing
- 2:30:31platform like lang okay or langfuse or
- 2:30:34you can also use any kinds of um um
- 2:30:36memory for that. Okay. But you have to
- 2:30:38trace your what is happening inside
- 2:30:40every nodes. Okay. This is what your uh
- 2:30:42uh I mean all of the components whenever
- 2:30:44we are developing any kinds of agentic
- 2:30:46AI applications. Okay. Now if you
- 2:30:48combine all of them and if you create
- 2:30:50one applications we call it as a harness
- 2:30:52engineering. That means see to implement
- 2:30:54the agents. Okay. We only don't need the
- 2:30:57large language model. Apart from large
- 2:30:59language model we need some additional
- 2:31:00component. We need some additional
- 2:31:02controlling component like tools can be
- 2:31:04there, routing can be there, state can
- 2:31:06be there, guards can be there, validator
- 2:31:08can be there, tracing can be there. If
- 2:31:10we combine all of them together, this is
- 2:31:12called harness engineering. Okay, that
- 2:31:15means harness engineering nothing but
- 2:31:16the controlling workflow. Okay, to
- 2:31:18operate an agents, what are the
- 2:31:20controlling tools are required? We call
- 2:31:22it as a harness engineering guys. Is it
- 2:31:24clear all of you? Let me know. Is it
- 2:31:26clear guys? to implement an AI agents.
- 2:31:30Whatever controlling component we need,
- 2:31:32this is called harness engineering. That
- 2:31:34means harness engineing is a part of
- 2:31:36your AI agents. This is a not this is
- 2:31:38not a separate field guys. That means
- 2:31:40whatever agents we create so far. Okay,
- 2:31:42we we used to know that about harness
- 2:31:44engineering but we are not sure about
- 2:31:46this is called harness engineering. Now
- 2:31:48we are pretty much clear about that. So
- 2:31:49the model decides intelligently and
- 2:31:51harness decide operationally. Okay, that
- 2:31:53mean I told you a a and a will have two
- 2:31:57component. One is the large language
- 2:31:58model another would be the controlling
- 2:31:59layer. So uh model decides the
- 2:32:02intelligence okay uh about the what but
- 2:32:05decides the operational that means to
- 2:32:07perform the kinds uh this complete
- 2:32:10automation it needs to perform some
- 2:32:12operations okay this is how your harness
- 2:32:14engineering helps us it will use tooling
- 2:32:17state guard validator tracing each and
- 2:32:19everything here so harness is not a
- 2:32:21making it powerful around the agents
- 2:32:23make the most of llm yeah harness
- 2:32:26actually making your agents powerful at
- 2:32:28the end right because without routing
- 2:32:30state guard validation tools how your
- 2:32:32agents should be powerful okay how it
- 2:32:34should be automated okay Krishna I think
- 2:32:36you are getting my point okay with a
- 2:32:38simple language model also you can
- 2:32:40create the agents but this should not be
- 2:32:42a perfect agent to create the perfect
- 2:32:44agent we need all of these component and
- 2:32:47this is the part of harness engineering
- 2:32:48is
- 2:32:50okay now let's try to um understand from
- 2:32:54a real world analogy okay so the analogy
- 2:32:57is engine and car okay so Let's say you
- 2:33:00are driving a car and you know inside a
- 2:33:03car there should be some kinds of engine
- 2:33:05right whether you are driving Toyota,
- 2:33:08Nissan or any other like brand. Each of
- 2:33:12the car will have a engine. So just try
- 2:33:13to consider engine is nothing but the
- 2:33:15LLM. And what is harness? Harness is
- 2:33:18nothing but the car controlling system.
- 2:33:20Let's take an example. Let's say
- 2:33:21staring. Staring means let's say this is
- 2:33:24called routing. That means with the help
- 2:33:25of steering you can change the route.
- 2:33:27Then brakes. This is called guardrails
- 2:33:29like where uh you want to break the car.
- 2:33:32Okay. You have the entire let's say
- 2:33:34blocking se sector here. Okay. In the
- 2:33:36brakes. Then dashboard. Dashboard is
- 2:33:38nothing but your observability
- 2:33:40transmission. This is your workflow.
- 2:33:41Seat belt. This is your permission.
- 2:33:43Okay. So that's how you can compare your
- 2:33:45harness with the real world analogy. Now
- 2:33:47I think you are pretty much clear guys.
- 2:33:49What is harness? That means LM is the
- 2:33:52engine and harness is the component of a
- 2:33:54car. Get it?
- 2:33:59It will be available over the website
- 2:34:00itself. Okay. Deep. [snorts]
- 2:34:09Okay. So this is the simplest
- 2:34:10explanation we uh I can give you about
- 2:34:13this harness engineering. This is
- 2:34:14nothing. This is the part of AI agents
- 2:34:16only. Okay. But harness means we are
- 2:34:20adding some other contouring layer to
- 2:34:22the agents. Okay. So that our agents can
- 2:34:23be more powerful because the single LM
- 2:34:27based agents can't automate the process.
- 2:34:30For this it needs some controlling
- 2:34:32tools. Okay. And this controlling tools
- 2:34:35we call it as a harness engineering.
- 2:34:37This is called harness. Adding harness
- 2:34:39to the agents. That's it.
- 2:34:49Yeah. Now let's try to understand um
- 2:34:52some application concept like prompt
- 2:34:54based application context based
- 2:34:56application agents versus versus
- 2:34:57harness. Now see in prompt based
- 2:35:01engineering or application development
- 2:35:03we used to use a prompt let's say we are
- 2:35:05having a single large language model and
- 2:35:07here we are sending a prompt uh what
- 2:35:09should I tell the model okay so this is
- 2:35:11our goal then we had something called
- 2:35:14context engineering this is also called
- 2:35:15rag
- 2:35:17ret augmented generation there the main
- 2:35:20goal is is that what information should
- 2:35:23it see that means the large language
- 2:35:25model we're using we also provide some
- 2:35:27additional context from the knowledge
- 2:35:29base. This is called context engineering
- 2:35:31or make based solutions. Okay. Then we
- 2:35:33had something called agent engineering.
- 2:35:35Okay. So basically here we just try to
- 2:35:37assign the role tools should it have
- 2:35:40right and to make it completely
- 2:35:42automated. Okay. Working controlling
- 2:35:44agents we at the harness engineering
- 2:35:46that means how should whole system
- 2:35:49operates okay to perform a task how it
- 2:35:51should operate all of the component this
- 2:35:54is called harness engineering. So this
- 2:35:56is the difference between your prompt
- 2:35:57engineering, context engineering, agent
- 2:35:59engineering and harness engineering. I
- 2:36:01hope you get it. And loop engineering is
- 2:36:03the part of harness engineering. Okay?
- 2:36:05Because inside harness engineering only
- 2:36:07you are having that validator section
- 2:36:09and inside validate you perform the loop
- 2:36:10engineering. Get it
- 2:36:17h.
- 2:36:20Now let's try to understand why we use
- 2:36:23multiple agents. Okay? Why not single
- 2:36:24agents? Especially nowadays if you are
- 2:36:27developing any kinds of agent
- 2:36:28application or if you are seeing any
- 2:36:30kinds of agent applications, you'll see
- 2:36:32that people are creating multi- aents.
- 2:36:34Okay? Instead of single agents because
- 2:36:36one giant agent cannot handle all of
- 2:36:39these I mean let's say billing, tech,
- 2:36:43sales, refund everything. This would be
- 2:36:45a little bit difficult for one agents.
- 2:36:47Okay. So harder to control, test, debug,
- 2:36:49secure and improve uh independently.
- 2:36:52Okay. But if you're creating a
- 2:36:54specialized agents that means multi-
- 2:36:55aents you can divide the task. Let's say
- 2:36:58for technical query you can create a
- 2:36:59technical agents. For billing related
- 2:37:02query you can create a billing agents.
- 2:37:03Okay. For general question and answer
- 2:37:05you create a general question answer
- 2:37:07agent. So whenever you are getting some
- 2:37:09kinds of output from the users you can
- 2:37:11divide the task. So for technical query
- 2:37:13you can pass this task to the technical
- 2:37:15agents. For bling related query you can
- 2:37:17pass this to the bling bling agents.
- 2:37:18Okay. For general question answer you
- 2:37:20can pass this task to the general
- 2:37:21question answer agents. That's how you
- 2:37:23can create a specialized essence. So in
- 2:37:25our real life also people are not
- 2:37:27actually perfect with all of the work we
- 2:37:29are having in this world right. So every
- 2:37:32human being is having some kinds of
- 2:37:34specialized let's say someone is very
- 2:37:36good at computer vision someone is very
- 2:37:38good at let's say machine learning
- 2:37:40someone is like very good at AI agents
- 2:37:42development they're specialized things
- 2:37:44right and every company is having this
- 2:37:46kinds of specialized engineer so they
- 2:37:48are not going to hire someone who knows
- 2:37:50everything okay because in a company you
- 2:37:52will see that that would be uh a
- 2:37:54separate HR there would be separate CEO
- 2:37:56there would be separate uh let's say
- 2:37:58manager there would be separate engineer
- 2:38:00okay each And everyone is a specialized
- 2:38:02agents there. They're working uh
- 2:38:04together. They're working I mean uh as a
- 2:38:08team okay and they're solving a very
- 2:38:10complex problem and they're growing the
- 2:38:12company. So things are same here. We are
- 2:38:15creating a specialized agents okay
- 2:38:16multiple agents and we are giving some
- 2:38:18special task to them and whenever we're
- 2:38:20getting these kinds of task we're
- 2:38:21dividing the task between them and
- 2:38:24they're working together and they're
- 2:38:25solving a big problem here. This is what
- 2:38:27our multiple agents does, right?
- 2:38:34>> But expensive utilizing multi- aents.
- 2:38:36Yeah, definitely to create a multi-
- 2:38:38aents it should be a little bit
- 2:38:40expensive but at the end the agency will
- 2:38:42be developing this should be more
- 2:38:43robust. Okay. Right now in industry
- 2:38:45people are more worried about the
- 2:38:47robustness. Okay. instead of the cost
- 2:38:49because if you're not getting a robust
- 2:38:51agents so what is the mean of that
- 2:38:53particular application if it is not
- 2:38:54solving the real world use case I hope
- 2:38:56you get it
- 2:39:00no no it will forget because it will
- 2:39:03have a state memory okay yeah this thing
- 2:39:05we have to learn inside AI agents
- 2:39:07development guys that's why I told you
- 2:39:08AI agents knowledge are required okay
- 2:39:10and then we'll be learning something
- 2:39:11called lang graph and state memory okay
- 2:39:14we create a permanent memory for each
- 2:39:16and every agents there is a concept
- 2:39:18Subgraph. Okay. So with of subgraph you
- 2:39:20can create this multi-agent concept
- 2:39:22inside lang graph. Have you studied
- 2:39:24subgraph before anyone?
- 2:39:27Subgraph. Subgraph in lang graph. Okay.
- 2:39:29This is the best way to create the
- 2:39:31multi- aent system.
- 2:39:35Yeah.
- 2:39:37No state graph is a different thing.
- 2:39:39Subgraph is a different thing. Okay. If
- 2:39:41you don't know, you can check my YouTube
- 2:39:42channel TS with BP. There I already have
- 2:39:44the tutorials. You can understand about
- 2:39:46the subgraph.
- 2:39:48Yep.
- 2:39:52Okay. That's why lang graph is like
- 2:39:54veryful and most demanding framework
- 2:39:57nowadays especially in industry for the
- 2:39:59agents development instead of any other
- 2:40:00framework like crewi autogen okay people
- 2:40:04are more focusing on the langraph
- 2:40:06development especially whenever you're
- 2:40:08getting your custom agents okay so try
- 2:40:10to master lang graph that would be
- 2:40:12pretty much beneficial for you
- 2:40:20H
- 2:40:26no this is just a simple uh I mean react
- 2:40:29agent okay go create agent this is a
- 2:40:32simple uh react agent inside langen so
- 2:40:35that at least whenever you are learning
- 2:40:36something you can use that and create a
- 2:40:39simple basic uh basic agentic
- 2:40:41application okay we don't use this
- 2:40:44create agent in real
- 2:40:52your YouTube channel name and LinkedIn
- 2:40:53profile.
- 2:40:55DS with BPI. Okay. DS with BPI my
- 2:40:58YouTube channel and Bhammed Bi is my
- 2:41:01LinkedIn profile.
- 2:41:09Yeah, let me show you. So, this is my
- 2:41:11LinkedIn profile. Okay. And
- 2:41:15This is my channel.
- 2:41:20This is my channel
- 2:41:28H.
- 2:41:30Okay. Now let's try to see a
- 2:41:33[clears throat] example of this harness
- 2:41:36uh harness engineering that means the
- 2:41:38harness agent. Uh we'll also create this
- 2:41:41thing in a practical. Okay. First of
- 2:41:42all, let me show you the highle diagram.
- 2:41:45So here we're going to uh going to
- 2:41:46create a multi- aent system guys and
- 2:41:49this is going to be a AI customer
- 2:41:51support agents. So user will give some
- 2:41:53question uh I mean questions okay or
- 2:41:56let's say any kinds of customer related
- 2:41:57query. First of all we'll try to pass
- 2:41:59through the guards layer. Okay. So
- 2:42:01definitely guard should be the component
- 2:42:02of the AI agents. First of all we'll try
- 2:42:04to check whether the questions we are
- 2:42:06getting it is having any kinds of
- 2:42:07violation. It is having any kinds of
- 2:42:10let's say harmful content or not. if it
- 2:42:12is having we'll try to block the request
- 2:42:13okay otherwise we'll try to send it over
- 2:42:16the router okay what router will decide
- 2:42:18the questions we are getting let's say
- 2:42:20people are asking about uh let's say I'm
- 2:42:22having a I'm having a error inside my
- 2:42:25python program now can you tell me what
- 2:42:27kinds of question it is it's a technical
- 2:42:30billing or general tell me
- 2:42:32I'm having a problem with my python file
- 2:42:35let's say this is the question technical
- 2:42:37so what router will do it will
- 2:42:39automatically understand the user
- 2:42:43question. Okay. And based on that it
- 2:42:45will route that particular questions to
- 2:42:47the specialized agent. So here
- 2:42:49specialized agents should be my
- 2:42:50technical agents and technical agents
- 2:42:52will try to u I mean generate something
- 2:42:55okay uh based on the user query and it
- 2:42:58will pass to the reviewer. See before
- 2:42:59passing to the u user we will do the
- 2:43:03review operation. Okay. We'll try to see
- 2:43:04whether this uh I mean answer it has
- 2:43:08generated this is perfect for this query
- 2:43:09or not. If it is perfect then we'll try
- 2:43:11to show otherwise we'll not show. Okay.
- 2:43:14So that's how if user is passing any
- 2:43:16kinds of billing related questions we'll
- 2:43:18try to send it over the billing agents
- 2:43:20and billing agents will uh give it to
- 2:43:22the reviewer agents. Reviewer agents
- 2:43:23will try to review then we'll try to
- 2:43:25show similar goes to general question
- 2:43:27and answer. Okay. So here we'll try to
- 2:43:28create a three agents and each of the
- 2:43:30agents will have different
- 2:43:31responsibilities. Okay. That's how we
- 2:43:33will create a multi- aent system. And to
- 2:43:35create this multi- aent system guys you
- 2:43:37can see I'm using all of this hardness
- 2:43:39concept. Okay, harnessed component and
- 2:43:42this is what your harness engineering
- 2:43:43is. That means the simple AI
- 2:43:45implementation only but we are using all
- 2:43:47of the component. Apart from that there
- 2:43:48are some other components are also
- 2:43:50available like memory then you have
- 2:43:52database. Okay but in this particular
- 2:43:54demo I'm not going to use all of them
- 2:43:55because if I'm using that it would be
- 2:43:57very long session that time it would be
- 2:43:59very big project maybe in future we'll
- 2:44:01try to see the complete end to end
- 2:44:02implementation but at least just to show
- 2:44:03you the demo purpose I'm going to create
- 2:44:05this particular agents. Okay with these
- 2:44:07are the component. I hope this part is
- 2:44:08clear to all of you.
- 2:44:12Okay. Exactly the control is happening.
- 2:44:15So here is the control happening right.
- 2:44:17So whenever user is passing something,
- 2:44:19right? Uh let's say user is passing a
- 2:44:21questions about technical. So this
- 2:44:23routing is automatically decide it will
- 2:44:25hit the technical agents and it will
- 2:44:28send it to the reviewer. So here this
- 2:44:29controlling is happening here. We are
- 2:44:31not controlling right here our agent is
- 2:44:33deciding where it should go. Okay. In
- 2:44:36real world also let's say if you're
- 2:44:37creating a automated agents that time
- 2:44:39let's say you are uh you are handling
- 2:44:41the email let's say regular basis
- 2:44:42whatever email you are getting from your
- 2:44:44customer first of all you are checking
- 2:44:46to the guardrails then you are giving to
- 2:44:48the router then router is deciding what
- 2:44:50kinds of email it is based on that it
- 2:44:51will trigger that particular agents then
- 2:44:54it will generate the response it will
- 2:44:56pass to the reviewer and reviewer after
- 2:44:57reviewing you are send uh it will send
- 2:44:59this particular uh let's say message to
- 2:45:01the sender okay sender agent and sender
- 2:45:04agent will try to again resend a
- 2:45:06particular email to that customer. Okay,
- 2:45:08that's how we can automate the process.
- 2:45:09But right now we are not adding too much
- 2:45:11layer in this particular development.
- 2:45:13Get it?
- 2:45:17If I remove the guards then it will be
- 2:45:20multi- aents like it will be similar to
- 2:45:22multi- aents. See if you also remove the
- 2:45:24guardrails. Yeah, this would be multi-
- 2:45:26aent definitely.
- 2:45:28This will not have the harness concept
- 2:45:30that time because you are losing one
- 2:45:32harness one of harness which is guardil
- 2:45:34and guard is super important right now
- 2:45:36inside agents okay otherwise people can
- 2:45:39ask I want to hack your I want to hack
- 2:45:42your platform okay give me the give me
- 2:45:45the let's say um we point of platform
- 2:45:49okay that time there is a possibility
- 2:45:50your agent may give that particular
- 2:45:52weakest point and people will hack your
- 2:45:54system right so that's why guard is
- 2:45:56important
- 2:45:57If you look in charge and if you ask uh
- 2:46:00how to make bomb or how to hack let's
- 2:46:02say Google server just see whether
- 2:46:05charge gives the answer or not
- 2:46:08try uh just anyone try from here let me
- 2:46:11know
- 2:46:15the entire guard is equal to is equal to
- 2:46:18harness harness means the entire inter
- 2:46:20component okay component guard router
- 2:46:25okay memory tools everything if you
- 2:46:28include everything then it will become a
- 2:46:30hardness nazer okay
- 2:46:35so have you tried guys with charg how to
- 2:46:38make a how to hack google server you'll
- 2:46:41see that it will not give you the answer
- 2:46:42why because it has the guardrails layer
- 2:46:45so every input you are giving to charge
- 2:46:47right let me show you so if I open up my
- 2:46:49chart gpt and if I'm asking let's say
- 2:46:53how to
- 2:46:56hack Google
- 2:47:00server.
- 2:47:04See, I can't provide the instruction for
- 2:47:06hacking the Google server. This contrast
- 2:47:08cannot be shown. Okay? Because this is
- 2:47:11not matching with their okay policy.
- 2:47:13This is a violation. Okay? That's why it
- 2:47:15is blocking your request.
- 2:47:17Get it?
- 2:47:19So that's why every real world
- 2:47:21application is having this guard
- 2:47:23concept. Okay? Without guards definitely
- 2:47:26you don't need to create any kinds of
- 2:47:27application
- 2:47:29otherwise there is a possibility your
- 2:47:30application can be used in a okay
- 2:47:33different manner
- 2:47:38h
- 2:47:43so here this is the flow guys the entire
- 2:47:46system flow first of all user will give
- 2:47:49the questions I have an API login added
- 2:47:52uh it will go to the guardrails and
- 2:47:54guardrails will um either decide whether
- 2:47:57it has to block or not. Then it will go
- 2:47:59to the router nodes, motor nodes. It
- 2:48:02automatically detects like it is a
- 2:48:03technical query. Then it will prepare
- 2:48:06something draft. Okay. Then this draft
- 2:48:08would be uh shown to the reviewer.
- 2:48:11Reviewer will generate the final answer.
- 2:48:12Then it will trace and you will show the
- 2:48:14user. Okay. So here one thing you have
- 2:48:17to important uh which is that don't use
- 2:48:21an LLM for every decisions. Okay.
- 2:48:22Sometimes for some example you can use
- 2:48:25deterministic code for some kinds of
- 2:48:27decision you can use LM decisions. Let's
- 2:48:30say for any kinds of low-level task
- 2:48:32let's say you want to see whether any
- 2:48:35refundable message you are getting from
- 2:48:38the user or not. Let's say if user is
- 2:48:39asking for the refund. Okay. So that
- 2:48:42time you can simply write the
- 2:48:44deterministic code like you can simply
- 2:48:46use the if else condition to handle this
- 2:48:49kinds of scenario. If refund it is
- 2:48:51available in the questions then try to
- 2:48:54uh route should be the billing. Okay.
- 2:48:56They're asking for the refund of the
- 2:48:59billing. Okay. But if their question is
- 2:49:01having some complexity let's say
- 2:49:03classify this request into technical
- 2:49:05billing or general that time actually
- 2:49:07you can't use this deterministic code
- 2:49:09that time definitely you have to use the
- 2:49:11LM decisions. Okay. So it's your design
- 2:49:14pattern always. You don't need to use
- 2:49:16large language model every sort of task.
- 2:49:19Sometimes deterministic code will work.
- 2:49:21So if you're adding the deterministic
- 2:49:23code, you can reduce the cost of your
- 2:49:26agents. Okay, that's how you have to
- 2:49:28think about. If you are having a
- 2:49:29low-level task, low-level let's say
- 2:49:32conditions, that time use the
- 2:49:33deterministic code. And if you are
- 2:49:35having a highle task and needs some more
- 2:49:38reasoning to understand this particular
- 2:49:39content, that time use LM decisions
- 2:49:42making. Okay, I hope you get it guys.
- 2:49:45That's how you can reduce the cost of
- 2:49:46your multi- aent system.
- 2:49:51H
- 2:49:53so guard is the entirely man. No guard
- 2:49:55is not managed by the provider. Okay.
- 2:49:58Llm provider it would be managed by you
- 2:50:01especially inside your applications.
- 2:50:03Okay.
- 2:50:05Yeah. But right now whatever LLM
- 2:50:07provider we use okay they also have some
- 2:50:09kinds of guardrails integration in the
- 2:50:11model when they train the model right.
- 2:50:14But again whenever we are creating our
- 2:50:16custom application that time we have to
- 2:50:18use our own gad uh logic there Nathan
- 2:50:35[clears throat]
- 2:50:40now this is the guard control workflow.
- 2:50:42So incoming request first of all we'll
- 2:50:44apply the guardrails if this is matching
- 2:50:47uh with our requirement we'll try to
- 2:50:49allow it otherwise we'll try to block it
- 2:50:51okay then specialized agent so it will
- 2:50:54basically draft an answer then we'll
- 2:50:56pass to the reviewer reviewer will
- 2:50:58generate the final answer for that okay
- 2:51:01so yes uh this is how actually we'll try
- 2:51:03to create the entire system guys and
- 2:51:05this is the highle architecture I
- 2:51:07created for you there are some live demo
- 2:51:09like u I will ask some of the questions
- 2:51:12questions and based on the questions it
- 2:51:13will automatically route the questions
- 2:51:15to different different specialized
- 2:51:17agents. Okay. So yes uh now let's try to
- 2:51:20see the practical demo guys. Okay.
- 2:51:24Okay. Now guys we'll try to start with
- 2:51:27the practical. So let's do one thing.
- 2:51:31I'll open up my
- 2:51:34local folder and here let's open up our
- 2:51:36VS code.
- 2:51:42So I think everyone is having VS code in
- 2:51:44their system. Yes or no?
- 2:51:47VS code anonda. This is installed right?
- 2:51:49Yeah. Great. So let's open up our VS
- 2:51:52code.
- 2:51:57[clears throat]
- 2:51:59Okay.
- 2:52:11Okay, the first thing guys uh you have
- 2:52:13to set up the environment and you know
- 2:52:15how to create the cond environment and
- 2:52:17all but again I'm giving you all of the
- 2:52:18command.
- 2:52:20So to create the environment you have to
- 2:52:22execute this command create you can also
- 2:52:24use u package manager this is also fine
- 2:52:26okay but I'm going to use cond create
- 2:52:29hyphen in you can give the name of the
- 2:52:31environment let's say I'll give demo and
- 2:52:33then python version so let's say python
- 2:52:35is equal to 3 11 okay y that means I'm
- 2:52:40giving the yes permission then you have
- 2:52:43to activate the environment so to
- 2:52:44activate you just need to write activate
- 2:52:47okay
- 2:52:49activate create demo. Then after that
- 2:52:52you have to install the requirement. So
- 2:52:53pip install
- 2:52:58install
- 2:52:59hyphen rer requirement dot
- 2:53:04requirement.
- 2:53:09txt. Okay. So you can copy all of this
- 2:53:12command one by one and execute in your
- 2:53:14terminal. So for me I already have the
- 2:53:16environment. I'm going to directly
- 2:53:18activate that.
- 2:53:20See you can also use VS code terminal at
- 2:53:22the end both are same. So I'm using
- 2:53:23separate terminal uh because I like to
- 2:53:26use that. If you open the VS code
- 2:53:27terminal see what will happen. Let's say
- 2:53:29if I open the terminal. So it will
- 2:53:32occupy extra space here. Okay. So this
- 2:53:34code readability is not good here. So
- 2:53:36that's why what I do I use this separate
- 2:53:38terminal section. So I can anytime
- 2:53:41minimize it. I can anytime launch it.
- 2:53:42Okay. That's why
- 2:53:45you can use anything. Okay. No need to
- 2:53:47worry. Yeah. So now let's create an
- 2:53:49GitHub uh GitHub um repo. I think that
- 2:53:51I'm going to commit all of the code. I
- 2:53:53think that would be amazing. So I'm
- 2:53:55going to create a GitHub repo.
- 2:53:58So what I can do I can let's say
- 2:54:02um
- 2:54:05I can create a new repo
- 2:54:14H. [clears throat]
- 2:54:16So here I can name it as
- 2:54:23harness engineering
- 2:54:28and let's copy from here.
- 2:54:36I'll copy this name.
- 2:54:41Yeah, harness engineering uh in agent
- 2:54:47uh multi- aent demo
- 2:54:52and it's engineering multi- aent demo
- 2:54:59multi- aent
- 2:55:03demo.
- 2:55:09[clears throat]
- 2:55:10Now let's keep uh keep it as a public
- 2:55:12visibility and I'll take the readmi file
- 2:55:16or readmi I'm already having
- 2:55:19uh let's take the g ignore I'm using
- 2:55:23python programming so let's select the
- 2:55:24python
- 2:55:31python
- 2:55:34okay why python is not coming
- 2:55:39Now it's coming. Now give the name
- 2:55:43um license. You can take any license.
- 2:55:45That's I'll take Apache license and
- 2:55:47create the repo.
- 2:55:51After that I will clone this repository
- 2:55:53guys. Click on code. Copy this link
- 2:55:55address. Open up your folder and in the
- 2:55:58terminal just write
- 2:56:01get clone.
- 2:56:04Paste this URL.
- 2:56:10Okay. Now, let's clear. And uh what I'm
- 2:56:14going to do, I'm going to
- 2:56:16um
- 2:56:18copy all of this file
- 2:56:22and paste it here. And I'm going to
- 2:56:26remove it. H. [clears throat] Now, let's
- 2:56:28open up my V port again. Yeah. So, now
- 2:56:32my uh repository is available. Okay.
- 2:56:35Now, I can commit the changes anytime.
- 2:56:36Okay, but before that let me just
- 2:56:38activate my environment. I already
- 2:56:40activated. Now let's install the
- 2:56:42requirements. Okay, so let me mention
- 2:56:44all of the requirements you need here.
- 2:56:47So first in let me create a file.
- 2:56:54I'm going to name it as
- 2:56:56requirements.txt.
- 2:57:02And uh here I need fast API.
- 2:57:07Okay. Why am I uh I'll be using fast
- 2:57:08API? Because I also want to create a
- 2:57:10backend uh API and with a user interface
- 2:57:14user interface that's
- 2:57:17to run this
- 2:57:19first API server you need u
- 2:57:23okay let us start uh started. Okay.
- 2:57:25Yeah. So yeah these are the package guys
- 2:57:27we'll be installing. Uh let's install.
- 2:57:29So I'll open up my terminal and uh
- 2:57:31execute this command.
- 2:57:38Okay, for me it is telling requirement
- 2:57:40is already satisfied because I already
- 2:57:41installed previously. Okay, but for you
- 2:57:43it may take some time and it's a good
- 2:57:45practice uh whatever package you are
- 2:57:47installing right just try to get the
- 2:57:50version and mention it here. Why this is
- 2:57:53required? Because if you are running
- 2:57:54this project after one to one or two
- 2:57:57month uh if there is any package update
- 2:57:59you won't be having any kinds of
- 2:58:00problem. Okay. So let's first of all
- 2:58:03mention the first API version.
- 2:58:06Yeah this is the requirement. Okay.
- 2:58:08Don't worry I'm going to commit the
- 2:58:09changes. Okay. So this is my GitHub.
- 2:58:11Here I'm going to commit. Let me show
- 2:58:12you the GitHub link.
- 2:58:15So this is my GitHub link guys. Here I'm
- 2:58:17going to commit my changes. First of all
- 2:58:19let me complete. Okay,
- 2:58:26ginger basically helps to load the HTML
- 2:58:28CSS uh page code. Okay, Krishna in first
- 2:58:32API.
- 2:58:34So fast API, what is the package of uh
- 2:58:37version of fast API? It's 0.141.1.
- 2:58:41Okay, let's copy that and mention it
- 2:58:43here.
- 2:58:45Then uvicon. So what is the uon version?
- 2:58:49UV corn UV corn
- 2:58:52UV UV corn this one. Copy that
- 2:58:57and mention it here.
- 2:59:01Then ginger 2.
- 2:59:14This is the version.
- 2:59:17mention
- 2:59:19it here.
- 2:59:22Then python.v NV
- 2:59:31then lang graph
- 2:59:37lang graph this one
- 2:59:42and langen gro because we'll be using
- 2:59:45grock provider to access the grom
- 2:59:48langen gro this
- 2:59:55Yeah, I can do you with the help of Pphr
- 2:59:57freeze. But if you do pay phrase, right,
- 3:00:00it will save all of the dependency
- 3:00:01package. Let me show you. See all of the
- 3:00:04package. Okay, all of the package. Uh so
- 3:00:08I feel like okay this is like more uh
- 3:00:10confusing because at the end these are
- 3:00:12the package are required but these are
- 3:00:14the also dependency package. Okay,
- 3:00:15that's why I don't need to install it
- 3:00:17again. So if you mention that it will
- 3:00:19automatically install its dependency
- 3:00:21package. It's like more clean way to
- 3:00:23understand. Okay. Yeah. Otherwise people
- 3:00:25will ask sir what is uh this marks uh
- 3:00:28markup safe? What is light lm? Okay.
- 3:00:30These are the thing people may ask you.
- 3:00:32But again these are the package
- 3:00:35installed from this package only. Get
- 3:00:37it? That's why
- 3:00:40this is more clean way to understand.
- 3:00:43Okay. Now requirements is already added.
- 3:00:45We created the environment. Everything
- 3:00:46is ready. Now first of all here we'll be
- 3:00:50collecting the API key. So let's create
- 3:00:52a file. I'm going to name it as env. And
- 3:00:55inside that I'm going to collect my gro
- 3:00:57API key. Okay. Gro API key because I
- 3:01:00told you we'll be using grock class
- 3:01:02model. Sorry it should be equal sign.
- 3:01:07Okay. Now how to get the Gro API key
- 3:01:10guys? Simply you just need to visit
- 3:01:12Grock playground. Okay. Rock
- 3:01:17playground.
- 3:01:19Make sure you are creating one account
- 3:01:21if you don't have the account. I already
- 3:01:23have the account, guys. I'll just try to
- 3:01:25login with my account.
- 3:01:32[snorts]
- 3:01:35Okay. After login, uh there you have the
- 3:01:38API key section. But here you can see
- 3:01:39there are different different models you
- 3:01:41can access. Okay. I'll go to the API key
- 3:01:43section and here you can create a new
- 3:01:45API key. For me, I already created an
- 3:01:47API key called demo and this API key I'm
- 3:01:50going to save it inside my file and
- 3:01:53don't use my API key guys. Okay?
- 3:01:55Otherwise, let me create a new one so
- 3:01:56that I can remove it after this session.
- 3:01:58Okay? So, I'm going to name it as
- 3:02:00hardness demo.
- 3:02:05Make sure you are selecting no
- 3:02:06expiration and verify
- 3:02:10and submit.
- 3:02:18What model are free in GR?
- 3:02:23I'll tell you copy that
- 3:02:26and mention it here. Okay.
- 3:02:31Yeah. See, you can access you can access
- 3:02:34almost all the models. Okay.
- 3:02:37uh as free but there are some uh limit
- 3:02:40limit uh limit you will get okay that
- 3:02:42means the request limit that means in a
- 3:02:45single day let's say that much token
- 3:02:49input and output you can spend okay once
- 3:02:51it is done you are not eligible for the
- 3:02:54free tire again you have to try next day
- 3:02:57okay but if you want to uh hit unlimited
- 3:03:00request that time you have to take their
- 3:03:02premium subscription get it Krishna so
- 3:03:05almost all the model you can access from
- 3:03:06here.
- 3:03:11H so grock API we have collected. Now
- 3:03:14let's create a file
- 3:03:16called agent.py.
- 3:03:23Okay. Then I'm also going to create
- 3:03:25app.py.
- 3:03:28I'm also going to create
- 3:03:30graphpy.
- 3:03:34Okay. And again I'm not going to explain
- 3:03:36guys about the langraph uh what are the
- 3:03:39things where available inside lang
- 3:03:41graph. I'm expecting you are already
- 3:03:42familiar with lang graph. You don't know
- 3:03:44please try to complete the lang graph
- 3:03:45first of all. Okay. But here I'm
- 3:03:47expecting you are familiar with the uh
- 3:03:49this uh langraph concept. Okay. So here
- 3:03:51I'm not going to write the code from
- 3:03:52scratch. Okay. Because then if you
- 3:03:55understand the langraph component you
- 3:03:57can easily write the code. Okay. Most of
- 3:03:59the code uh readyto use code you can use
- 3:04:02it as it is.
- 3:04:05Okay. Now the first thing guys, we'll be
- 3:04:07developing the agents because if I show
- 3:04:08you my architecture. So this is the
- 3:04:11architecture.
- 3:04:16Yeah, here is the architecture guys.
- 3:04:18First of all, here we'll try to create
- 3:04:19all of the agent that means our
- 3:04:20technical agent, billing agent, general
- 3:04:23agent. Okay, let's create that. Then
- 3:04:25we'll try to combine them all together.
- 3:04:27We'll add the guards, router, reviewer,
- 3:04:29each and everything we'll try to create.
- 3:04:31So let's create the agent now.
- 3:04:35H. So to create the agent first of all
- 3:04:37you have to import some necessary
- 3:04:38library
- 3:04:40like I need operating system.
- 3:04:43You also need to import block. So from
- 3:04:46lang
- 3:04:48gro
- 3:04:50import
- 3:04:52chat block
- 3:04:54and we'll be using one model.
- 3:04:58The model name is
- 3:05:04Um 3.17
- 3:05:07llama 3.1
- 3:05:11llama llama llama
- 3:05:2138B
- 3:05:25llama there I think llama is there right
- 3:05:27this llama promg guard this model
- 3:05:30available model.
- 3:05:34Okay, no need to worry. Maybe I can use
- 3:05:36this model.
- 3:05:39This this model I can use. Open a GPT O
- 3:05:44O SS20p. Okay, this model I can use. And
- 3:05:47if you want to use this model, this is
- 3:05:49the model ID. You can copy
- 3:05:52and you can mention it here.
- 3:05:55Okay, this is the model.
- 3:05:58Then after that you have to
- 3:06:04one thing I want to verify
- 3:06:11this is fine
- 3:06:14H now uh what I will do guys I'll load
- 3:06:17this model okay for this let's create a
- 3:06:18function def get lm
- 3:06:26uh olden llama model maybe they have
- 3:06:27removed Okay. Yeah. Get lm and we'll
- 3:06:31just try to return
- 3:06:36um chat gro object that means our model
- 3:06:40object. Okay. Model endpoint.
- 3:06:44So model is equal to model name.
- 3:06:57Okay. Then you have to mention the
- 3:06:58temperature if you want. Now can you
- 3:07:01anybody tell me what is temperature?
- 3:07:04You know about temperature in LM right?
- 3:07:07That means this is the creativity
- 3:07:08parameter. Okay. API key is equal to OS
- 3:07:12dot get
- 3:07:16env.
- 3:07:17And I'm going to load the brock API key.
- 3:07:27So this is the APA key. Okay.
- 3:07:30Then after that let's test this model.
- 3:07:33Okay. Whether it works or not. So simply
- 3:07:35I'm going to call this function lm is
- 3:07:38equal to
- 3:07:41get lm
- 3:07:45and we'll do the invoke operation. lm
- 3:07:48dot invoke
- 3:07:53I'll give hello.
- 3:07:55Let's see whether it works or not. And
- 3:07:57the response I'm going to get, I'm going
- 3:08:00to print it here.
- 3:08:08So, I'll open up my terminal.
- 3:08:12Clear
- 3:08:14python
- 3:08:16agent.py.
- 3:08:18Okay. one error I'm getting which is
- 3:08:20that gro
- 3:08:23API key to the client plus gro API key
- 3:08:25in environment variable. Oh okay. Can
- 3:08:27anybody tell me the problem? Problem is
- 3:08:30that here I haven't loaded the env right
- 3:08:34from
- 3:08:36env
- 3:08:39load env. Okay. Now you have to load the
- 3:08:41environment variable. Now it should
- 3:08:43work. Let's see.
- 3:08:50Mhm. So you can see hello how I can
- 3:08:52assist assist you today. If you want to
- 3:08:54only get the content simply you can
- 3:08:56write r dot content. Okay.
- 3:09:05So it's working fine. Okay. So simply uh
- 3:09:08we are able to make the connection with
- 3:09:11our uh group provider. Okay. And we're
- 3:09:13able to access the large language model
- 3:09:15completely free. Okay, free of cost.
- 3:09:18Okay, now let's try to create our uh
- 3:09:21agent. So the first agent guys I'm going
- 3:09:23to create called technical agent. Okay,
- 3:09:25that means this agent
- 3:09:27technical agent and what technical agent
- 3:09:30will do it will handle the technical
- 3:09:31related query. Okay, so I already
- 3:09:33created one technical agent function.
- 3:09:35Let me show you very simple.
- 3:09:39So this is the technical agent function
- 3:09:42guys just try to see. Okay, what I have
- 3:09:43done, I created a function called
- 3:09:45technical agent. This takes the user
- 3:09:47question. Okay, and it calls the LLM.
- 3:09:50Okay, it calls the LLM and this is the
- 3:09:52LLM object. And here we are preparing
- 3:09:54the prompt, entire prompt for the
- 3:09:56technical question handling. So we are
- 3:09:58telling you are a technical support
- 3:10:00agent. Your job is to help with the
- 3:10:02login problem, API error, installation
- 3:10:04problem, bugs, technical setup. Explain
- 3:10:06the solution in very simple step. Never
- 3:10:08invent account specific information. If
- 3:10:11important information is missing,
- 3:10:13carefully say what the user should
- 3:10:15check. Okay. And customer question, this
- 3:10:18is the question and return only the
- 3:10:20helpful answer. Then we invoking the LLM
- 3:10:23with the prompt and taking the content
- 3:10:24and returning it. So guys, are you clear
- 3:10:26till here? Yes or no?
- 3:10:29Yes or no? Clear guys?
- 3:10:35Great. Now let me define the next agent
- 3:10:39which is billing agent. Okay. Billing
- 3:10:41then general then also reviewer. Okay.
- 3:10:44These are the agent we'll try to create
- 3:10:46one by one. H now again I prepared
- 3:10:49another agent called billing agent.
- 3:10:53This is what your billing agent. Okay.
- 3:10:55So again you can see the name of the
- 3:10:57function is billing agent. Takes the
- 3:10:59question calling the LLM. And this is
- 3:11:01the entire prompt. You are a billing
- 3:11:03support agent. Demo company policy.
- 3:11:05Start uh starter plan $10 per month. Pro
- 3:11:09plan $25 per month. Refund request must
- 3:11:11be reviewed by the billing team. Never
- 3:11:14claim that the refund has already been
- 3:11:16approved. Never asked for full card
- 3:11:18numbers or passwords. Customer
- 3:11:20questions. Always clear and safe safety
- 3:11:23uh safely using only the policy above.
- 3:11:25Okay. Then we invoking the LM returning
- 3:11:28the content. So in the prompt there is a
- 3:11:30constraint and oneshot example. Yeah,
- 3:11:33you can add the oneshot example. There
- 3:11:35is a constraint. You can also add the
- 3:11:36example. Okay. This is completely your
- 3:11:38designing. Okay. If you want to add this
- 3:11:40kinds of prompt, you can do that. The
- 3:11:42way I'm writing it's not necessary to
- 3:11:44write I mean you can also write the same
- 3:11:46thing. You can change it. Now uh bling
- 3:11:49agent is also ready. Now I'll try to
- 3:11:50prepare the general agent. Okay. Let's
- 3:11:53open the code again. And this is the
- 3:11:56general agent. So basically this will
- 3:11:58handle the general general question and
- 3:12:00answer. So this is the general question
- 3:12:02and answer. Again we are writing a
- 3:12:03detailed prompt about the general
- 3:12:05question and answer. we are returning
- 3:12:06the output. Okay. Then once we have
- 3:12:08created all three agents, okay, then
- 3:12:10we'll also create the reviewer agent.
- 3:12:11And what reviewer agent will do? It will
- 3:12:14review the output given from each and
- 3:12:16every agent. Okay. So again here I'll
- 3:12:19try to create a separate agent for that
- 3:12:21for reviewer agent it will take the
- 3:12:22questions as well as the draft. Okay.
- 3:12:24What draft? Each and agent every agent
- 3:12:26whatever draft it will return. Okay. It
- 3:12:29will take that draft and it will verify
- 3:12:31whether this question and this draft is
- 3:12:33looks good or not. So for this it will
- 3:12:36call the LLM and this is the entire
- 3:12:37prompt. You are the quality review agent
- 3:12:39in a production customer support system.
- 3:12:41Check the draft for uh draft answer for
- 3:12:45uh clarity relevance unsafe request or
- 3:12:47password card number unsupported uh
- 3:12:49guarantees unnecessary complexity. Uh
- 3:12:52rewrite the answer if needed. Okay. Keep
- 3:12:54the final answer concise and beginner
- 3:12:56friendly original uh customer question.
- 3:12:59And this is the draft answer we got from
- 3:13:00the agents and return only improved
- 3:13:03final answer. Okay. Okay. And we are
- 3:13:04invoking the LM again. Okay. So this is
- 3:13:06our our reviewer agent is that means all
- 3:13:10of the agents we have created
- 3:13:11successfully. Now we'll try to create
- 3:13:13the graph. Okay. Because in lang graph
- 3:13:16the graph object is the main object we
- 3:13:18create. Now I'll try to define the graph
- 3:13:20here.
- 3:13:22Yeah. Let's commit the code code guys
- 3:13:23till here. So what I'm going to do I'm
- 3:13:25going to commit the code. So, get add
- 3:13:28space dot G
- 3:13:32commit
- 3:13:34n
- 3:13:39um
- 3:13:41agents added
- 3:13:46name get push
- 3:13:49origin
- 3:13:54meth
- 3:14:00So code is pushed. Now if I show you my
- 3:14:02GitHub.
- 3:14:05So code is available now. Okay. You can
- 3:14:07test. You can check my GitHub guys.
- 3:14:25Okay, now we'll try to create the graph
- 3:14:27guys. Okay,
- 3:14:29so this graph is everything inside lang
- 3:14:31graph. So let's try to import some
- 3:14:34necessary library. I need
- 3:14:37this
- 3:14:39type dict and literal from typing. Then
- 3:14:42from lang graph I need state graph start
- 3:14:44and end. Again don't ask me where we are
- 3:14:47importing that because again I told you
- 3:14:49this is the concept of lang graph and to
- 3:14:51create the lang graph graph guys I need
- 3:14:53this at the libraries okay for this you
- 3:14:55have to please study about lang graph
- 3:14:56okay this is the requirement now
- 3:14:59whatever agents we have created guys
- 3:15:01inside our agents file we'll also import
- 3:15:04that one by one so import first of all
- 3:15:07we'll import the technical agents then
- 3:15:11billing agent
- 3:15:13Then
- 3:15:15we have general agent. Then we have
- 3:15:19review our agent. Okay, we'll import all
- 3:15:22of the agents. After that we'll try to
- 3:15:24create a state memory. Okay, I told you
- 3:15:26state memory is also part of a harness.
- 3:15:29Right. So in lang graph we create a
- 3:15:30state memory like that. We just write a
- 3:15:33custom class for that. Let's say the
- 3:15:35class name is support state and this is
- 3:15:37inherited with a type dict. Okay.
- 3:15:38Because type dict is a type. This will
- 3:15:40store your data as a dictionary. And you
- 3:15:43can also store this dictionary in a
- 3:15:45permanent database. If you want, you can
- 3:15:47also intrigate a database. We call it as
- 3:15:50a state memory database. Again, this is
- 3:15:53a concept of langraph. Uh you have to
- 3:15:55study about. Okay. You can either use
- 3:15:57postgraq, either you can use SQLite, any
- 3:16:00kinds of database you can integrate
- 3:16:01here. Okay. But as of now, I'll try to
- 3:16:03save everything in the memory. That
- 3:16:05means my RAM. So here I have taken some
- 3:16:08variable in this memory guys. The first
- 3:16:10uh variable is the questions that means
- 3:16:12whatever question user will ask it will
- 3:16:14save inside the question variable then
- 3:16:16route okay route means let's say here
- 3:16:20so let's say the question user is asking
- 3:16:24and router is deciding what kinds of
- 3:16:27agent should be running let's say for
- 3:16:28technical question technical agent
- 3:16:31should be calling from the router so
- 3:16:34this information will save inside the
- 3:16:36router variable guys okay route then
- 3:16:38draft Draft draft means each and every
- 3:16:40agents will generate some draft. This
- 3:16:42draft result will try to save inside
- 3:16:45this variable. Okay. And final answer.
- 3:16:47Final answer means your reviewer agent
- 3:16:49if it generates any kinds of final
- 3:16:51answer after reviewing it, we'll try to
- 3:16:54save it here inside the final answer.
- 3:16:56Then block. Block means if your guards
- 3:16:59blocked some kinds of request, okay, or
- 3:17:01if accepts, we'll try to save inside
- 3:17:03this particular variable. And trace.
- 3:17:05Stress means all of the execution we'll
- 3:17:07be doing right whatever things are
- 3:17:08happening in in between each and every
- 3:17:10node we'll try to save that information
- 3:17:12in the tra and this is going to be a
- 3:17:13list type data okay that means inside
- 3:17:16the list we'll try to continuously add
- 3:17:18on the u execution trace okay this is
- 3:17:22how our uh uh state look like okay
- 3:17:27can you use neo4j as a memory uh neoforj
- 3:17:30is not recommended in langraph but you
- 3:17:32can use postgress this is the most used
- 3:17:35one another because here graph database
- 3:17:38is not required. Okay, because this is
- 3:17:40statewise uh I mean memory
- 3:17:44we need.
- 3:17:49Okay, now successfully we have created
- 3:17:51the state. Now we have to create the
- 3:17:53guardrails guys because guardrails is
- 3:17:55also a harness inside a agent. Now let's
- 3:17:58create this harness function. I'll write
- 3:18:01a custom function for this harness.
- 3:18:03Sorry uh this one um guardrails.
- 3:18:08So this is the custom function I have
- 3:18:10created guys
- 3:18:13node. So this takes the state state
- 3:18:16memory and uh what it does this is a
- 3:18:20simple deterministic safety layers. It
- 3:18:21in real uh system this can be included
- 3:18:24uh moderation p detection okay parition
- 3:18:27and policy checks. Again I told you
- 3:18:29guard itself is a big topic you have to
- 3:18:31understand it separately for this I
- 3:18:33already have a tutorial you can check it
- 3:18:35out. So first of all we are checking the
- 3:18:37uh questions user questions and this is
- 3:18:40the deterministic one and what does
- 3:18:42deterministic means? Deterministic means
- 3:18:44that means it is a conditional based
- 3:18:46guardness. Okay if you want you can also
- 3:18:48use LLM based guardness but for LLM you
- 3:18:50have to take one LM here and you have to
- 3:18:53give a prompt whether the user question
- 3:18:55having any kinds of uh let's say harmful
- 3:18:58violation sexual content or not. Okay,
- 3:19:00if it is having just try to block
- 3:19:02otherwise don't block and here we are
- 3:19:04using the u this one actually
- 3:19:06deterministic one that's why we are
- 3:19:07taking a list inside list we have taken
- 3:19:10some sentence like give me your password
- 3:19:12steal password full credit card number
- 3:19:15if these are the information is
- 3:19:16available just try to block it okay and
- 3:19:19save the trace in my trace state okay so
- 3:19:23you can see if blocked just return this
- 3:19:25particular output to the customer or
- 3:19:28user I can't help you with this request
- 3:19:29just involving the password, stolen
- 3:19:31credential or full payment informations.
- 3:19:34Otherwise, just try to make this block
- 3:19:36as false. Okay, that means if my content
- 3:19:39is having any kinds of sexual harassment
- 3:19:41violation content, it will block. That
- 3:19:43means block parameter would be true. If
- 3:19:45it is true, that means we'll just stop
- 3:19:47the execution of the workflow and we'll
- 3:19:49show the user we can't help you with
- 3:19:51that. If doesn't if it doesn't have the
- 3:19:54violation that time, we'll just try to
- 3:19:55make it as true. Okay, then we'll just
- 3:19:57try to execute the remaining workflow.
- 3:19:59That means we'll try to execute our
- 3:20:01router, our technical agent, billing
- 3:20:03agent, okay, reviewer agents, everything
- 3:20:05we'll try to execute. So this is what
- 3:20:07your guards function is guys. Okay. And
- 3:20:09this is a custom function you can use
- 3:20:10either as it is. Guards is a part of
- 3:20:14governance. Yeah, you can consider it's
- 3:20:16a part of also governance. Okay. Now
- 3:20:18this is another function I have written.
- 3:20:20After guards, what will happen? That
- 3:20:22means if my state is blocked that means
- 3:20:24directly my node will go to the end node
- 3:20:27that means my execution will end
- 3:20:28otherwise it will go to the router node
- 3:20:30that means router node will decide. See
- 3:20:32what is happening if your guard checks
- 3:20:35any kinds of input which is having
- 3:20:37violation it will go to the directly end
- 3:20:39nodes that means execution is over no
- 3:20:41more execution but if it is if it
- 3:20:43doesn't have the violation that time it
- 3:20:46will return this user input to the
- 3:20:48router. So this is the function it will
- 3:20:50do. So till here guys everything is
- 3:20:52clear all of you and again I'm telling
- 3:20:55you if you know about langraph this
- 3:20:57would be easy for you to understand but
- 3:20:59if you don't know it would be a little
- 3:21:01bit harder for you get it yeah
- 3:21:06now we'll try to create this router node
- 3:21:08guys okay now router will decide based
- 3:21:10on the user question where it should
- 3:21:11send the request whether it should
- 3:21:13should send a request to technical agent
- 3:21:15billing agent or general agent okay so
- 3:21:17let's try to define that particular
- 3:21:19function so here what I'm going to do
- 3:21:22guys I'm going to
- 3:21:25I'm going to just create a function
- 3:21:30this is the function guys actually two
- 3:21:33function I have created
- 3:21:37now here we have created this router
- 3:21:38nodes guys so what router node does
- 3:21:40based on the user question first of all
- 3:21:42it will check the technical words okay
- 3:21:44now see again I'm using the
- 3:21:46deterministic approach just to show you
- 3:21:47the demo but in real world you have to
- 3:21:49use some kinds of large language model
- 3:21:51to understand the user intent or user
- 3:21:53questions whether this is technical
- 3:21:55whether this is billing or whether this
- 3:21:56is any kinds of general question answer
- 3:21:59so here I created a list for the
- 3:22:00technical question answer if this
- 3:22:03question is having any kinds of error
- 3:22:05bug logging API installation related
- 3:22:07word I'll consider this is a technical
- 3:22:09word technical questions if it is having
- 3:22:11this kinds of word like price pricing
- 3:22:13payment refund bill I'll consider as a
- 3:22:14billing word okay and if it is having
- 3:22:17none of them that means I can consider
- 3:22:18this is a general one okay so So this is
- 3:22:20what we are writing this condition here
- 3:22:21and we're returning the router. Now here
- 3:22:23I have created another function called
- 3:22:25choose agent. So this what this choose
- 3:22:26agent will do let's say if our router
- 3:22:29okay if our router is equal to is equal
- 3:22:31to technical it will call technical
- 3:22:33agent. If our router is equal to is
- 3:22:35equal to billing okay that means if it
- 3:22:37is returns like billing that means we'll
- 3:22:39call the billing agents otherwise we
- 3:22:41call it as a general agents. Okay, now
- 3:22:43we have already created all of the
- 3:22:44agents, technical agents, okay, then
- 3:22:47billing agents and our general agents.
- 3:22:49We'll call these are the agents one by
- 3:22:51one. And this function will redirect
- 3:22:53here. That means this condition we are
- 3:22:54writing right now. I hope this part is
- 3:22:56clear guys. Okay. Now let me write the
- 3:22:58next code which is nothing but our uh my
- 3:23:01nodes. Okay. Now I'll try to define all
- 3:23:03of the nodes.
- 3:23:05Let me define the nodes because in
- 3:23:06langraph nodes is important. You have to
- 3:23:08create the nodes separately.
- 3:23:10So this is the nodes. Okay, the first
- 3:23:12nodes I have created for the technical
- 3:23:14nodes. Basically, this hits the
- 3:23:15technical agents. Okay, if you are
- 3:23:18having a technical related question, it
- 3:23:20will hit the technical agents and it
- 3:23:21will return you the answer. Okay. And
- 3:23:24every every execution are tracing this
- 3:23:26information in the state memory. Then
- 3:23:29billing nodes, it will hit the billing
- 3:23:30agent. Okay? Then general node, it will
- 3:23:33hit the general agent. Then review node,
- 3:23:35it will hit the review agent. Okay? That
- 3:23:37means all of the agent we have imported,
- 3:23:38we are executing one by one. Get it? So
- 3:23:41once we have defined all of the nodes,
- 3:23:43now we'll try to create the graph. Okay.
- 3:23:45Now how to create the graph? Again, this
- 3:23:47is super simple.
- 3:23:50Uh let me show you.
- 3:23:53This is the graph guys.
- 3:23:56If you understand graph in langraph, it
- 3:23:58would be easy for you. So first of all,
- 3:24:00we are adding all of the nodes one by
- 3:24:02one. First of all, we're adding the
- 3:24:03guard node, router nodes, technical
- 3:24:06agents, billing agent. Then
- 3:24:10just a minute.
- 3:24:14Okay. Then general agent, reviewer
- 3:24:17agent. Then we are adding the agents.
- 3:24:19That means the connection between the
- 3:24:21agents. That means here this uh router
- 3:24:24agent would be connected to the
- 3:24:25technical billing. Then general
- 3:24:28technical would be connected to the
- 3:24:29reviewer. Billing would be connected to
- 3:24:30the reviewer. General would be connected
- 3:24:32to the reviewer. So this is called edge
- 3:24:33connections. Okay. So we're doing the
- 3:24:35edge connection. First of all, what is
- 3:24:37happening? See start would be connected
- 3:24:39to the guardrails. That means whatever
- 3:24:40user will give it will connect it to the
- 3:24:42guardrails. Okay. Then after guardrails
- 3:24:44what will happen? After guardrails it
- 3:24:46will connect it to the router. After
- 3:24:48guardrails it will connected to the
- 3:24:50router. That means router will decide
- 3:24:52and that's this is a conditional edges.
- 3:24:54That means if my guardrails accepts it
- 3:24:57will in uh hit the router otherwise it
- 3:24:59will end the hit the end end nodes.
- 3:25:02Okay. Then again conditional ages. So
- 3:25:04after router chooses the agents that
- 3:25:06means I have three types of agents. One
- 3:25:08is technical, billing and general. Okay.
- 3:25:10So it will choose one of them. Okay. If
- 3:25:13my router is is equal to is equal to
- 3:25:14technical then it will use the
- 3:25:16technical. If it is billing it will use
- 3:25:17the billing. Otherwise it will use use
- 3:25:19the general. Then technical to reviewer.
- 3:25:22You can see this connection is done. Now
- 3:25:24technical to reviewer, billing to
- 3:25:26reviewer. General to reviewer. So you
- 3:25:29can see technical to reviewer. Billing
- 3:25:31to reviewer. General to reviewer and
- 3:25:32reviewer to end. Okay. So review to end.
- 3:25:36This is what our age connection. Okay. I
- 3:25:39think you know the graph. Okay. Graph
- 3:25:40and you connect the graph. Okay. This is
- 3:25:42called the graph and its connection. We
- 3:25:44call it as the age connections. Okay.
- 3:25:46And after that at the last you have to
- 3:25:47compile the graph. So once you have
- 3:25:49compiled the graph now your agent
- 3:25:51workflow is ready. Now you have to
- 3:25:53invoke this agent workflow. For this we
- 3:25:55are using this particular function. So
- 3:25:58run our agent. It will take the
- 3:25:59question. It will initialize our state
- 3:26:01memory. And we are invoking. Okay, with
- 3:26:03the help of initial state and whatever
- 3:26:05result we are getting, we are returning
- 3:26:06it. That's it. Okay, so our agent is
- 3:26:09ready guys. Okay, now we'll try to test
- 3:26:12this particular agent. Okay, we'll try
- 3:26:14to test this particular agent. So what
- 3:26:16you can do either you can test in your
- 3:26:17terminal, either you can add a front end
- 3:26:20user interface. Okay, now let's try to
- 3:26:21add a front- end user interface and
- 3:26:24let's test this particular application.
- 3:26:26So again what I'm going to do, I'm going
- 3:26:27to create my app.py right now. So how
- 3:26:30many of you are familiar with past API
- 3:26:32here? How many of you familiar with fast
- 3:26:33API? Do you know fast API? So if you
- 3:26:36know fast API again it would be easy for
- 3:26:38you to understand. But if you don't know
- 3:26:39again you have to learn the first API.
- 3:26:41See that's why we are learning the
- 3:26:43advanced concept guys. Okay. Right now
- 3:26:45things are different. There are lots of
- 3:26:47requirement. You have to first of all
- 3:26:49study to learn this concept. Okay. Yeah.
- 3:26:54Now let's define the fast API code.
- 3:26:56Again I need some necessary libraries
- 3:26:58like path limbbon fast from fast API.
- 3:27:01These are the libraries are required.
- 3:27:03Then I also need to import this function
- 3:27:06my main function which is
- 3:27:09this one run support system. Okay, let's
- 3:27:12import it as well. So from
- 3:27:16graph
- 3:27:18import
- 3:27:22run support system. Okay. Now first of
- 3:27:25all let's try to load our environment
- 3:27:28variable. After that, let's create the
- 3:27:31fast API app object and mount our static
- 3:27:33and template folder.
- 3:27:37So here we are creating the app object
- 3:27:39for the fast API. We are giving the
- 3:27:41title hardness engineering multi- aent
- 3:27:43demo. We are creating the base
- 3:27:45directory. After that we are mounting
- 3:27:47our static folder as well as the
- 3:27:48templates folder. Now we have to create
- 3:27:50two more folder guys here. One is the
- 3:27:52static folder
- 3:27:54and one is the templates folder. And
- 3:27:57inside templates you keep the HTML file.
- 3:27:59Okay. And inside static you keep the
- 3:28:01JavaScript and CSS file. Now let's
- 3:28:05define that. So inside HTML
- 3:28:08I'll create a file called index dot
- 3:28:13HTML.
- 3:28:15Again guys if you don't know about HTML
- 3:28:17CSS don't need to worry. There would be
- 3:28:18different team for that. They will
- 3:28:20create the front end interface for you.
- 3:28:23But if you don't know about HTML CSS,
- 3:28:24you can simply generate these are the
- 3:28:27code from chgptt. So you can what you
- 3:28:29can do you can open up your graph and
- 3:28:31copy this code and ask chart gpt to
- 3:28:33generate a user interface. Automatically
- 3:28:34we'll get this HTML CSS and JavaScript
- 3:28:37code. Okay. I have also done the same
- 3:28:38thing. But if you know about HTML CSS,
- 3:28:41you can modify as per your requirement
- 3:28:42the user interface. Okay. Yeah. So now
- 3:28:45let's define HTML page. So I already
- 3:28:48created a basic template guys. This is
- 3:28:49the HTML code I generated from chat GPT.
- 3:28:52Okay. Now with it uh with this I also
- 3:28:54need a CSS. Okay. CSS design and
- 3:28:56JavaScript. So let's create another file
- 3:28:58inside static called style
- 3:29:05style.js
- 3:29:07sorry style dot CSS.
- 3:29:11And for JavaScript I'll create script
- 3:29:17script.js.
- 3:29:20JavaScript to hit our API request. Okay,
- 3:29:23the API endpoint. For this, I need the
- 3:29:25JavaScript.
- 3:29:27Now, this is the HTML, sorry, this is
- 3:29:29the CSS design, the color, gradient and
- 3:29:31everything.
- 3:29:35And to execute your endpoint, this is
- 3:29:39your
- 3:29:41JavaScript.
- 3:29:43Okay, here I'm going to create some of
- 3:29:44the route. So, to hit the route, that
- 3:29:47means the main route should be / API
- 3:29:49chat. So if you hit this route your
- 3:29:51application will run and it will get the
- 3:29:53response. Okay. Now let's try to define
- 3:29:55our app.py.
- 3:30:01Now let me define all of our route guys.
- 3:30:07So this is the first API route I
- 3:30:09created. Okay. This is the default
- 3:30:10route. Basically this will load our HTML
- 3:30:12page. User will be able to see the
- 3:30:14landing page. And this is our chat
- 3:30:17route. If user gives a prompt and hit
- 3:30:19click on the button, it will start the
- 3:30:21chat operation. It will run my support
- 3:30:24system that means this function that
- 3:30:26time. Okay. Yeah. And we are writing uh
- 3:30:28we are running this uh application to
- 3:30:30the local host port number 8080. Okay.
- 3:30:33Now let me execute and show you. Clear
- 3:30:37python app.py.
- 3:30:40It's running. Let's open up our browser.
- 3:30:43Search for localhost port number 8080.
- 3:30:46Enter. Now see that's how your interface
- 3:30:48looks like. Again I kept this interface
- 3:30:50very simple. Now guys let me give a
- 3:30:52questions. So here I already given some
- 3:30:55okay I already given some let's say demo
- 3:30:57questions. So let's say first of all
- 3:30:58I'll try with technical questions. So if
- 3:31:01I click on technical you will see that
- 3:31:02automatically prompt will be generating.
- 3:31:05I'm getting an API error. How can I fix
- 3:31:07it? So as per your knowledge guys what
- 3:31:09is the type of this question? Whether
- 3:31:11it's technical billing or general, tell
- 3:31:13me whether it's technical billing or
- 3:31:16general.
- 3:31:17What my router should do? What my router
- 3:31:20should do? It will route to where to the
- 3:31:23technical agent. Right? Let me show you.
- 3:31:25So if I run this multi- agent
- 3:31:28now see this is the final answer. Now
- 3:31:30see technical agent has been triggered
- 3:31:33and this is the draft we are getting
- 3:31:35from the final reviewer agent. Okay,
- 3:31:37that's how we can solve this API
- 3:31:39problem. Okay, you can see this is the
- 3:31:42harness execution trace. Okay, now let
- 3:31:45me try with another request. Let's say
- 3:31:47billing. Now I'm going to try with the
- 3:31:48billing one. How much the pro plan and
- 3:31:51can I get the refund? Now it should hit
- 3:31:53that uh billing agent. Let me show you.
- 3:31:56It will automatically redirect to the
- 3:31:57billing agent. Now see billing agent has
- 3:31:59been triggered. This is the answer you
- 3:32:01are getting. Now let me try with the
- 3:32:03general question and answer. I'll click
- 3:32:04on general. What can your support team
- 3:32:07help me with it? Okay. Okay. Now if I
- 3:32:09run the um multi- aent now see it is
- 3:32:12hitting the generator out. Okay. Now we
- 3:32:14are getting the generator response.
- 3:32:15That's how guys the entire things is
- 3:32:17working. And to implement this multi-
- 3:32:19aent we added the harness here. Harness
- 3:32:22concept here. Get it guys?
- 3:32:27Clear all of you? Yes or no? this
- 3:32:29practical example that that means at the
- 3:32:32end the same agent implementation only
- 3:32:35all of the tools integrating all of the
- 3:32:37component we're adding and creating this
- 3:32:39fully automated agent this is called
- 3:32:41harness
- 3:32:43how to recommendation
- 3:32:45I didn't get your question nar how to
- 3:32:47recommendation means
- 3:32:57can we enter billing questions
- 3:33:00when we click in general tab.
- 3:33:05Can we enter billing questions when we
- 3:33:08click general tab?
- 3:33:11Yeah, you can also give your own
- 3:33:12question here. Tell me about Python
- 3:33:19API error.
- 3:33:26So this is technical you can see right.
- 3:33:33Okay. Again let me commit the changes.
- 3:33:35You can take this code and you can run
- 3:33:36in your system. I think you'll be able
- 3:33:39to understand. So updated the code.
- 3:33:43Yeah. Personal details. Let me show you
- 3:33:51this part [clears throat] is done.
- 3:33:56H. So let's say here now if I'm asking
- 3:34:03give me your
- 3:34:06password.
- 3:34:10Now see I can't help you with the
- 3:34:12request involving password stolen
- 3:34:13credential or full payment card
- 3:34:15information harness execution trace
- 3:34:17guards check the request get it that
- 3:34:20means uh guard is blocking the request
- 3:34:23that time
- 3:34:26clear
- 3:34:31again this is just a demo application
- 3:34:33but in real world things are more uh
- 3:34:35complicated things are more bigger maybe
- 3:34:38uh in a different things we'll learn And
- 3:34:40that's why we are focusing on this
- 3:34:42particular course guys AI uh forward
- 3:34:44deployed engineer okay FD position and
- 3:34:47mostly inside this particular job role
- 3:34:50guys you will try to implement this
- 3:34:51kinds of agent complete end to-end
- 3:34:53solution this kinds of multi- aents okay
- 3:34:56from the beginning each and everything
- 3:34:57we are taking care if you go to the
- 3:34:59curriculum okay definitely will love a
- 3:35:01lot okay that's why it's a five month
- 3:35:03duration course lots of thing we're
- 3:35:05going to learn here okay because in a
- 3:35:07single webinar it's not possible to take
- 3:35:09all of these This implementation it
- 3:35:11takes time okay it takes time to
- 3:35:12understand the concept before that right
- 3:35:14once we understood all of these concept
- 3:35:17right then we can implement the end to
- 3:35:19end project with a list let's say Stop
- 3:35:22them.
About this transcript
This page contains the full transcript of Loop Engineering And Harness Engineering Crash Course by Krish Naik, generated from the public captions YouTube serves with the video. The transcript has 34,113 words across 5,157 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.