[00:00] (0.16s)
AI agentic coding has completely
[00:02] (2.40s)
changed. And I'm not talking about the
[00:04] (4.08s)
usual updates or new features. I'm
[00:06] (6.16s)
talking about a fundamental shift in how
[00:08] (8.32s)
we can interact with AI coding tools.
[00:10] (10.72s)
This shift is real and it's all because
[00:12] (12.64s)
of Claude codes SDK. What's better than
[00:15] (15.20s)
an agentic coding tool? A programmable
[00:17] (17.68s)
agentic coding tool. Programmable
[00:19] (19.76s)
agentic coding is the future of software
[00:22] (22.24s)
engineering. And it's because we're not
[00:24] (24.00s)
just using AI tools anymore. We're
[00:26] (26.08s)
building them into our systems, making
[00:27] (27.92s)
them work exactly how we want them to
[00:29] (29.92s)
work. Claude Codes SDK has completely
[00:32] (32.56s)
changed the landscape. Now you can have
[00:34] (34.32s)
intelligent coding agents running as
[00:36] (36.48s)
subprocesses in the background doing
[00:38] (38.40s)
whatever you program them to do. I'm
[00:40] (40.24s)
going to show you how Claude's SDK
[00:42] (42.24s)
actually works and why this is going to
[00:44] (44.32s)
change how you view AI coding. Let's
[00:46] (46.48s)
dive in. So this is the official
[00:48] (48.48s)
documentation of the Claude Code SDK
[00:51] (51.04s)
which essentially allows you to
[00:52] (52.72s)
programmatically integrate Claude code
[00:54] (54.80s)
into your own scripts or even full-scale
[00:57] (57.20s)
applications. Basically, it turns Claude
[00:59] (59.76s)
Code into a subprocess that can be
[01:01] (61.92s)
called from anywhere and the
[01:03] (63.36s)
instructions inside your prompt can be
[01:05] (65.44s)
designed to do anything you want. This
[01:07] (67.20s)
is a huge deal because now you can
[01:08] (68.88s)
program one of the best coding agents in
[01:10] (70.96s)
whatever way you want. and I'll show you
[01:12] (72.64s)
how powerful this is with a realworld
[01:14] (74.64s)
example that Claude Code has built
[01:16] (76.32s)
themselves. These docs provide
[01:18] (78.08s)
everything that you need to know about
[01:19] (79.52s)
the SDK. As of now, it can be used with
[01:22] (82.16s)
the command line, TypeScript, and
[01:24] (84.08s)
Python. But before we get into the
[01:25] (85.92s)
video, you need to understand why claude
[01:28] (88.16s)
code is so powerful. So, you need to
[01:30] (90.72s)
understand the difference between AI
[01:32] (92.40s)
coding and agentic coding. With AI
[01:34] (94.64s)
coding, you pass in a prompt, a model,
[01:36] (96.80s)
and some context, and the tool spits out
[01:39] (99.12s)
code. With Agentic Coding, apps like
[01:41] (101.20s)
Claude Code and Cursor do not just write
[01:43] (103.36s)
code. They use tools. Claude Code has 11
[01:46] (106.00s)
built-in tools. You can see them all on
[01:48] (108.00s)
the screen. It analyzes the prompt and
[01:50] (110.16s)
based on that decides which tools to
[01:52] (112.32s)
actually use. Then it completes the task
[01:54] (114.40s)
using a combination of different tools
[01:56] (116.40s)
that best suit the task. For example, if
[01:58] (118.80s)
you ask it to change something in a
[02:00] (120.48s)
file, first it would use the ls tool to
[02:02] (122.80s)
list the files, then fetch the contents.
[02:04] (124.96s)
Then it would use the read tool to read
[02:07] (127.04s)
the contents of the file. and finally
[02:09] (129.04s)
proceed with the correct tool to change
[02:11] (131.12s)
the content of the file. But why is this
[02:13] (133.44s)
better than cursor all of a sudden? The
[02:15] (135.36s)
main reason is that Claude code is now
[02:17] (137.52s)
available on the $20 pro plan. This
[02:20] (140.08s)
allows you to use the full context of
[02:22] (142.00s)
these cla models which are considered to
[02:24] (144.16s)
be the best in coding at a flat monthly
[02:26] (146.48s)
cost. Before you had to pay by API usage
[02:29] (149.36s)
and it became very costly. If you try to
[02:31] (151.52s)
do the same thing in cursor then you
[02:33] (153.28s)
would have to enable max mode which is
[02:35] (155.12s)
also an API based subscription. Now if
[02:37] (157.68s)
you are wondering how the SDK works then
[02:39] (159.92s)
let me show you. Since we will be using
[02:42] (162.00s)
Python I will go ahead and initialize a
[02:44] (164.48s)
virtual environment. After that I am
[02:46] (166.72s)
just going to activate it and then open
[02:48] (168.56s)
up the directory in cursor. You can also
[02:50] (170.64s)
see that they have listed the
[02:51] (171.92s)
prerequisites. So make sure that you
[02:53] (173.76s)
have them installed. Once you have these
[02:55] (175.44s)
prerequisites you can install the SDK
[02:57] (177.68s)
using this pip command. After it has
[02:59] (179.84s)
installed we will head over to cursor
[03:02] (182.00s)
and actually make a new script to test
[03:04] (184.08s)
out the SDK. And we do not even have to
[03:06] (186.48s)
write our own script. We can just use
[03:08] (188.40s)
the basic example script that they have
[03:10] (190.64s)
provided where they prompted Claude to
[03:12] (192.56s)
write a haiku about the contents of a
[03:14] (194.48s)
file called fu.py. So for that first we
[03:17] (197.36s)
will create a new file called main.py
[03:19] (199.60s)
and we will paste the copied code into
[03:21] (201.44s)
it. So in this script we are importing
[03:23] (203.84s)
query cla code options and message from
[03:26] (206.32s)
the claude code SDK. The prompt is
[03:28] (208.64s)
passed into query and that basically
[03:30] (210.64s)
spins up an instance of claude code.
[03:32] (212.72s)
Then we have clawed code options which
[03:34] (214.88s)
is how we configure that instance. Here
[03:37] (217.12s)
we are just setting max turns that
[03:39] (219.04s)
refers to how many times the agent can
[03:41] (221.12s)
build on its own response. The response
[03:43] (223.20s)
does not come as plain text. It comes in
[03:45] (225.28s)
structured message objects. So you would
[03:47] (227.20s)
have to extract the actual content
[03:49] (229.04s)
separately. And if you do not understand
[03:50] (230.80s)
the code or do not want to then that is
[03:52] (232.96s)
also okay. I also have a solution for
[03:54] (234.96s)
that. After that we will create another
[03:57] (237.20s)
file called fu.py and we will write a
[03:59] (239.68s)
script that prints the Fibonacci
[04:01] (241.20s)
sequence. Now let's open the terminal
[04:03] (243.28s)
and run the main Python file. It seems
[04:05] (245.84s)
we actually got an error here. For some
[04:08] (248.16s)
reason after I updated the Python SDK,
[04:10] (250.80s)
the example script they provided kind of
[04:12] (252.80s)
broke. I was able to come up with a
[04:14] (254.40s)
workaround so that it does give us an
[04:16] (256.16s)
output but it is still broken. So I am
[04:18] (258.40s)
hoping we get an update on this soon as
[04:20] (260.24s)
well. And then there is the best feature
[04:22] (262.56s)
MCP configuration. This basically lets
[04:25] (265.04s)
your programmable instances of claude
[04:27] (267.12s)
code run with external MCP servers which
[04:30] (270.00s)
enables them to do pretty much anything
[04:32] (272.00s)
because we have seen how crazy MCPs can
[04:34] (274.64s)
get with the kinds of use cases they
[04:36] (276.64s)
have been implemented in. And this just
[04:38] (278.40s)
makes the SDK 10 times more powerful.
[04:40] (280.96s)
Oh, and if you're enjoying the content
[04:42] (282.72s)
we're making, I'd really appreciate it
[04:44] (284.48s)
if you hit that subscribe button. We're
[04:46] (286.32s)
also starting to test out channel
[04:47] (287.92s)
memberships to help support what we're
[04:49] (289.84s)
building here. Right now, we've only
[04:51] (291.44s)
launched the first tier, and it gives
[04:53] (293.12s)
you priority replies to your comments.
[04:55] (295.28s)
So, if you ever have a question or want
[04:57] (297.12s)
feedback, you'll get bumped to the front
[04:58] (298.80s)
of the line. Now, you might think, how
[05:00] (300.88s)
can this be used by people in their
[05:02] (302.64s)
day-to-day life? So, back in the
[05:04] (304.48s)
documentation, you can see these real
[05:06] (306.40s)
world applications. They have given an
[05:08] (308.24s)
amazing example, the Claude Code GitHub
[05:10] (310.48s)
actions, which is essentially a workflow
[05:12] (312.56s)
for GitHub actions where Claude Code
[05:14] (314.48s)
reviews pull requests and even solves
[05:16] (316.64s)
issues that you raise. You just have to
[05:18] (318.32s)
mention it in any pull request or issue
[05:20] (320.40s)
and it will either analyze your code or
[05:22] (322.48s)
fix whatever issue you have. I will show
[05:24] (324.40s)
you an example of how I actually use
[05:26] (326.48s)
this and how it works. So this is a
[05:28] (328.72s)
simple notes application that I created.
[05:30] (330.88s)
It is uploaded to a GitHub repository
[05:33] (333.12s)
and it has a really simple structure
[05:35] (335.04s)
like Apple notes with folders and inside
[05:37] (337.28s)
the folders there are different notes
[05:39] (339.04s)
and you can preview them right here. And
[05:40] (340.96s)
you can see that we actually found
[05:42] (342.48s)
another bug right here. We will fix it
[05:44] (344.56s)
later on. Now, if I go back into the
[05:46] (346.48s)
GitHub repository and if I go into the
[05:48] (348.88s)
issues tab, you can see that I have
[05:50] (350.80s)
raised an issue stating that dark mode
[05:53] (353.12s)
is currently missing in the app. And if
[05:55] (355.04s)
you look back at the app, you can see
[05:56] (356.56s)
that there is no option for dark mode
[05:58] (358.48s)
right now. So, if we open up the issue,
[06:00] (360.56s)
you can see the issue description and
[06:02] (362.32s)
how it should behave. This is the detail
[06:04] (364.24s)
that was listed in the issue. I
[06:06] (366.00s)
commented myself and called Claude. This
[06:08] (368.08s)
is how you trigger the workflow and told
[06:10] (370.00s)
it to implement the feature that was
[06:11] (371.76s)
described in the issue. Claude ran the
[06:13] (373.76s)
workflow, finished the task, and
[06:15] (375.44s)
implemented dark mode. You can see that
[06:17] (377.28s)
it has its own to-do list right here.
[06:19] (379.28s)
Since it is built on top of the Claude
[06:21] (381.12s)
Code SDK, it is actually running an
[06:23] (383.36s)
instance of Claude Code that reviews the
[06:25] (385.52s)
description, analyzes the codebase, and
[06:27] (387.84s)
solves the issue. As you know, Claude
[06:29] (389.84s)
Code operates using its own step-by-step
[06:32] (392.40s)
to-do list, so it does not lose context
[06:34] (394.64s)
or track of what needs to be done.
[06:36] (396.64s)
Another powerful feature that Claude
[06:38] (398.48s)
Code has. This is the to-do list it
[06:40] (400.40s)
provided and it also shows us what files
[06:42] (402.64s)
it created or modified. A whole concise
[06:45] (405.12s)
summary of what changes were made. Now
[06:47] (407.28s)
if I go ahead and switch to the branch
[06:49] (409.28s)
where the changes were implemented. You
[06:51] (411.20s)
can see I just switched. And if I go
[06:53] (413.04s)
back to the app, you can see that dark
[06:54] (414.96s)
mode is now implemented. You can see the
[06:56] (416.96s)
toggle right here. We can switch it and
[06:59] (419.12s)
it is working correctly. This is how
[07:00] (420.96s)
they have shown that the Claude Code SDK
[07:03] (423.20s)
actually allows you to build real useful
[07:05] (425.60s)
applications that people can use in
[07:07] (427.44s)
their day-to-day workflows. Another
[07:09] (429.52s)
really crazy example that could actually
[07:11] (431.36s)
be built because Claude Code has access
[07:13] (433.36s)
to MCP is that we could use the Jira and
[07:15] (435.92s)
Slack MCPs to create a whole workflow.
[07:18] (438.64s)
Basically, if a pull request is made, it
[07:20] (440.88s)
could be reviewed by the Claude Code
[07:22] (442.48s)
agent that you have built. Based on its
[07:24] (444.24s)
review, a ticket could automatically be
[07:26] (446.32s)
assigned in Jira, eliminating the need
[07:28] (448.40s)
to create it manually. Then using the
[07:30] (450.56s)
MCPS for Slack, we could simply mention
[07:32] (452.96s)
it in Slack and assign Claude to various
[07:35] (455.44s)
tickets or issues that we want. This
[07:37] (457.52s)
would reduce the amount of human input
[07:39] (459.52s)
required. Now, what if you don't want to
[07:41] (461.60s)
deal with the code? Well, Claude code
[07:43] (463.68s)
currently doesn't have a way to store
[07:45] (465.44s)
documentation from links like cursor
[07:47] (467.60s)
does. So, if you want to build custom
[07:49] (469.44s)
scripts or even full products on top of
[07:51] (471.60s)
this, you can head to Cursor and add it
[07:53] (473.68s)
as documentation. But there are other
[07:55] (475.60s)
methods such as downloading the whole
[07:57] (477.52s)
doc and then putting it in a markdown
[07:59] (479.52s)
file for claude so that you can
[08:01] (481.04s)
reference it. But that would still take
[08:02] (482.72s)
up too much context and in this case
[08:04] (484.80s)
it's just better to use cursor here. If
[08:07] (487.04s)
you think there may be an alternative
[08:08] (488.48s)
way, please do let us know in the
[08:10] (490.24s)
comments. That brings us to the end of
[08:12] (492.32s)
this video. If you'd like to support the
[08:14] (494.24s)
channel and help us keep making
[08:15] (495.76s)
tutorials like this, you can do so by
[08:17] (497.68s)
using the super thanks button below. As
[08:19] (499.76s)
always, thank you for watching and I'll
[08:21] (501.44s)
see you in the next one.