
Free guide · by Cooper Simson
How To Build Your First AI Agent
Plan it in Claude's Plan Mode. Build it together. Test it. Same 3-step framework I use to ship every agent in my businesses, walked through with the inbox agent that replaced my email.
No email required. Use it today.
Most people think an AI agent is just chatting with Claude. It is not. An agent is software Claude builds that runs in the background, takes actions on your behalf, and only surfaces the decisions that need you. This lesson walks the exact 3 step Plan / Build / Test framework through a full inbox agent build.
What You'll Learn
- The exact 3 step framework for every agent you ship: Plan, Build, Test
- How to use Plan Mode in Claude to design the agent before writing a line of code
- The conversational prompt template that gets you a working inbox agent in under 2 hours
- Advanced appendix: the power user build prompt for when you want full control
What An AI Agent Actually Is
The difference is autonomy. The agent we are building reads your Gmail every few minutes, decides which conversations matter, archives the ones that do not, drafts replies to the ones that do, and shows you everything through a clean dashboard in your browser. You approve, edit, or reject. The agent learns from what you keep and what you cut.
Why start with inbox: email is the highest leverage starting point for your first agent. Everyone has a backed up inbox. Everyone wastes hours on it. Once this one ships, the same Plan/Build/Test framework extends to calendar, Slack, CRM, sales pipelines, and any other system you check manually right now.
The Plan / Build / Test Framework
Every agent follows the same 3 step pattern. Plan first, build second, test third. Most people skip planning and try to build straight away. That is why their agents break, hallucinate, or get stuck in loops. Plan first and the build becomes almost mechanical.
- Plan (10 to 15 min): you describe what you want, Claude proposes the approach in Plan Mode. You review and approve.
- Build (30 to 60 min): Claude scaffolds the entire project. You watch, give credentials when prompted, and check in mid build.
- Test (10 to 15 min): Claude runs a test. You verify the output. You open the dashboard and start using it.
Why this beats prompt and pray: Plan Mode forces Claude to commit to an approach BEFORE it spends tokens scaffolding code. If the plan is wrong, you spot it in 2 minutes of reading. If you skip planning, you spot the wrong direction 30 minutes into the build, and now you are throwing away work.
Step 1: Plan
Open Claude Code, enter Plan Mode, and describe how you want your agent to work. Lead with the end goal. Claude will respond with a proposed approach, the tools it will use, and the order of operations. You read it, push back on anything wrong, then approve.
- Open Claude Code Desktop. Pick a fresh empty folder for the project, something like ~/Documents/inbox-agent. This becomes the agent's home.
- Type your request, then press Shift+Tab to enter Plan Mode. Plan Mode tells Claude to write out the approach BEFORE doing anything.
- Lead with your end goal. Do not start with "how do I build..." Start with "I want an agent that does X for me." Claude will work backwards from the outcome.
The conversational Plan Mode template:
I want to build my first AI agent. Here is the end goal:
The agent should read my Gmail every 10 minutes, surface the conversations that need
my attention, archive the rest, and draft replies in my voice for the ones I do.
I want a simple browser dashboard where I can see what needs me, approve drafts, and
audit what got archived.
I am a complete beginner with code. Walk me through every step including
credentials, and ask me clarifying questions before you start building.
Use Plan Mode. Show me the approach you want to take before writing any code.
What to look for in the plan: Claude's response should name the specific tools (Gmail API, OAuth flow, Python or Node, dashboard framework), the data flow, and any decisions it needs from you. If the plan is vague, push back: "Be more specific about how the dashboard will display drafts." Iterate the plan 2 to 3 times before you hit Accept.
Step 2: Build
Once you approve the plan, hit Accept and Claude starts scaffolding the project. Your job during the build is not to babysit. It is to be available when Claude needs you, and to catch obvious mistakes mid flight.
- Watch the build. Keep the Claude Code window open. Watch the file structure scaffold, dependencies install, and the agent code take shape. You do not need to understand every line. You just need to see what Claude is doing.
- Hand over credentials when asked. Claude will pause partway through and ask for your Gmail API credentials. It will tell you exactly where to get them (console.cloud.google.com), how to download the JSON file, and where to drop it in your project folder. Follow the steps.
- Check in every 5 to 10 minutes. Skim the most recent output. If Claude is building something different from what you approved, stop it. If everything looks aligned with the plan, let it keep running.
What normal looks like: a typical first build takes 30 to 60 minutes. Claude will create files, install dependencies, scaffold the dashboard, set up the OAuth flow, and write the actual agent logic. You will see it stop once or twice to ask you questions. Answer them. The build is mostly automatic after that.
Step 3: Test
Once the build is done, Claude runs a test on its own work. The test reads a small slice of your inbox, classifies the conversations, and shows you what would have been surfaced or archived.
- Let Claude run the test. Claude will tell you "I am running a test now." Do not interrupt. The test usually takes 1 to 2 minutes. Output goes to the terminal so you can see what the agent decided.
- Verify the output. Does it surface the right conversations? Is it archiving things you would have wanted to see? If yes, ship it. If no, tell Claude what was wrong and it will adjust the rules.
- Open the dashboard. The agent renders a dashboard at localhost:3000 (or whatever URL Claude tells you). You will see the inbox state, the surfaced conversations, the pending drafts, and the archive log.
First day expectations: the agent will surface a few things you would have archived and archive a few things you wanted to see. That is normal. Use the dashboard's "Surface this" and "Archive this" buttons to teach the agent. By day 7, it will be calling the right shots 95%+ of the time.
Extend The Agent
Once the inbox agent is shipping, the same Plan/Build/Test framework works for every other system you check manually:
- Calendar agent: surfaces conflicts, drafts holds for focus time, sends reschedule replies in your voice
- Slack agent: same logic as inbox, but for Slack DMs and channel mentions
- Sales pipeline agent: pulls deal status from your CRM, drafts follow up emails for stalled deals
- Newsletter triage: moves all newsletters into a single "reading queue" you can hit Sunday morning
- Receipts auto log: files every transactional email into a Notion or Google Sheet for bookkeeping
One prompt, one extension. Do not try to build all five extensions in one session. Each one deserves its own Plan/Build/Test cycle and a week of running before you trust it. The compounding payoff: by month three you have replaced 5 to 10 SaaS subscriptions and reclaimed several hours per week.
Common Mistakes To Avoid
- Skipping Plan Mode and going straight to build (this is the number 1 reason agents fail)
- Approving a vague plan instead of pushing back for specifics
- Setting auto send instead of draft only (always keep a human in the loop until you trust the voice match)
- Skipping the credentials step because OAuth feels intimidating (Claude walks you through it, takes 5 minutes)
- Trying to make the agent perfect on day one (ship rough, teach with the dashboard buttons)
- Forgetting to back up your Gmail before the first run (the agent only archives, never deletes, but a one time backup is good practice)
- Treating the agent as set and forget (review the archive log daily for the first week, then taper)
Your Next 60 Minutes
- Minutes 1 to 5: install Claude Code Desktop. Open a fresh folder for the project.
- Minutes 6 to 20 (Plan): paste the conversational template into Claude. Hit Shift+Tab to enter Plan Mode. Iterate the plan with Claude until it covers everything you want.
- Minutes 21 to 50 (Build): approve the plan. Hand over Gmail API credentials when Claude asks. Check in every 5 to 10 minutes.
- Minutes 51 to 60 (Test): let Claude run the test. Verify the output. Open the dashboard. Approve your first 5 drafts. The agent is now live.
Once you ship your first agent, you stop seeing AI as a chat interface and start seeing it as labor. Every system you check manually becomes a candidate for automation. That mental shift is the actual product. The inbox agent is just the doorway.
Advanced Appendix: The Power User Build Prompt
If you want full control over the architecture instead of letting Claude propose it, this is the build prompt to start from. It specifies the language, the framework, the data flow, and the dashboard. Paste it into Plan Mode the same way you would the conversational template. Claude will still propose the plan, you will just constrain its choices.
Build me an inbox agent that does the following:
1. READS my Gmail every 10 minutes using the Gmail API.
2. SURFACES the conversations that need my attention. Important = client emails,
paid subscribers, anyone I have replied to in the last 30 days, anything mentioning
my name or business directly.
3. ARCHIVES anything that doesn't need me. Newsletters, transactional receipts,
social notifications, automated bounces.
4. DRAFTS replies for the surfaced conversations using my last 50 sent emails as a
tone reference. Do not send anything automatically. Drafts go into Gmail's draft
folder for me to review.
5. RENDERS a simple browser dashboard at localhost:3000 that shows: Inbox Zero
count, Surfaced conversations, Pending drafts, Archive log.
Use Python + the Gmail API + a simple Flask dashboard. Walk me through every step
including how to get the API credentials. Use Plan Mode. Show me the approach before
writing any code.
When to use this instead of the conversational template: use the power user prompt when you have specific architectural opinions (you already know Python, you want Flask specifically, you want a particular dashboard layout). Use the conversational template when you want Claude to choose the best stack for your situation. Both work. The power user version constrains the build, the conversational version opens it.
Go Deeper
Prefer a printable version? Grab the PDF: https://drive.google.com/file/d/1mmw3E5gcxTeio6ufqznBE2rWx0jF8Otz/view?usp=drivesdk
Want the whole system installed live, with Cooper on the call? Build Your Own AI, the two week sprint runs the first two weeks of August.
Or get a new working tool every Monday inside The AI Operator community on Whop.
The honest part
The guides are free. The working agents are $97.
Cooper has published 125+ guides like this one, free, no email gate. The step after reading is running the actual systems: five working agents, including the content engine behind his 10M+ views, plus your first month inside The AI Operator community, a new working tool every Monday.
Want it built with you, live? Build Your Own AI · $1,997 · live Aug 3