Module 5 · Design an AI Agent · Lesson 12 of 34

Designing tools and autonomy

Write tool definitions a model can use well, pick an autonomy level, and plan for failure.

In this lesson · about 18 minutes

  • Write a clear tool definition with name, description and input schema
  • Choose an autonomy level for each action
  • Plan how the agent handles tool errors

The model never runs a tool itself. You describe each tool, the model replies with a request to use one, your code runs it and sends the result back. The description is all the model has to go on, so write it like documentation for a new colleague:

{
  "name": "get_order_status",
  "description": "Look up one order by its number. Use when the
    customer asks where an order is or when it will arrive.
    Returns status, delivery date and items. Read-only.",
  "input_schema": {
    "type": "object",
    "properties": {
      "order_id": {
        "type": "string",
        "description": "The order number, like 1042"
      }
    },
    "required": ["order_id"]
  }
}
  • Name: a verb and a noun, specific. get_order_status, not tool2.
  • Description: what it does, when to use it, what it returns, and any side effects.
  • Inputs: few, typed, with examples. Use fixed choices (enums) where you can.
  • Results: short and useful. Return the five fields that matter, not a 3,000-line record.
  • Errors: readable messages the model can act on: "Order 1042 not found. Ask the customer to check the number."

Sorting drill

How much autonomy?

For a bakery's help-desk agent, how should each action be handled?

  • Look up an order's delivery date
  • Search the help articles
  • Refund $35 for a squashed cake
  • Email a customer a delivery update
  • Run any SQL against the customer database
  • Change product prices on the website

0 of 6 sorted

Guided dialogue

Design review

0 of 3 answered

R

A senior engineer reviews your agent design before launch.

R

Your tool is called process with the description “Processes things.” Is that fine?

Check your understanding0 of 2 correct

Question 1

1.What does the model use to decide when to call a tool?

Question 2

2.A tool returns a 3,000-line customer record. What is the main problem?

Write the spec for your project's agent.

Consider these questions and write down your thoughts. What you write stays on this device.

Quiz score: 0 of 2

Tip: answer every quiz question correctly first.

Written by Noviq Academy in its own words. The simulators are small teaching models that keep the real idea and leave out the scale; their numbers (prices, speeds, scores) are illustrative. Model names, prices and features change quickly, so check your provider's current documentation before you build. Read-aloud uses your device's built-in voices.