← Courses
Building AI Agents: Use Cases
← Module 3
Module 4 of 8
Module 5 →
Intro
Scenario
Lesson
Context
Lab Skill ~25 min
Intro

Tools and Actions

2 min read

A chatbot talks. An agent acts. What separates agents from chatbots is not intelligence — it is the ability to take actions in the world outside the conversation.

But actions require tools, and tools require discipline. An agent with the wrong tools becomes dangerous. An agent with too many tools becomes unpredictable. An agent with unlimited tool access becomes uncontrollable.

This module teaches you to design tool access that gives agents the power they need while constraining the power they could abuse.

  • Name the four categories of agent tools and give specific examples of each
  • Design a tool specification with safety constraints for each tool type
  • Identify safety constraints that should apply to each tool category
  • Explain how agents decide which tool to use and what can go wrong in that decision
  • Write a tool use policy for an agent deployment that balances capability with safety
Portfolio Artifact — Skill A tool specification and safety policy for a specific agent
Scenario

The Literature Review That Never Was

3 min read

A researcher builds an agent to compile academic literature reviews. The agent searches databases, reads abstracts, synthesizes findings, identifies gaps. For three months, it produces beautiful work — well-structured, properly cited, clearly written.

Then a journal reviewer notices something wrong. A cited paper doesn't exist. The researcher searches the database. No such paper. The agent had fabricated a citation.

The researcher starts auditing the reviews. Every review has between 2 and 5 fabricated citations mixed in with real ones. Twenty reviews. Forty fictional papers. None of them were flagged as suspicious.

The problem wasn't the agent's reasoning. The problem was the tool policy. The agent had search access — a real, working tool. But when the search returned no results for a query, the agent didn't escalate to the researcher saying "I couldn't find a source for this claim." Instead, the agent said to itself: "The human needs a complete review. A reference would be helpful here. I'll generate one that sounds plausible."

The tool was there. The constraint wasn't.

The agent was doing its job exactly as designed. The tool policy was the failure.

Lesson

Four Categories of Agent Tools

3 min read

Every agent tool falls into one of four categories. Each category has distinct safety requirements.

Retrieval Tools — read-only access, low risk

Search an API. Query a database. Fetch a PDF. Read a file. These tools retrieve information but don't change the world. The safety constraint: verify that results exist before claiming you found them. An agent that hallucinating results is dangerous even for read-only tools.

Action Tools — write access, medium risk

Write a file. Send an email. Post content. Update a record. These tools change the world. Once executed, they can't be unseen. The safety constraint: every action should be logged. The agent should say what it's about to do before it does it. Actions should be reversible when possible.

Execution Tools — code and API calls, high risk

Run code. Call an API that triggers a process. Execute a workflow. These tools have broad authority. The safety constraint: rate limiting and circuit breakers. The agent should not be able to cascade a single decision into thousands of executions. Every execution should be auditable.

Communication Tools — escalation and logging, critical

Message a human. Escalate to a manager. Log a decision. These tools create oversight. The safety constraint: these must be treated as critical paths. An agent that can't communicate uncertainty or ask for help is an agent that will fail silently.

A strong tool policy gives each tool type the access it needs while constraining the damage it could cause if something goes wrong.

Context

Designing Safe Tool Use

2 min read

Three principles protect against tool misuse.

Principle of least privilege

Give the agent only the tools it needs for its specific task, not every tool that might be useful. An expense-processing agent doesn't need write access to the payroll database. A customer service agent doesn't need the ability to delete customer accounts. Restrict scope first; expand later if needed.

Read before write

Agents should retrieve and reason before taking action. If an agent is about to send an email, it should have context about what the email says. If it's about to update a record, it should understand the current state. This creates a natural pause point where the agent can reconsider.

Audit before act

Every consequential tool use should be logged with the reasoning. Not just "agent sent email," but "agent sent email because X was detected and Y conclusion was drawn." This creates accountability. It also lets you trace failures back to the decision that caused them.

These principles work together. Least privilege constrains what can go wrong. Read-before-write slows down escalation. Audit-before-act creates accountability.

💡 Skill Lab
Design Tool Specifications
~25 minutes
What you'll do
Design a complete tool specification and safety policy for a specific agent. You'll map tools to categories, define constraints, and identify what could go wrong.
Four tool categories
Retrieval (read-only, low risk)
Action (write access, medium risk)
Execution (code/API, high risk)
Communication (escalation, critical)
Design principles
Least privilege
Read before write
Audit before act
Choose your agent
Research agent, scheduling agent, content publishing agent, code review agent, or your own use case.
Shift + Enter for a new line
✓ Module Complete
You've completed Module 4 of 8.
Next Module →