Home โ€บ The AI Gets Hands (Agents & Tools)
๐Ÿง  Module 04 ยท Intermediate

The AI Gets Hands (Agents & Tools)

โœจ PAN'S RULE: If it's not chaotic, it's not magic! โœจ

An AI that can only talk is like a brain in a jar โ€” super smart, but pretty boring. Let's give that brain some hands, feet, and a jetpack so it can actually DO things in the world! ๐Ÿš€

๐Ÿฆพ

What is an AI Agent?

Imagine a brilliant robot chef ๐Ÿค–. It knows every recipe in the world (that's its AI brain), but it can't cook without its tools!

Giving an AI "tools" is like handing our robot chef a spatula, a whisk, or an oven. When you ask it for a pancake, the AI thinks, "Aha! To make a pancake, I need the `whisk` tool and the `frying_pan` tool." Then, it uses them to actually make you a pancake! An AI Agent is a super-smart AI that doesn't just talkโ€”it can pick the right digital tool to actually get a job done!

The Agent's Toolkit

๐Ÿง  AI MODEL
โ†’
๐Ÿงฎ Calculator
๐ŸŒ Web Search
๐Ÿ“… Calendar
๐Ÿ“บ Watch this to see how developers build real AI Agents with tools! Heads up: this is a real-deal developer video, so don't worry if it seems complex. Just watch for the 'aha!' moment when they give the AI a new tool!

๐Ÿšจ TOP SECRET: Agent Sparky's Brainwaves ๐Ÿšจ

๐Ÿ’ป System Diagnostic: Agent Thinking...

When you give an agent a complicated question, it doesn't just guess. It makes a plan, step-by-step. This is called "Chain of Thought." It's like we get to see the AI's internal monologue!

SYSTEM LOG: Agent Thinking...
[USER_QUERY]: "How much does a pizza cost in New York and what's the weather?"
[THOUGHT]: This is a multi-step problem. I can't answer both at once.
[PLAN]: First, find the price of pizza. Second, find the weather. Third, combine the answers.
[ACTION]: Use `web_search` tool with query "average pizza price NYC".
[TOOL_RESULT]: "$25"
[THOUGHT]: Okay, I have the price. Now for the weather.
[ACTION]: Use `weather_api` tool with location "New York, NY".
[TOOL_RESULT]: "75ยฐF and Sunny"
[FINAL_RESPONSE]: A pizza in New York costs about $25, and the weather is currently 75ยฐF and sunny! ๐Ÿ•โ˜€๏ธ

Based on the log, what was the agent's FIRST action?

Use the web_search tool.
Use the weather_api tool.
Combine the answers.
โœ… JUNIOR AGENT CHALLENGE

Which Tool Should Sparky Use?

Your mission is to help Agent Sparky pick the right tool for each job. Click the best option!

To answer "What is 523 times 78?", Sparky should use the...

๐Ÿงฎ Calculator Tool
๐ŸŒ Web Search Tool
๐Ÿ“… Calendar Tool

To answer "What's the weather like tomorrow in London?", Sparky should use the...

๐Ÿงฎ Calculator Tool
๐ŸŒ Web Search Tool
๐Ÿ“… Calendar Tool

To answer "What appointments do I have on Friday?", Sparky should use the...

๐ŸŒ Web Search Tool
๐Ÿงฎ Calculator Tool
๐Ÿ“… Calendar Tool
โšก HACKER CHALLENGE

๐Ÿ’ป Hacker Challenge: Upgrade the Pizza-Bot!

Your mission is to upgrade the Pizza-Bot's brain! Agents need strict instructions (called a 'schema') to use their tools. In the sandbox below, add a new parameter for the pizza's crust and set its value to stuffed. Then hit Run!

Waiting for execution...
BUILD-ALONG PROJECT

Train a Custom Vision Tool!

Let's go beyond pre-made tools. We're going to build a brand new tool for our agent: a vision tool that can tell if you need help with your homework! We'll use a real-world tool called Teachable Machine to do it. No code needed!

  1. Open Google's Teachable Machine in a new tab.
  2. Choose "Image Project" and then "Standard image model".
  3. For "Class 1", rename it to "Thumbs Up". Use your webcam to take at least 20 pictures of yourself giving a thumbs up. ๐Ÿ‘
  4. For "Class 2", rename it to "Hand Raised". Take 20+ pictures with your hand raised, like you have a question. โœ‹
  5. Click the "Train Model" button. It might take a minute, but you're training a real AI!
  6. Once it's trained, test it out in the "Preview" window. Does it recognize your thumbs up and raised hand? You just built a custom vision tool!
๐Ÿ›ก๏ธ Safety Check: You're the Boss of Your Data

When you use a tool with a webcam like Teachable Machine, you are creating data. That's powerful! Remember Pan's rules: 1) Never use your camera without a parent's permission. 2) Never share images of your face, your room, or personal info. The model you trained lives only in your browser and is safe. Be smart, be safe!

Think Like a Builder: What would happen if you only trained the AI on your hand? Would it recognize your friend's hand? This is called bias, and it's why it's so important for AI builders to use lots of different data to make their tools fair for everyone.

๐Ÿ† MASTER BUILDER CHALLENGE

Architect a Travel Agent

Your turn to be the architect! Design a JSON schema for a `TravelBot` agent. It needs two tools: one for flights and one for hotels. Follow the missions in the code comments below to complete the agent's brain.

๐Ÿ† Sandbox: Architect a Travel Agent

Waiting for execution...

๐Ÿ“š Learn More

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง Parent Corner

An "AI Agent" is like a chatbot that can take action. Instead of just answering questions, it can use "tools" to browse the web, do math, or even order a pizza for you! This lesson is a great introduction to the logic of programming and problem-solving.

Family Challenge: Try the "Train a Custom Vision Tool" activity together using Teachable Machine. Brainstorm other fun things to teach the AI to recognize: different types of toys, happy vs. sad faces, or even different family members! It's a fantastic, hands-on way to understand how machine learning works without writing any code.