YouTube Deep SummaryYouTube Deep Summary

Star Extract content that makes a tangible impact on your life

Video thumbnail

AI Apps Will Now Be Built on the Claude Code SDK

AI LABS • 2025-06-15 • 8:25 minutes • YouTube

📝 Transcript (245 entries):

AI agentic coding has completely changed. And I'm not talking about the usual updates or new features. I'm talking about a fundamental shift in how we can interact with AI coding tools. This shift is real and it's all because of Claude codes SDK. What's better than an agentic coding tool? A programmable agentic coding tool. Programmable agentic coding is the future of software engineering. And it's because we're not just using AI tools anymore. We're building them into our systems, making them work exactly how we want them to work. Claude Codes SDK has completely changed the landscape. Now you can have intelligent coding agents running as subprocesses in the background doing whatever you program them to do. I'm going to show you how Claude's SDK actually works and why this is going to change how you view AI coding. Let's dive in. So this is the official documentation of the Claude Code SDK which essentially allows you to programmatically integrate Claude code into your own scripts or even full-scale applications. Basically, it turns Claude Code into a subprocess that can be called from anywhere and the instructions inside your prompt can be designed to do anything you want. This is a huge deal because now you can program one of the best coding agents in whatever way you want. and I'll show you how powerful this is with a realworld example that Claude Code has built themselves. These docs provide everything that you need to know about the SDK. As of now, it can be used with the command line, TypeScript, and Python. But before we get into the video, you need to understand why claude code is so powerful. So, you need to understand the difference between AI coding and agentic coding. With AI coding, you pass in a prompt, a model, and some context, and the tool spits out code. With Agentic Coding, apps like Claude Code and Cursor do not just write code. They use tools. Claude Code has 11 built-in tools. You can see them all on the screen. It analyzes the prompt and based on that decides which tools to actually use. Then it completes the task using a combination of different tools that best suit the task. For example, if you ask it to change something in a file, first it would use the ls tool to list the files, then fetch the contents. Then it would use the read tool to read the contents of the file. and finally proceed with the correct tool to change the content of the file. But why is this better than cursor all of a sudden? The main reason is that Claude code is now available on the $20 pro plan. This allows you to use the full context of these cla models which are considered to be the best in coding at a flat monthly cost. Before you had to pay by API usage and it became very costly. If you try to do the same thing in cursor then you would have to enable max mode which is also an API based subscription. Now if you are wondering how the SDK works then let me show you. Since we will be using Python I will go ahead and initialize a virtual environment. After that I am just going to activate it and then open up the directory in cursor. You can also see that they have listed the prerequisites. So make sure that you have them installed. Once you have these prerequisites you can install the SDK using this pip command. After it has installed we will head over to cursor and actually make a new script to test out the SDK. And we do not even have to write our own script. We can just use the basic example script that they have provided where they prompted Claude to write a haiku about the contents of a file called fu.py. So for that first we will create a new file called main.py and we will paste the copied code into it. So in this script we are importing query cla code options and message from the claude code SDK. The prompt is passed into query and that basically spins up an instance of claude code. Then we have clawed code options which is how we configure that instance. Here we are just setting max turns that refers to how many times the agent can build on its own response. The response does not come as plain text. It comes in structured message objects. So you would have to extract the actual content separately. And if you do not understand the code or do not want to then that is also okay. I also have a solution for that. After that we will create another file called fu.py and we will write a script that prints the Fibonacci sequence. Now let's open the terminal and run the main Python file. It seems we actually got an error here. For some reason after I updated the Python SDK, the example script they provided kind of broke. I was able to come up with a workaround so that it does give us an output but it is still broken. So I am hoping we get an update on this soon as well. And then there is the best feature MCP configuration. This basically lets your programmable instances of claude code run with external MCP servers which enables them to do pretty much anything because we have seen how crazy MCPs can get with the kinds of use cases they have been implemented in. And this just makes the SDK 10 times more powerful. Oh, and if you're enjoying the content we're making, I'd really appreciate it if you hit that subscribe button. We're also starting to test out channel memberships to help support what we're building here. Right now, we've only launched the first tier, and it gives you priority replies to your comments. So, if you ever have a question or want feedback, you'll get bumped to the front of the line. Now, you might think, how can this be used by people in their day-to-day life? So, back in the documentation, you can see these real world applications. They have given an amazing example, the Claude Code GitHub actions, which is essentially a workflow for GitHub actions where Claude Code reviews pull requests and even solves issues that you raise. You just have to mention it in any pull request or issue and it will either analyze your code or fix whatever issue you have. I will show you an example of how I actually use this and how it works. So this is a simple notes application that I created. It is uploaded to a GitHub repository and it has a really simple structure like Apple notes with folders and inside the folders there are different notes and you can preview them right here. And you can see that we actually found another bug right here. We will fix it later on. Now, if I go back into the GitHub repository and if I go into the issues tab, you can see that I have raised an issue stating that dark mode is currently missing in the app. And if you look back at the app, you can see that there is no option for dark mode right now. So, if we open up the issue, you can see the issue description and how it should behave. This is the detail that was listed in the issue. I commented myself and called Claude. This is how you trigger the workflow and told it to implement the feature that was described in the issue. Claude ran the workflow, finished the task, and implemented dark mode. You can see that it has its own to-do list right here. Since it is built on top of the Claude Code SDK, it is actually running an instance of Claude Code that reviews the description, analyzes the codebase, and solves the issue. As you know, Claude Code operates using its own step-by-step to-do list, so it does not lose context or track of what needs to be done. Another powerful feature that Claude Code has. This is the to-do list it provided and it also shows us what files it created or modified. A whole concise summary of what changes were made. Now if I go ahead and switch to the branch where the changes were implemented. You can see I just switched. And if I go back to the app, you can see that dark mode is now implemented. You can see the toggle right here. We can switch it and it is working correctly. This is how they have shown that the Claude Code SDK actually allows you to build real useful applications that people can use in their day-to-day workflows. Another really crazy example that could actually be built because Claude Code has access to MCP is that we could use the Jira and Slack MCPs to create a whole workflow. Basically, if a pull request is made, it could be reviewed by the Claude Code agent that you have built. Based on its review, a ticket could automatically be assigned in Jira, eliminating the need to create it manually. Then using the MCPS for Slack, we could simply mention it in Slack and assign Claude to various tickets or issues that we want. This would reduce the amount of human input required. Now, what if you don't want to deal with the code? Well, Claude code currently doesn't have a way to store documentation from links like cursor does. So, if you want to build custom scripts or even full products on top of this, you can head to Cursor and add it as documentation. But there are other methods such as downloading the whole doc and then putting it in a markdown file for claude so that you can reference it. But that would still take up too much context and in this case it's just better to use cursor here. If you think there may be an alternative way, please do let us know in the comments. That brings us to the end of this video. If you'd like to support the channel and help us keep making tutorials like this, you can do so by using the super thanks button below. As always, thank you for watching and I'll see you in the next one.