Intro · 6:49
What is Codex?
Codex as an AI coding agent that works through APIs and tools.
- Codex is OpenAI's coding agent.
- Agents access tools and APIs to act.
- A complete one-shot course.
| Concept | Meaning |
|---|---|
| Codex | Coding agent |
| Agent | Acts with tools |
| API | Access to services |
Do this in your own tools, step by step. Ticks are saved on this device.
What is Codex?
OpenAI's coding agent.
How do agents act?
Through tools and APIs.
0:00 My name is On Parya and in this complete one shot video, we will talk about Codex. So whether you have used Codex before or you are completely new to Codex, this video will help you out. Because we are going to start everything from scratch to building our own full stack application using Codex. So with that note, let's get started. So what is Codex? See, we already know that when Chat GPT was launched in 2022, people used it so aggressively.
0:50 Not because it was something new, but because it gives them in-person feel. They actually feel like that there's someone who is chatting with them and solving their queries based on their questions. And whatever the response it generate, they just copy and paste it wherever they want to use. And even most of the people consume AI for the very first time because of Chat GPT. Although AI was available way back, but they were not aware about it.
1:27 And for this type of AI workflow, we got the term in AI which is known as Generative AI. But now in 2026, things has changed. AI has evolved a lot. This time, it's not only about generating the response, but also letting the AI to do the task on the behalf of you and also parallelly with you. And for these type of capabilities in AI, we call them as AI agents. And Codex is one of the AI agent which is built by OpenAI.
2:08 And there are some other agents also available, like we have Claude Code from Anthropic and we have Replicate, Bolt New and others. And all the main purpose of these AI agents, to do the task, whatever the instructions you have given to it. Now just like the humans, when we do any task, how we actually perform that task? We first do planning in our mind, that we gather all the resources that are required to take action for that task.
2:41 And once we've done all the planning, we start executing it with the help of actions. Same like that, these agents work. So this agents works on these three principles. First one is reasoning, where it does the planning and thinking based on the task you have given. Then, it will do act. Now when it comes to act, it actually acts with the help of tools. But now what is tools? See, tools are some external set of programs or instructions which help AI agents to get the resources outside of your environment.
3:24 Now what does that mean? Suppose you are using Codex inside your project and inside that project, you want your Codex to get access to the API which is a part of internet. So to get access to that API, how will it get access? It will get access with the help of tools. And not only limited to the API, although if you want to access to any file from your project and want to edit any code inside that, all those things will be done with the help of tools.
3:56 In short, tools give the capabilities to AI agents to get access to that particular thing, which is required for the task. So it will act based on the tools. And now the next thing is access memory. So just like we human, store the things in our mind, so that later on, if we want to do the same task again, we don't have to start everything from scratch. Instead, we will get it from our memory and then execute it.
4:27 Same like that, the AI agents also have short-term and long-term memory. Based on the task we have given. And later on, if the same task you want to do it again, it will do it from its memory. Instead of starting everything from scratch. And this reasoning and act, we together call them as ReAct. It basically means planning and then taking actions. Now, if we want to show you the entire workflow of AI agents with the help of an example, so suppose, a user asks a question, which says, what's the weather in my city?
5:11 Now, when user asks this type of questions, the first thing AI agents will do, it will do the planning. It will first see, user has not specified the city. All the plannings it will do, it will see that my city, determine user's locations, need weather informations, and then plan. What is the plan now here? Find locations, fetch weather, and summarize the result. So these are the planning or the thinking your AI agents will do. And once this is complete, it will start taking an action.
5:23 Now the first thing is that, it needs a location of your city. Otherwise, how will it get to know the weather of it? So it will take the help of tool, as we discussed before, that act basically takes the help of tools, through which it will get access to the external resources. So here also, it will take the help of location tool and it will observe that location is XYZ, or name of the city, in India.
5:23 And once it is done, it will reason again. Now, planning is required because first we need to fetch the location and once that agent is done, it will now know the city, it will now fetch the current weather. So again, action, take. And here, it will call weather API. And again, once the weather API get fetched, it will do the 34 degrees Celsius, partially cloud, humidity 58 percent. So this is the response it generate for you.
5:23 And this is your final result in the form of natural language answer. And you got the response. So this is how the entire AI agents actually work. And not only with the Codex, but all the AI agents works in the same principle. Now, the flow I have shown you here is just a win-win flow. me everything works successfully here. But in case if anything gets failed in between, let's say when it doing the action for the calling the weather API and in between the weather API gets failed due to some catastrophic events, let's say a network issue or some HTTPs code, whatever the reason, if it get failed, then what will happen?
5:00 It will run the loop again. It will again do the planning, this like it does here for the planning, same if any error occurs in between, it will do the same thing again. And that we call them as agentic loop. means if any error comes in between, we don't have to put the error again back to it and then ask that solve this error. Instead, it will look at the result and based on that, it will do the things again until it received the final output for us, based on our query.
5:20 So, this is how the AI agents work. Now, if we talk about the codex particularly, then codex is not only limited to the software engineering field. That means you are not going to use codex for instruction based on your code base. Even though if you are a non-technical person and you want the codex to do some task for your work, let's say you want to send an email to that particular email address through your Gmail app and want to send particular subject.
6:00 At that time also, codex will work there. And even though if you want to execute the codex to the particular app in your computer, then also your codex will work there. But the thing is that the main purpose of codex is to design a trained in a software engineering field. That's why open AI basically used GPT 5.5, 5.4 models which has specifically trained in software engineering field. So, it's a win situation for people who are using it codex for the developer point of view.
6:20 But for the non-technical person, it will work but not up to the mark or not up to the desired output. So, that's all about the codex. I hope you get the clear picture, what is codex and how these codex AI agents actually works. So, as we discussed now, that just like codex, there are a bunch of agents out there, like Cloud code, cursor, co-pilot, and few more. And when we start exploring them, only one thing keeps increasing and that is confusion.
6:40 We feel like that why all these agents available when they all works on the same principle. Like first they do planning, then taking actions, and then storing in the memory for reference. Okay. Now, the next step is we need to commit this file. So I'll just simply say, create an initial commit or maybe I'll just say that create my public GitHub repo. So it will automatically make sure that okay, if you want to create a repo, it should first have a file with the commit message.
6:00 So it will automatically create a commit message, push our file and then create a public repo. So I'll just simply write here, create a GitHub or I'll say, create a public GitHub repo. Then click enter. It will first look in our GitHub account, that whether we are authenticated or not. And once it confirm, it will then look at whether the same named GitHub repo is available or not in the GitHub. If it is available, it may use a different name or maybe it will tell us that this name is already available, you should choose a different name.
6:40 By the way, we have not given the name of the repo, it will automatically fetch the name based on the project we have given. It will now ask, do you want to run the Git in it? Yes, we want to run. So first, it will initialize the Git. As I told you before, it will automatically understand that if you want to create a Git repo, previous steps are required, like we need to create a Git init, commit and then push GitHub and then only our repo will be available.
5:40 And let's say I've given the task that one agent should do search code, another one should write a code, and the next one should run the test case. And I'll say also, once these all tasks get executed, summarize all those tasks, do a merge result and then give me the final output. So who will be responsible for my final output? Of course, my main agent. Because that
Get the other 14 chapters, the exam and your certificate for LinkedIn, plus all 700+ AI courses.