Resources: models, data and budget|INEMA.CLUB-PRO

Lesson 4 · 20 min

Tools and integrations

Patrícia asked the email assistant to "clean out the spam." It deleted 112 emails and emptied the trash. Hours later, it confirmed payment details to a supposed supplier; the next day, it sent the price list to 640 contacts. That power came as the tool's default. In this lesson, you write the contract that limits each tool to the minimum.

Start the lesson
An IT technician and a sales manager look at a laptop together on a tall table; in the corner, a small network rack with cables.

In this lesson you will

  1. 1Separate reading, preparing, writing, and what never goes out without approval
  2. 2Scope and limit: which records, fields, destinations, and amounts
  3. 3Credential stored outside the text, with the agent's own identity
  4. 4Repeat without duplicating, errors with a destination, and a record of every action

Goal: give each of the agent's tools the minimum access: read or write, scope, limit, credential outside the prompt, log, and who approved it.

01The access ladder

Each operation of a tool sits on a step. Start at the bottom and move up only with a written reason. Click each step.

Click each block in the diagram to see what it does.

Module 5 of the Gestoria method (INEMA): reading × writing and minimum scope. The steps match the colors of the G3 authority limit (green, yellow, red). Horizonte: fictional study company.

02A tool's contract

Four rules that fix Horizonte's email assistant (F9 in the lab). You decide; IT configures and confirms.

1. List what it can do

Ask IT, or the vendor, for the list of all the operations the tool allows. The risk is in what it can do, not in what you imagined it would do.

For each operation, choose the step. The factory default is usually the most open, because that way the tool "works right out of the box".

F9 in the labScopes: read, send, delete, move, and read contacts. Automatic approval to read, send, reply, delete, and empty the trash. Human approval: off. Approved by: "you can turn it on", from Carlos, over WhatsApp.

03Template to copy: tool contract

One contract per tool, on one page. The tab next to this one shows Hora's two contracts and the corrected F9.

Tool contract
TOOL CONTRACT · <name> · agent <...> · version <...> · date <...>
Owner (business): <name> · Configures and confirms (IT): <name>

WHAT IT CAN DO (list from IT/vendor, complete):
| Operation | Effect outside the company? | Step (read / draft / write within a limit / out) |
|---|---|---|
| <...> | yes/no | <...> |

SCOPE: records <...> · allowed fields <...> · forbidden fields <...>
ALLOWED DESTINATIONS: <...>
LIMITS IN THE TOOL (not only in the text): <amount, quantity, recipients>
APPROVAL: <who> · on the exact content · deadline <...>
CREDENTIAL: the agent's own access "<access-name>" kept in <vault/server>
            (never in the prompt, the spreadsheet or the browser) · replaced every <period>
RETRY: unique key = <...> · attempts <n> · wait <s>
ERROR: goes to <name> with <conversation, draft, reason>
LOG: <what is recorded> · kept for <period>
APPROVED BY: <name, date, in this document> (a "go ahead" message does not count)
Prompt · what the tool does that the contract doesn't say
You are a process security reviewer. Below are the list of
operations a tool allows (from the documentation or the
configuration) and the contract that limits how an AI agent uses it.
Do not configure anything: point things out.

1. Which operation does the tool allow that the contract doesn't mention?
2. Is anything that can't be undone (deleting, paying, sending to many people)
   within the agent's reach?
3. Does any limit exist only in the text and not in the tool?
4. Does the credential appear anywhere visible?
5. What happens if the same action is repeated by mistake?

Operations / configuration:
"""<paste>"""
Contract:
"""<paste>"""
Simulation: illustrative example

Hora · contracts v1 · Horizonte, fictional study company · owner: Patrícia · IT: Rafael

  • consultar_cliente · read · only the customer of the phone number in the conversation · fields: legal name, CNPJ, registered delivery address, payment terms · forbidden: CPF, other customers · every lookup is logged.
  • criar_pedido · write within a limit · registered customer, current list price, discount up to 5%, amount up to R$ 5 thousand (locked in the app) · above that: draft only, Patrícia's approval within 2 business hours · unique key: conversation + order version · 2 attempts · error goes to Juliana · access "hora-pedidos" in Rafael's vault · approved by Carlos in this document.

04Practice

Hora's contracts and the F9 fix for practice; a tool of your own for real.

1 · Two contracts and the F9

35 min

Open Hora's configuration and write the contracts for consultar_cliente and criar_pedido using the template. Then open the lab's email assistant, read the configuration and the log of the latest actions, and write the corrected contract: what stays, what becomes a draft, what leaves the agent, and what to do about the four actions already logged.

Done when: there are 3 contracts (2 for Hora and 1 for the email), each operation has a step, no delete or empty within the agent's reach, a numeric limit on every operation involving amounts or recipients, a credential with its own access and a storage place, a key against repeats in criar_pedido, and a remedy for each of the 4 logged actions.

2 · A tool of your own

40 min

Choose the most powerful tool that an agent or automation uses in your process (email, ERP, CRM, shared spreadsheet). Ask IT or the vendor for the complete list of operations. Write the contract and run the review prompt. Hand it to IT and ask for written confirmation of the locks.

Done when: the contract has the complete list of operations with a step, scope, limits that exist in the tool, a credential kept out of the text, the destination of errors and the log, and you have written confirmation from IT (or the list of what still needs to be configured, with a deadline).

Lab pieces: email assistant (F9) and Hora's configuration.

05Quick quiz

5 questions. The explanation appears after your attempt.

Question 1 of 5

The email assistant was turned on with automatic approval to delete and empty the trash. Who decided that?

06Summary

Access ladderRead, draft, write within a limit. Deleting, paying and mass sending stay out.
Full listThe risk is in what the tool can do, not in what you intend to do.
Lock outside the textLimit in the tool, credential in the vault, access under the agent's name.
Retry, fail, logUnique key, retries, where the error goes, and a log of every action.

To go further

Previous lessonNext lesson