Lesson 4. Tools and Actions#
Why This Matters#
The model can not only answer but also do things: write to a spreadsheet, send notifications, call APIs. This makes the agent truly useful.
Key Idea#
Tools = the agent's hands
The model "thinks," tools "do."
How It Works#
Flow:
- Client sends a request
- Model understands an action is needed
- Model calls a tool (e.g., "write to spreadsheet")
- Tool performs the action
- Model replies to the client
Example:
Client: "Book me for a haircut, Friday 3:00 PM, Ivan, +1-999-123-45-67"
Agent:
- Understands: booking needed
- Calls tool "write to spreadsheet"
- Parameters: name=Ivan, date=Friday, time=3:00 PM, phone=+1-999-123-45-67
- Spreadsheet updated
- Reply: "Done, Ivan! Booked you for Friday at 3:00 PM. See you then!"
Types of Tools#
1. Write to Spreadsheet / Database
Saving data for later use.
Examples:
- record a request
- save contacts
- add a task
Platforms: Google Sheets, Airtable, Notion
| Google Sheets | Airtable | Notion |
|---|---|---|
2. Send Notifications
Send a message to a manager, client, or channel.
Examples:
- notify manager about a new request
- send confirmation to client
- send meeting reminder
Platforms: Telegram, email, SMS
3. Search Information
Find data in a database or on the web.
Examples:
- check order status
- find a product in the catalog
- check available slots in the calendar
Platforms: Business system APIs, calendars, search engines
4. API Calls
Calling an external service.
Examples:
- create an invoice in CRM
- add a meeting to the calendar
- send data to the accounting system
Platforms: any with an API (CRM, ERP, cloud services)
Example: Booking Agent with Tools#
Task: book clients for the salon
Tools:
- Google Sheets (store bookings)
- Telegram (notify administrator)
Scenario:
- Client writes: "I'd like to book a manicure"
- Agent: "Sure! For what date?"
- Client: "Wednesday 2:00 PM"
- Agent: "Your name and phone?"
- Client: "Maria, +1-999-111-22-33"
- Agent:
- writes to Google Sheets: Maria | Wednesday | 2:00 PM | +1-999-111-22-33 | manicure
- sends to Telegram to administrator: "New booking: Maria, Wednesday 2:00 PM, manicure"
- replies to client: "Done, Maria! Booked you for Wednesday at 2:00 PM for a manicure. See you!"
When Tools Are Needed#
Needed for:
- saving data
- notifications
- performing actions outside the chat
Not needed for:
- simple Q&A
- consultation without actions
Tool Security#
Rules:
- don't give the agent access to critical actions (delete, payments) without verification
- limit permissions (write only, no delete)
- log actions
- test on safe data
Check Your Understanding#
- Why are tools needed?
- What types of tools exist?
- Give an example of an agent with tools
- What security rules matter?