This week of learning Gen AI was spent in learning Agent SDK and building our own Cursor AI. Agent SDK is going to be the new way of using Agents LLM Model and building gen AI projects on top of it.
Agent SDK , by Open AI , are very well versed in tool calling. Tool calling is : giving tools to LLM so it can perform a given task. But wait .. does that mean our LLM cant do a task , due to which we’ll need to call a tool ? Let’s explore this.
So assume you ask any AI chatbot , tell me weather of my city (obviously write your city’s name) , and you’ll see it’s unable to give an answer (ask question using javascript and pass it to model , don’t go online as they can do tool calling). We observe that we cant get our answer , but we can manually write a method where we can get city’s name , pass it to the method and get the weather details from any 3rd party API.
But the problem remains , how it helps us ? Actually it helps us by enhancing our AI-Bots’ capability to perform a task. Refer the below github where we have made it possible.
Code : https://github.com/Ashdeep-Singh-97/CursorAI
Now you might ask , all this for a weather ? well actually no , you can enhance your AI-Bot’s working by writing a tool to push code to github , fetch somebody’s detail or even write a message on whatsapp and send it to someone. All this made possible using tool calling, just write the correct tool and inject it into the LLM you’re using , so your LLM knows it has a tool at it’s disposal for a particular task.
Now , lets see how you can build your own cursor. It’s easy , just make some tools to do some tasks , like execute a command , push code to github etc and you’re good to go. Refer github for some inspiration.
And that’s all. Trust me it’s easier than it looks. Just give it a try.
And keep following for more.
Peace.
Top comments (0)