Agentic Coding ENDGAME: Build your Claude Code SDK Custom Agents — Transcript
Full transcript
- 0:00Agentic engineering leads every engineer
- 0:03down one single path. Better agents,
- 0:07more agents, and then custom agents. If
- 0:11you can prompt engineer and context
- 0:13engineer a single agent successfully,
- 0:15then the next step is to add more
- 0:17agents. Scale your compute to scale your
- 0:20impact. Then once you learn to delegate
- 0:23work to sub agents and new primary
- 0:26agents, there's only one place left to
- 0:29go. Custom agents. But why isn't Cloud
- 0:32Code, Codeex CLI, or the Gemini CLI
- 0:35enough? The out ofthe-box agents are
- 0:37incredible, but there's a massive
- 0:39problem with these tools. They're built
- 0:42for everyone's codebase, not yours. This
- 0:44mismatch can cost you hundreds of hours
- 0:47and millions of tokens scaling as your
- 0:50codebase grows. This lesson is about
- 0:52flipping that equation. Here we master
- 0:56custom agents so your compute works for
- 0:58your domain, your problems, your edge
- 1:01cases. This is where all the alpha is in
- 1:04engineering. It's in the hard specific
- 1:07problems that most engineers and most
- 1:09agents can't solve out of the box. In
- 1:13this advanced lesson, we showcase eight
- 1:15unique custom agents built on the Cloud
- 1:18Code SDK. Each one showing you how to
- 1:21deploy across your stack, products, and
- 1:24engineering life cycle. The agents are
- 1:27on the horizon. It's time to master
- 1:29agents by going all the way to the bare
- 1:31metal to the custom agent so you can
- 1:33scale your compute far beyond the rest.
- 1:37[Music]
- 1:41In the building specialized agents
- 1:42codebase inside of apps, you can see
- 1:45eight custom agents. Let's start simple
- 1:47with the pong agent.
- 1:53So, here is a simple agent that's going
- 1:55to showcase the most important aspect of
- 1:58custom agents. You can see we have a
- 2:00simple, concise user prompt and agent
- 2:03response. And we have some session
- 2:04stats. Let's run this again. All right,
- 2:06let's go ahead and change our prompt.
- 2:07Hello. Simple prompt. We're just getting
- 2:09started with custom agents. I said
- 2:10hello. It just responded with pong.
- 2:13Okay. Um, summarize this codebase. Okay,
- 2:16there's my user prompt. And once again,
- 2:18the pong agent is responding again with
- 2:21pong. What's going on here? Let's ask it
- 2:23what's happening. Can you do anything
- 2:25other than pong? Okay, there's a user
- 2:28prompt and okay,
- 2:31so all this agent does is ponk. Type one
- 2:34more here. Just going to write ping.
- 2:35This silly agent encapsulates the most
- 2:38important concept when you're building
- 2:41custom agents. No matter what we prompt
- 2:43here, the response is always pong. Why
- 2:45is that? Let's dive in to this file. So
- 2:47the first most important concept is none
- 2:49other than the system prompt. We are
- 2:51using the cloud code SDK and we're
- 2:53setting up only two things. We're
- 2:56modifying just two aspects of this
- 2:58agent, but it changes everything. So you
- 3:01can see cloud forson and here the system
- 3:04prompt. So let's open up the system
- 3:05prompt. You can see we have this
- 3:06dedicated load system prompt method.
- 3:09There's the path to the prompt. Let's
- 3:10open it. We have completely overwritten
- 3:14the clawed code system prompt with this
- 3:17title of our agent purpose. And we have
- 3:19a simple threeline instruction. You are
- 3:22a pong agent. Always respond exactly
- 3:24with pong. That's it. The system prompt
- 3:26is the most important element of your
- 3:29custom agents with zero exceptions. We
- 3:32are modifying the core for specifically
- 3:35the prompt. But now we have two very
- 3:37important prompts to pay attention to.
- 3:39System prompts and user prompts. The
- 3:41system prompt affects every single user
- 3:44prompt the agent runs. Every single one.
- 3:47So all of your work is multiplied by
- 3:50your system prompt. So how does the
- 3:52Cloud Code SDK work? Let's go ahead and
- 3:53break down the key ideas. The SDK works
- 3:56like this. You set up your options. You
- 3:58set up your agent. Here we're just
- 4:00running the query and then you handle
- 4:03the response. The claw code SDK is a
- 4:05powerful tool for putting together
- 4:07agents as you'll see as we progress. All
- 4:09the pieces are there and they're
- 4:10incrementally adoptable. And then
- 4:12lastly, we're just doing some logging.
- 4:14That's it. That's the end of our agent,
- 4:15right? A simple 150 line Pong agent.
- 4:18Most of this is just logging. We're
- 4:19setting up the agent. We're then
- 4:21querying the agent. We're then handling
- 4:23the response of the agent. And take note
- 4:25of these specific blocks that you can
- 4:27report. We have our agent message
- 4:29blocks. We have a result message. And
- 4:31you can parse specific information out
- 4:33of these as you'll see as we progress.
- 4:35But this is the pong agent and this
- 4:37showcases the power of the system
- 4:40prompt. Remember all that work that the
- 4:42clawed code team has put into making a
- 4:45great agent, right? The claw code agent
- 4:47that you know and love is now gone.
- 4:50Okay, you have to be very careful with
- 4:51the system prompt. We now have a new
- 4:54product. This is not clawed code
- 4:56anymore. Okay, it might be using the
- 4:58same model, but the system prompt is
- 5:00truly what builds the agent. Now, of
- 5:03course, we are still using the tools.
- 5:05That's important to call out here as
- 5:06you'll see as we progress into more and
- 5:09more capable custom agents. Let's move
- 5:11on to our second agent, the echo agent.
- 5:16Inside of our echo agent, you can see a
- 5:18similar structure. We have a single
- 5:19Python script here that we're going to
- 5:21execute. UV run echo agent py. And we're
- 5:24going to see a similar structure, right?
- 5:26Right, we have our Echo agent kicking
- 5:27off user prompt agent response. But here
- 5:29we have something different. Here we
- 5:31have of course a custom tool. So our
- 5:33agent is saying I'll use this tool and
- 5:35then we have this tool call block here.
- 5:37And then we have the response of the
- 5:39tool call and then our agent response.
- 5:41All right. So these are all unique
- 5:43elements coming out of our agent. You
- 5:46want to be keeping track of these,
- 5:47right? Keep track of the core four. If
- 5:49you understand the core 4 and how each
- 5:52element flows and controls your agent,
- 5:54you will understand compute and you'll
- 5:56understand how to scale your compute.
- 5:58Let's go ahead and echo ourselves. So,
- 5:59I'm going to say echo this string and
- 6:01then I want it in reverse in uppercase.
- 6:04Repeat two times here. We're just
- 6:06playing with the tool that our custom
- 6:08agent has. All right. So, there's the
- 6:10user prompt. There's that call in
- 6:12reverse. This text comes out to custom
- 6:14agents are powerful. We ask it to repeat
- 6:16and go uppercase. So that's exactly what
- 6:18our agent has done. Okay, we're scaling
- 6:20up a little more. We're adding a few
- 6:22more capabilities to our agent as we
- 6:24explore custom agents. Let's understand
- 6:26what's going on here in the Echo agent.
- 6:28Same structure. I always love collapsing
- 6:30everything and you can just quickly
- 6:32understand what's going on. We have
- 6:33main, we have a tool, and we have our
- 6:36system prompt. Always look for the
- 6:38system prompt and then look for the
- 6:40custom tools. We have a couple
- 6:41parameters here. Then we have something
- 6:43special. So once again, you can always
- 6:45just search cloud code options. We have
- 6:48an MCP server built in this script
- 6:51create SDK MCP server and we're passing
- 6:54in a single tool. So this builds an
- 6:56entire MCP server in memory for our
- 6:59agent. This is super powerful. So let's
- 7:01look at our echo tool and understand
- 7:02what it does. Tools for your cloud code
- 7:05SDK. They're built like this. A
- 7:06decorator. We then have the name. We
- 7:08have the description. So keep in mind
- 7:10the description of your tool tells your
- 7:13agent how to use it in addition to the
- 7:15actual parameters that get passed in to
- 7:18your tool and the actual arguments. You
- 7:20just pass in a dict and then you do
- 7:22whatever you want to do inside of your
- 7:24tool. Here we step back into traditional
- 7:26deterministic code, right? It's a tool
- 7:28call. Do whatever you want, but be sure
- 7:30to respond in the proper format. You can
- 7:33see here, here's our log. Here's the
- 7:35transforms we were doing, right? Just a
- 7:36small example tool call for our agent.
- 7:39This is a custom agent with a custom
- 7:41tool set. Now something interesting here
- 7:43as well. You can see we are running
- 7:45clawed haiku. We have downgraded our
- 7:47model to a cheaper less intelligent but
- 7:50much faster model. Right? This is a
- 7:52simple agent. It doesn't need powerful
- 7:54intelligence. So we've dropped down the
- 7:56model. As we progress through each agent
- 7:58keep in mind we have the 12 leverage
- 8:01points of agent coding that we're paying
- 8:03attention to. But whenever you see cloud
- 8:05code options isolate the core four. How
- 8:07will the core 4 be managed given this
- 8:10setup? Now, we have something else here
- 8:12that's important to call out. We're
- 8:13using the clawed SDK client class
- 8:16instead of our pong agent where we were
- 8:18just using that query command. All
- 8:20right, so query is for one-off prompts
- 8:22and the claw SDK client is for
- 8:25continuous conversations. Let me show
- 8:27you exactly what I mean here. Let's
- 8:28clear this and let's run this once again
- 8:30with follow-up. So, if we kick this off,
- 8:32our agent is going to run that same
- 8:34prompt like normal, but then it's going
- 8:36to continue the conversation. We're
- 8:38going to pass in another follow-up
- 8:40prompt. I'm going to say concisely
- 8:41summarize our conversation in bullet
- 8:43points. And so, here it is, right? Our
- 8:45agent quickly responds, follow-up
- 8:46response, concise summary. 1 2 3 4. Our
- 8:50agent has kept track of the conversation
- 8:53because we're using the clawed SDK
- 8:55client. And because we've written
- 8:57multiple query calls, you can see we
- 8:59have two here, follow-up prompt and the
- 9:01original user prompt. All right, so we
- 9:03have both the tool use block that we
- 9:05care about and we have the text block.
- 9:08You can stream all the messages coming
- 9:09back out from your agent after you query
- 9:11and just take them in, right? Take them
- 9:13in, do whatever you want with them.
- 9:14Here, of course, we're just logging with
- 9:16clean, rich panels, concisely
- 9:19communicating what's happening with our
- 9:20agent. If you don't know what your agent
- 9:22is doing, if you don't adopt your
- 9:23agent's perspective, it will be hard to
- 9:25improve them and tweak them and manage
- 9:27them. So, that's what we're doing here.
- 9:29And you can see the follow-up prompt. We
- 9:31fired off that additional query and we
- 9:33just looked for that one response,
- 9:35right? We're looking for a tool use
- 9:36block. And really, we only were looking
- 9:38for the text block here, right? This is
- 9:40not actually that useful. This is a
- 9:42custom agent with a few more
- 9:44capabilities, right? We've specified the
- 9:46model. We've given it a custom tool to
- 9:49work with. But here's something
- 9:50interesting that if you're using these
- 9:52agents left and right, you probably
- 9:53haven't been paying attention to. If we
- 9:55run this same agent and we just drop
- 9:57everything down here and we just say
- 9:59list your available tools, we are
- 10:03actually still running a lot of the
- 10:05clawed code baked in tool set. So check
- 10:09this out, right? These are all the cloud
- 10:11code tools plus our tool. And so
- 10:13everything that's going into your agent
- 10:15winds up in the context window at some
- 10:18point. We have 15 extra tools, 15 extra
- 10:22options that our agent has to choose
- 10:24from and select to do the job we've
- 10:27asked it. Now, our Echo agent does not
- 10:29need any of these tools. All right? And
- 10:31so, as we progress, we're going to
- 10:32fine-tune. We're going to get more
- 10:34control over our agent. If you ever run
- 10:36the /context commander, understand
- 10:38what's going into your agent. You know
- 10:40that these 15 tools consumes context. It
- 10:44consumes space in your agent's mind.
- 10:46We're going to learn how to control that
- 10:47knob in our next agent. The last thing
- 10:49we want to point out here is our Echo
- 10:51system prompt. Okay, very simple, right?
- 10:54Again, it's important to call out this
- 10:55is not the claw code product anymore. As
- 10:58soon as you touch the system prompt and
- 11:01once you start dialing into the tools,
- 11:03you change the product, you change the
- 11:06agent. All right, so you can see here
- 11:08title purpose echo agent use the tool
- 11:10when asked. All right. So there's not a
- 11:12lot of happening here, but there is a
- 11:14lot that was happening that isn't
- 11:16happening anymore. Right? If that makes
- 11:17sense. We have blown away the clawed
- 11:20code system prompt. We have completely
- 11:21overwritten it. Now, it is important to
- 11:23mention you can append system prompt,
- 11:26right? You can just add on to what's
- 11:28already there. This is also powerful.
- 11:30This is more of a way to extend cloud
- 11:32code versus overwrite it and build a
- 11:35true custom agent. All right, let's
- 11:37continue. Let's progress. Let's get more
- 11:39control over our agents. Let's scale
- 11:41this up and let's look at a new form
- 11:43factor for agents.
- 11:47Now we arrive at custom 7 micro SDLC
- 11:51agent. Let's understand the structure of
- 11:53this codebase. Backend front end
- 11:55reviews, specs and a couple of test
- 11:57files. So let's go ahead and just kick
- 11:59this off. We already have this running
- 12:00here. Backend front end. Let's see
- 12:03exactly what this is. You probably
- 12:04understand what's going on here, right?
- 12:06We have an agent by agent task board
- 12:09where we hand off work from one agent to
- 12:11another agent in a kind of micro
- 12:13software development life cycle. Now you
- 12:15can see here we have a couple tasks
- 12:17already shipped. We have some aired ones
- 12:18over here. Let's just go ahead create a
- 12:20new task. We're going to do something
- 12:22really stupid and simple. I just want to
- 12:24showcase the workflow and showcase the
- 12:26capabilities that you can build into
- 12:28your user interfaces with Asian. So uh
- 12:31update titles. This is just going to be
- 12:33super simple. update the HTML title and
- 12:36header title to be plan build review and
- 12:40ship agents. Okay. And now we have that
- 12:43here, right? Update titles. Then we just
- 12:44drag it into plan. And now this workflow
- 12:46is going to kick off. Let's go ahead and
- 12:47refocus on the actual agent running on
- 12:50the back end. So let's just collapse the
- 12:52front end there and let's see what our
- 12:53agent is doing. The difference here is
- 12:55we have a multi- aent system, right?
- 12:57We're not just deploying a single agent
- 12:59anymore. We're deploying multiple agents
- 13:02inside of our UI. So now we have a
- 13:04planner agent. It's noticing it's
- 13:06thinking, right? We have planner
- 13:07thinking, planner tool calls, uh, hook
- 13:10interceptions, right? Tool allowed. We
- 13:13have permission system inside of this.
- 13:15It has the full structure. And now it's
- 13:16going to start updating this code,
- 13:18right? It's a simple title change. This
- 13:19isn't, you know, rocket science, but we
- 13:21should see our title update here. And we
- 13:23should see our HTML title update as
- 13:25well, right? It is operating on itself.
- 13:27Couple cool things, right? You can kind
- 13:29of build out your own multi- aent
- 13:31orchestration system however you want.
- 13:33We have the messages on the left. So the
- 13:35total messages getting streamed to the
- 13:37front end via websockets. And then we
- 13:39have the total tool calls on the right.
- 13:41Okay. So our agent is working. You can
- 13:43see there the planning is incrementing.
- 13:45But you can see here our builder agent
- 13:47is now processing. And this is really
- 13:50cool, right? Our build agent is now
- 13:51processing. So the planner is done. You
- 13:53know, you'll notice the UI is going to
- 13:54be a little kind of glitchy here because
- 13:56it is updating on itself. And so it's,
- 13:58you know, actively starting and
- 14:00restarting the server and the client.
- 14:01Um, but that's fine. Our websocket
- 14:03should pick this up and continue
- 14:04processing. So there you can see the
- 14:06spec. You know, we're operating on that
- 14:07plan. We're operating in the review now.
- 14:09There we go. We can see that we're in
- 14:11the review step now. Okay. So very cool
- 14:14way to just kind of see how agents can
- 14:16work together and then you just package
- 14:17it in a nice UI. Then you can do more
- 14:20than you ever could before, frankly.
- 14:21Right. We have a dedicated workflow
- 14:23working step by step by step. plan,
- 14:26build, review, and handing it off to the
- 14:28next stage in the process. Okay, you can
- 14:30see here our reviewer agent, there's all
- 14:32of its tools, and you can see it just
- 14:34operating, doing work for us, right?
- 14:35We're using a lot of the out of the box
- 14:37cloud code tools, right? If you don't
- 14:39need to reinvent the wheel, don't do it.
- 14:41Let's be super clear about this. The
- 14:42Cloud Code SDK running the base Cloud
- 14:45Code agent is incredible. We've been
- 14:48using it since Cloud Code was released.
- 14:50Uh, you can see here we just moved to
- 14:52shipped. There we go. Update titles. And
- 14:54you can see here, guess what happened?
- 14:55Plan, build, review, and ship agents.
- 14:57Both titles updated. This work shipped
- 14:59with a single prompt outside the loop.
- 15:02Right? This is a perfect example of an
- 15:04outloop review system using the Peter
- 15:07framework. We dialed into this a ton
- 15:10inside of TAC. If you haven't finished
- 15:11the TAC lessons, you should probably
- 15:13stop watching this video immediately and
- 15:15finish TAC. It's all about transitioning
- 15:17from in loop to outloop to eventually
- 15:20ZTE.
- 15:21[Music]
- 15:25The agent is compute scaled. You want to
- 15:27know how to deploy this across your
- 15:30tools, products, services for yourself,
- 15:33for your engineering work, and for your
- 15:35users and customers. And the cloud code
- 15:37SDK and other agent SDKs. These are all
- 15:40powerful toolkits you can use to control
- 15:43the core for within your agents to scale
- 15:46them intelligently. If you're doing
- 15:48one-sizefits-all work, use the out-
- 15:51of-the-box agent. Don't think super hard
- 15:53about this. Just deploy compute to get
- 15:55the job done. But as your work becomes
- 15:56more specialized, as you deploy agents
- 15:59across all aspects of your engineering,
- 16:01you first want better agents, more
- 16:02agents, and then custom agents. This is
- 16:05a codebase you're going to want to ultra
- 16:07think about and understand how you can
- 16:10extend and use the ideas we've discussed
- 16:12here. Deploying effective compute and
- 16:15deploying effective agents is all about
- 16:18finding the constraints in your personal
- 16:20workflow and in your products. Think
- 16:22about repeat workflows that can benefit
- 16:24from an agent inside of a script, a data
- 16:26stream, an interactive terminal, all the
- 16:28way up to user interfaces that can
- 16:30tackle high return on investment
- 16:32problems in your tools for your team and
- 16:35for your business. Agent coding is not
- 16:38so much about what we can do anymore.
- 16:39It's about what we can teach our agents
- 16:41to do. This is how we push our compute
- 16:43to its useful limits. Follow this path
- 16:46to unlock massive value for your tools
- 16:48and products. Better agents, more
- 16:50agents, and then custom agents. I'll see
- 16:52you in the next Aentic Horizon extended
- 16:55lesson.
About this transcript
This page contains the full transcript of Agentic Coding ENDGAME: Build your Claude Code SDK Custom Agents by IndyDevDan, generated from the public captions YouTube serves with the video. The transcript has 3,180 words across 463 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.