How to Build an AI Agent with Claude Code (Claude AI Agent Tutorial)
By AI Master
Summary
Topics Covered
- Most people are stuck on level one of AI
- Agents ask before they act
- CLAUDE.md is the onboarding document for your AI
- The intelligence is in the instructions, not the stack
- Build one workflow before you build five
Full Transcript
Most people are still using Claude like a fancy search engine. Ask a question, copy the answer, ask the next one.
There's a way smarter way to work with it. And once you see it, you can't go
it. And once you see it, you can't go back. Let me show you what an AI agent
back. Let me show you what an AI agent actually is and how to build one inside Claude without writing a single line of code. Before we build anything, I want
code. Before we build anything, I want to get clear on one thing because the term AI agent gets thrown around constantly and most explanations are either too technical or too vague to be
useful. Here's how I think about it.
useful. Here's how I think about it.
There are three distinct levels of working with AI and most people are stuck at level one without realizing levels two and three even exist. Level
one is basic chat. You ask something, Claude answers. You need a definition, a
Claude answers. You need a definition, a quick summary, an explanation. You type
it in, you get it back. This is
genuinely useful, but it's also the most limited possible way to work with the technology. You're essentially using a
technology. You're essentially using a very sophisticated search engine. Level
two is what I call builder mode. You
stop asking questions and start asking Claude to make things. Write me this script, draft this email, analyze this document. Now, you're getting real
document. Now, you're getting real output, not just information. But the
catch is that you're still managing every single step yourself. You decide
what comes next. You review each output.
You carry the whole project forward manually. Level three is agentic work.
manually. Level three is agentic work.
This is where the real shift happens.
Instead of managing every step, you hand claude a goal, a real complete outcome, and it figures out how to get there. It
thinks through the task, breaks it into phases, asks questions if something is unclear, executes each phase in sequence, reviews its own work, and delivers a finished result. You're not
in the loop for every micro decision.
You set the destination and the agent drives. And what makes Claude
drives. And what makes Claude particularly powerful for this right now is that you don't need any developer setup to get started. The Claude desktop app already has a built-in code
workspace where you can create projects, manage files, and run aic workflows without touching a single line of actual code. That used to require serious
code. That used to require serious technical infrastructure. Now it's a
technical infrastructure. Now it's a desktop app. If you're running a
desktop app. If you're running a business and juggling 10 different tools right now, what if I told you that one platform could replace all of them? This
is go high level. You get access to pretty much all the features. Social
media planner. You can schedule posts, see your content calendar, and even repost content across multiple platforms with one click. Email marketing. Go High
Level has a full email suite. You can
create campaigns, build email templates with a drag and drop editor. Go High
Level has a built-in calendar and booking system. This replaces tools like
booking system. This replaces tools like Calendarly. You can create different
Calendarly. You can create different calendar types, one-on-one meetings, group calls, roundroin scheduling if you have a team. And here's the best part.
Go Highle has a ton of pre-built workflow templates. I've linked a 30-day
workflow templates. I've linked a 30-day free trial in the description, not the standard 14 days, an exclusive extended trial. Not every Claude conversation is
trial. Not every Claude conversation is actually agentic. There's a real
actually agentic. There's a real difference between a sophisticated prompt and a genuine agent workflow. And
it comes down to three things. The first
thing is that a real agent follows a process, not just responds to a message.
A chatbot gives you one reply per message. An agent moves through stages.
message. An agent moves through stages.
It gathers context, forms a plan, executes the plan step by step, reviews its own output, and adjusts if something isn't working. It's operating through a
isn't working. It's operating through a system. The second thing is that a real
system. The second thing is that a real agent makes decisions under uncertainty.
A chatbot will guess if it doesn't understand your request. A real agent stops and asks. It adapts its approach based on what it finds. If the initial direction turns out to be wrong, it
corrects course rather than pushing forward with a bad assumption. That
ability to reason through ambiguity rather than just pattern matching to the most probable answer is what separates an agent from a fancy autocomplete. The
third thing is clarification before execution. This one is probably the most
execution. This one is probably the most underrated. The vast majority of bad AI
underrated. The vast majority of bad AI output happens because the model misunderstood what you actually wanted.
It assumed an audience, a format, a scope, a tone, a well-designed agent asks before it acts. It treats your initial request as a starting point for
a brief conversation, not as a complete specification to execute immediately.
That clarification step is where most of the quality lives. All right, let's build something. Open the claw desktop
build something. Open the claw desktop app and go to the code workspace. If you
haven't downloaded it yet, it's available directly from Enthropic. Just
search Claude desktop app and it'll be the first result. Once you're in the code workspace, create a new project folder. You can name it anything. I'll
folder. You can name it anything. I'll
call mine agent workspace for this demo.
This folder is your AI's operating environment. Think of it as the office
environment. Think of it as the office your agent works in. Everything it
creates organizes and references lives here. Right now, it's completely empty,
here. Right now, it's completely empty, and that's totally fine for what we're about to do. The first thing we need to add is the most important file in the entire setup. It's called Claude MD. And
entire setup. It's called Claude MD. And
I genuinely believe most people who struggle with AI agents are struggling because they skip this file entirely.
And creating it is genuinely the easiest part of this whole setup. You don't open a text editor. You don't mess with the file system. You just tell Claude to do
file system. You just tell Claude to do it. Type create a file called claude.md
it. Type create a file called claude.md
in the root of this project right into the chat and it'll spin up the file for you in seconds. That's it. Now we just need to fill it in. Here's the problem with most agent setups. People spend
hours designing elaborate workflows, then launch them without giving Claude any context about who they are, what they're trying to accomplish, or how they want things done. And then they
wonder why the output feels generic.
Claude.md solves this. It's a plain text file written in markdown, just a simple formatting system that Claude automatically reads whenever it starts working inside your project. Think of it
as an onboarding document for your AI.
Except instead of onboarding a new hire once, you write it once and Claude reads it every single session in your workspace. Let me walk you through what
workspace. Let me walk you through what goes into a good claude.md file because the structure matters. Start with a project context section. Two or three
sentences about what this workspace is for. Something like this workspace is
for. Something like this workspace is used for AI assisted research, content creation, and workflow automation.
Outputs are primarily for non-technical audiences who want practical, actionable information about AI tools. Next, add an about me section. Tell Claude who you are and how you work. What's your
background? Who's your audience? What
tone do you prefer? For example, I create practical AI content for everyday users. I prefer concise, direct
users. I prefer concise, direct explanations over academic or jargon heavy language. Every output should feel
heavy language. Every output should feel like advice from a knowledgeable friend, not a corporate report. Then write a rule section. This is where you encode
rule section. This is where you encode your work and preferences so Claude applies them automatically every time.
Some rules I use in my own setup. Always
ask at least three clarifying questions before starting any complex task. Always
show your plan before you execute it.
Keep every written output at or under the requested length. Never pad. When
saving files, use lowercase names with hyphens, not spaces. These might sound like small things, but when they're encoded in the file, you stop having to reexplain them every session. Finally,
define your folder structure. Something
like a workflows folder for your instruction files, an output folder for completed work, and a resources folder for reference material. you want Claude to draw from. This gives the agent a
clear map of where things live and where to put things when it's done. Once you
save this file, Claude's behavior inside your project changes immediately. It's
no longer working from scratch every session. It has context, rules, and a
session. It has context, rules, and a structure to operate within. That one
file done well is worth more than most of the prompt engineering tricks you'll find anywhere online. Before we create our first real workflow, I want to talk about one habit that makes or breaks AI
agent work. It's called planning mode.
agent work. It's called planning mode.
And the idea is simple. You never let the agent execute immediately. Here's
why this matters. When an AI agent starts operating autonomously, it commits to a direction. It creates
files, structures content, makes assumptions. And if any of those initial
assumptions. And if any of those initial assumptions are wrong, which happens more often than you'd expect, you've wasted time and you're now correcting a half-finish project instead of steering
a clean one. Planning mode means you always ask Claude to show you the plan before it does anything. You want to see how it interpreted your goal, what steps it intends to take, what files it plans
to create, and what questions it still has. That review takes maybe 2 minutes,
has. That review takes maybe 2 minutes, but it routinely saves 10 minutes of cleanup on the back end. The simplest
way to build this into every workflow is to add one line in your claw.md rule
section. Always present a written plan and wait for approval before beginning any multi-step task. Once that's there, Claude defaults to showing you its
thinking before it acts. You review, you adjust, you approve, then it executes.
Quick pause before we start building. If
what you just heard about agents has you thinking, "Okay, I actually want to get good at this." We built a place exactly for that. It's called AI Master and
for that. It's called AI Master and there are two things inside that work together. First, the course. It's called
together. First, the course. It's called
Generative AI Essentials and it's a hands-on encyclopedia of prompt engineering and automation. Modules on
system prompts, multimodal work, marketing, data analysis, real workflows, not theory. Second, our
studio. Once you've learned something in the course, you go practice it in the same platform on every major model.
ChatGpt, Claw, Gemini, Deep Seek, Grog, plus Seed Dense and Cling for video and Nano Banana for images. One tab, no juggling 10 subscriptions. Links in the description. And honestly, the annual
description. And honestly, the annual plan is the smartest move. Up to 42% off the platform and every generation you run inside. Okay, back to building. Now,
run inside. Okay, back to building. Now,
let's look at the underlying architecture of what we're building because understanding the structure makes you much better at designing your own workflows later. Most Agentic
systems have three components and they work together in a specific way. The
first component is the workflow file.
This is a written document, usually a markdown file, that describes the entire process the agent should follow for a specific type of task. It covers the goal, the steps, the rules, the expected
output format, and what to do if something goes wrong. Think of it as a standard operating procedure written in plain English. You're not writing any
plain English. You're not writing any code here. You're really just writing
code here. You're really just writing out a process in plain words. The second
component is the agent itself, Claude.
Claude reads your workflow file, understands the objective, and acts as the coordinator. It decides what to do
the coordinator. It decides what to do at each step, what questions to ask, when to proceed, and when to pause for input. It functions like a project
input. It functions like a project manager who's read the SOP and is now running the process. The third component is the tool set. The actual capabilities Claude can use inside the code
workspace. Reading and creating files,
workspace. Reading and creating files, organizing folders, searching through documents, analyzing and editing text.
For most beginner and intermediate workflows, these built-in capabilities are more than enough. You don't need external integrations or APIs to build something genuinely useful. Here's the
key insight, and this one runs counter to what most people expect. The most
important component is the workflow file, not the tools. A thoughtfully
designed workflow with basic tools will outperform a poorly designed workflow with sophisticated integrations every single time. The intelligence is in the
single time. The intelligence is in the instructions, not the technology stack.
That's actually good news because instructions are something anyone can write. All right, let's build something
write. All right, let's build something real. We're going to create a research
real. We're going to create a research agent. a system where you give Claude a
agent. a system where you give Claude a topic and it handles the entire research and report writing process from start to finish. Open a new conversation inside
finish. Open a new conversation inside your Claude code workspace. Don't give
it a topic yet. Instead, tell it what kind of system you want to build. Here's
the kind of prompt that works well for this. I want to design a research
this. I want to design a research workflow. When I give you a topic, you
workflow. When I give you a topic, you should first ask me clarifying questions about scope, audience, and desired depth. Then form a written plan. Once I
depth. Then form a written plan. Once I
approve the plan, you research the topic thoroughly. Organize your findings into
thoroughly. Organize your findings into clear sections and save a structured report to the output folder. Before we
build this, show me your plan for the workflow itself. Notice what we're doing
workflow itself. Notice what we're doing here. We're not jumping straight to the
here. We're not jumping straight to the task. We're designing the system that
task. We're designing the system that will handle the task. That extra step is what turns a one-time response into a repeatable workflow you can run over and
over with different topics. Claude will
come back with a proposed structure for the workflow. It might suggest things
the workflow. It might suggest things like a clarification phase with specific questions that will always ask, a research phase broken into subtopics, a synthesis step where it connects
findings across sources, and a review step before saving the final file.
That's a real agent workflow taking shape built in plain English, requiring zero code. Once the structure looks
zero code. Once the structure looks right to you, tell Claude to go ahead and write the actual workflow file.
It'll create something like research agent.md
agent.md inside your workflows folder. When you
open that file, you're reading the operating instructions for your agent written in plain language, fully editable and reusable every time you want a research report on a new topic.
Now, let's put the workflow to work.
Open a new session inside the same workspace and tell Claude you want to run the research workflow on a specific topic. I'll use the example I actually
topic. I'll use the example I actually ran recently. I want a research report
ran recently. I want a research report on the current state of AI agents in 2026. What's working in practice? What's
2026. What's working in practice? What's
overhyped? And where is the industry actually heading? If your workflow is
actually heading? If your workflow is set up correctly, Claude should not immediately start writing a report. The
first thing it does is ask questions.
Answer those questions specifically.
Don't just say make it good. Something
like audience is non-technical professionals who are curious about AI but don't have a dev background. Keep
the tone conversational. Focus on tools and workflows people are actually using today, not theoretical frameworks.
Target length around 1,500 words. Claude
then forms a written plan. Here are the sections I'll cover. Here's the
structure. Here's what I'll prioritize.
You review it. Maybe adjust one or two things. Then you approve it. and then
things. Then you approve it. and then
the agent runs. What happens next is genuinely different from a normal chat experience. Claude works through the
experience. Claude works through the phases of the workflow sequentially. It
researches synthesizes writes structures the output and saves the report to your output folder as a completed file. You're not managing any
completed file. You're not managing any of those steps. You approved the plan and now it's executing. That moment when you watch the agent move through its workflow independently is when it stops
feeling like a chatbot and starts feeling like something that actually works for you. Here's where a lot of people don't realize how powerful persistent project context actually is.
Once your agent produces an output, you don't restart from zero to make changes.
Claude already has full context of what it just created. So refinements are fast. Say the executive summary in your
fast. Say the executive summary in your report runs a bit long. You just say, "Trim the executive summary. I want it down to three key points." Claude
updates that section without touching the rest of the document. Or maybe you want to add something. Add a short section at the end comparing the top three AI agent tools by use case. Claude
goes back into the document, references what it already wrote, and adds the new section in a way that fits the existing structure and tone. This is the compounding effect of working inside a
persistent workspace. Each session
persistent workspace. Each session builds on the last. The context
accumulates. Instead of starting over every time you need something new, you're refining and expanding a living body of work. That's a fundamentally different relationship with AI than the
copypaste loop most people are still stuck in. Okay, so the research agent
stuck in. Okay, so the research agent was useful, but let's build something that genuinely saves you time every single week. We're making a repurposing
single week. We're making a repurposing agent. You feed it one long script and
agent. You feed it one long script and it spits out three short scripts and a full social media pack. Each one as a separate PDF sitting in a folder ready to publish. Here's what we're actually
to publish. Here's what we're actually building. You drop your main script into
building. You drop your main script into an input folder. You give the agent one instruction. It reads the whole thing,
instruction. It reads the whole thing, picks the three strongest moments, and turns each one into its own 60-second short script with a fresh hook. Then it
writes a social pack, an X thread, a LinkedIn post, an Instagram caption. And
finally, it converts every artifact into a clean PDF and drops them all into an output folder. Now, let's write the
output folder. Now, let's write the system prompt. Same approach as before.
system prompt. Same approach as before.
We describe the RO, the inputs, the steps, and the output format. The RO is a content repurposing specialist. The
input is a single long- form script in the input folder. The steps are read the script, identify three standalone moments that work as shorts, write each one with its own hook and payoff, then
draft platform specific social posts that match the host's voice. The output
is four markdown files converted to PDF saved to the output folder. I'll run it live. One prompt and you'll see the
live. One prompt and you'll see the files appear in the folder one after another. Three shorts PDFs, one social
another. Three shorts PDFs, one social pack PDF from a single script in under 2 minutes. I've spent a lot of time
minutes. I've spent a lot of time running these workflows and watching other people try to get started with them. And the failures almost always
them. And the failures almost always come from the same handful of mistakes.
Let me walk you through them so you can skip the frustrating part. Mistake one
is skipping claude.md. Without that
file, Claude has no persistent context about who you are, how you like to work, or what standards your outputs need to meet. Every session starts from zero.
meet. Every session starts from zero.
the quality is inconsistent and you spend more time correcting output than you save by using an agent in the first place. Write the file before you build
place. Write the file before you build anything else. Mistake two is using
anything else. Mistake two is using vague goals. Telling Claude to do some
vague goals. Telling Claude to do some research on AI will produce something that feels like a Wikipedia article.
Telling it to research how non-technical professionals in marketing are using AI agents for content production. Focus on
tools with free tiers and target an audience that's never written a line of code. produces something you can
code. produces something you can actually use. The specificity of your
actually use. The specificity of your goal determines the quality of the output. This is true at every level of
output. This is true at every level of AI work, but it matters most in agent workflows because the agent is running multiple steps based on that initial goal. Mistake three is skipping the plan
goal. Mistake three is skipping the plan review. It feels like an extra step, and
review. It feels like an extra step, and the temptation is to just let it run and fix things afterward, but agents that run without a reviewed plan can go significantly off track. Correcting a
half-finish multi-stage workflow is much harder than adjusting a plan before execution starts. 2 minutes of review up
execution starts. 2 minutes of review up front saves 10 minutes of cleanup.
Always approve the plan first. Mistake
four is not requiring clarifying questions. If your workflow file doesn't
questions. If your workflow file doesn't explicitly tell Claude to ask questions before starting, it will assume and those assumptions are the source of most mediocre AI output. Build the
clarification step into every workflow you create. The agent should always
you create. The agent should always understand your specific requirements before it starts working, not after.
Mistake five is trying to build everything at once. People get excited about agents and want to build a research system, a content planner, a CRM workflow, an email responder, and an
analytics dashboard all in the same week. The result is five half-working
week. The result is five half-working systems that none of them trust or use.
Start with one workflow. Run it until it's reliable and you understand how it behaves. then build the next one. Once
behaves. then build the next one. Once
you have one or two workflows running well, the natural question is what's next? Here's a practical progression for
next? Here's a practical progression for how to expand your agent stack without overwhelming yourself. The progression
overwhelming yourself. The progression that works best starts with simple self-contained research or writing tasks. Things with a clear input and a
tasks. Things with a clear input and a clear output format, a research report, a content outline, a document summary.
These are low stakes, high feedback tasks where you can see immediately whether the agent performed well and where the cost of a bad output is minimal. From there, you can move to
minimal. From there, you can move to more iterative workflows, ones where the agent produces a first draft and then refineses it based on your feedback across multiple rounds. Script writing
works well here. So, editing and improvement workflows where you give Claude a rough draft and it applies specific criteria to improve it. The
more advanced level is multi-workflow systems where one workflow triggers or informs another. A research agent
informs another. A research agent produces a findings report and then a content planning agent reads that report and generates video ideas based on what the research identified. That's a real
pipeline. It's not as complicated to
pipeline. It's not as complicated to build as it sounds once your individual workflows are solid. The thing I want you to take away from this progression is that agent capability isn't something
you unlock all at once. You build it incrementally, one reliable workflow at a time, and the system gets more powerful as each component gets more refined. That's your first two working
refined. That's your first two working agents. One for research, one for
agents. One for research, one for repurposing. If you actually build even
repurposing. If you actually build even one of them this week, you're already ahead of 90% of people who just talk about agents. For a deeper dive on
about agents. For a deeper dive on building agents from scratch, I've got another video linked up here. And if you want to actually learn this properly instead of just watching tutorials,
that's what we built AI master for.
Links in the description.
Loading video analysis...