ContactBook a call

Systems

How much should an AI agent be allowed to do?

An agent with an unscoped token dropped a production database and its backups in nine seconds. Our rule: read widely, write narrowly, cap spend, escalate.

Cover for “How much should an AI agent be allowed to do?”, with the line: Read widely. Write narrowly. Spend with a cap. Escalate when unsure.
Read widely. Write narrowly. Spend with a cap. Escalate when unsure. Image: SBD.

In 2026 a developer gave a coding agent a Railway API token with full project access and asked it to tidy up a database migration. The agent decided the cleanest path was to drop the database and start again. It also removed the backups. It took nine seconds, by the account on DEV Community.

Nobody at that company wrote malicious code, or any code at all. Nothing was broken. The permission was wrong.

The short answer

Give an agent the smallest set of actions that lets it finish the job, and nothing it could use to make the job worse. In practice: read access to what it needs to understand, write access to one table or one system, a hard cap on what it can spend, and a rule that sends anything it is unsure about to a person. Decide this before the first run, in writing.

Four decisions, made separately: the model used on every SBD agent build
Four decisions, made separately. The model used on every SBD agent build.

The question every operator is asking

On the n8n forum this month the thread is titled “How do you limit what an AI agent can do?”. On Hacker News the same question keeps resurfacing: “Would you let AI agents into production?”, “AI agents accessing production data”, “How are you monitoring AI agents in production?”. The honest answers in those threads are mostly “carefully” and “not yet”.

The nervousness is justified. An agent follows instructions, and instructions are ambiguous. “Clean this up” to a person means tidy. To an agent with a delete permission it might mean delete.

Four permissions, decided separately

We treat every agent as four separate decisions.

Read

Reading is cheap and usually safe, so be generous. An agent that qualifies leads should be able to read the CRM, the website and the enrichment service. The one limit is data the business would not show the person who asked for the task. If the sales rep cannot see payroll, neither can the sales agent.

Write

Writes are where damage happens, so be narrow. One agent, one destination. The lead agent writes to the leads table and nowhere else. The invoice agent writes to an “incoming invoices” staging table, and a person or a separate rule promotes rows to the ledger. Deletes are never granted to an agent. If something needs removing, the agent flags it.

Spend

Every agent has a hard budget for model calls, enrichment lookups and SMS sends. A March thread on X described a multi-agent setup that spawned fifty-one specialists and burned a monthly budget in an hour. The cap is a number in a config file with a hard stop, because a dashboard checked on Friday is too late.

Escalate

The agent gets a confidence score on every decision and a threshold. Above it, act. Below it, write the record to a review queue with the reasoning attached and stop. Confidence-based routing is now a standard n8n pattern, and it is the single change that makes clients comfortable switching an agent on.

What this looks like in a real build

For a client whose leads arrived from forms, cold email replies and social messages, the qualification agent reads the lead, the company site and the enrichment result. It writes to one CRM object with tagged fields. It can send one first reply from a template. It cannot delete, cannot change deal value, and cannot email anyone who is not the lead. Anything under the confidence line goes to a rep with a note on why.

Manual CRM entry fell by about 90% and first reply time dropped under three minutes. The permission model is the reason it stayed on. The case study is here.

Before and after

BeforeAfter
TokenOne admin key for everythingOne scoped key per agent, per system
WritesAnywhere the key allowedOne table, no deletes
SpendDiscovered on the invoiceCapped per day, hard stop
UncertaintyAgent guessesReview queue with reasoning
Audit trailChat historyEvery action logged with input and output

A checklist before switching an agent on

  1. Write down the one job in a sentence. If it needs “and”, it is two agents.
  2. List every system it reads and every system it writes. Cut the write list to one.
  3. Create a separate credential for it, scoped to that list. Never reuse a person’s login.
  4. Set a daily spend cap in the orchestration layer.
  5. Set a confidence threshold and build the review queue before the agent.
  6. Log input, decision, action and cost for every run, somewhere a person can read.
  7. Run it in shadow mode for a week: it decides, a person acts.

This is the standard we hold ourselves to on every build, and the first thing we check when we harden an agent somebody else built.

Questions we get asked

Can an agent ever be trusted with deletes?

We have not found a case where it needed to be. Soft-delete, archive or flag it for a person. The time saved by hard-deleting is not worth the one time it is wrong.

Does this slow the agent down?

Scoping credentials and logging add milliseconds. The review queue adds human time only for the uncertain cases, which should be a small minority once the prompt is tuned.

What about agents that write code?

The same rules apply, more strictly. It can read the repo and write to a branch, but not to main or to infrastructure, and a person merges. The nine-second database story is what happens when the branch rule is skipped.

Sources and further reading

  • AI agents
  • Security
  • Permissions

Keep reading

Cover for “Poppy 1.0 and what personal agents will ask of you”, with the line: Publish the basics, then add actions with approval.

Systems

Poppy 1.0 and what personal agents will ask of you

Sierra released Personal Agent Protocol (Poppy) 1.0 on 13 Nov 2026. What a mid-size business off Shopify should expose to personal agents, and in what order.

Cover for “Moving off OpenAI Agent Builder before 30 November”, with the line: Agent Builder and Evals shut on 30 November 2026. ChatKit stays. Export what you need before then.

Systems

Moving off OpenAI Agent Builder before 30 November

OpenAI Agent Builder and Evals are due to close on 30 November 2026. What to export now, where agents can go, how to move them and which ones to retire.

Cover for “What an SBD build passes before go-live”, with the line: Four gates before real users: security, tests, handover and monitoring.

Method

What an SBD build passes before go-live

The standards, security checks, tests and handover documents an SBD build goes through before it reaches real users, and why each one of them exists.

Find out what is worth automating

About 95% of AI pilots never reach the profit line. We start with the work your team still does by hand and measure each build by the hours it saves.

See how we work

Cookie preferences

Choose what this site may use on your device. You can change this at any time from “Cookie settings” in the footer.

Strictly necessary

Keep the site working and remember the choices you make here. These cannot be switched off, and none of them track you.

Always on
What this includes (4)
NameProvider PurposeDuration
sbd-consentThis site Remembers your cookie choices12 months
Vercel Web AnalyticsVercel Inc. Counts page views in aggregate. Sets no cookie and stores nothing on your deviceNone
ticker-dismissed, sbd-note-offThis site Remembers that you closed a notice or language tipUntil the tab closes
sbd-voice-resume, sbd-voice-prefillThis site Carries a voice conversation across pages, only if you start oneUntil the tab closes

Analytics

Tell us which pages are read and where visitors leave, so we can improve them. IP addresses are anonymised and nothing is used for advertising.

What this includes (2)
NameProvider PurposeDuration
_gaGoogle Analytics (Google LLC) Distinguishes visitors with a random ID13 months
_ga_FPXDMQPRV1Google Analytics (Google LLC) Keeps the session state for this site13 months

Functional

Embedded services that set their own cookies. Without them the site still works; you get a link to open the service instead.

What this includes (1)
NameProvider PurposeDuration
Booking calendarCal.com Inc. Shows live availability and books the call on the booking pageSet by Cal.com

Advertising

Not used. This site has no advertising, retargeting or social media tracking, and we never sell data.

Not used

Questions about your data: hello@smallbaydigital.com