Insights

AI agents that take action: how to specify each action safely

A five-part spec for each action an AI agent may take: trigger, inputs, checks, result and undo. Three worked examples show how to keep actions safe and reviewable.

By the Askocto team · · 4 min read

AI agents that take action do more than answer: they change an address, start a return, book a meeting or create a ticket. That is where the real time savings come from, and also where the risk sits. The safest way to give an agent an action is to write a short spec for it first. This article shows a five-part spec, three worked examples and a review routine.

In short: For every action write down the trigger, the inputs, the checks, the result and the undo. If you cannot fill in the undo, the action needs a person.

The five-part action spec

Keep the spec to a few lines per action. It forces you to decide the details before the agent meets a real customer.

  1. Trigger. When may the agent use this action? Name the situation, not just the action.
  2. Inputs. What information must it have first, and where does it come from? Never let it guess an input.
  3. Checks. What must be true before it goes ahead? Identity verified, order within a window, amount below a limit.
  4. Result. What does the customer see, and what gets recorded? Both the confirmation and the log entry.
  5. Undo. How is a mistake reversed, and by whom?

Write these in plain language inside the procedure that uses the action, as described in how to write procedures for an AI support agent. In Askocto, actions such as Custom action, Stripe, Shopify, Book a meeting and Escalate to human are attached to the agent, and the procedure says when each applies.

Worked example one: change a delivery date

Part Specification
Trigger Customer asks to move a delivery that has not shipped
Inputs Order number, verified email, new date from the customer
Checks Order status is not shipped, new date is inside the delivery window
Result Customer sees the new date, the order note records the change and who made it
Undo A team member can restore the original date from the order note

If a check fails, the procedure should say what the agent does instead: explain why, offer the nearest available date, or hand over.

Worked example two: issue a small refund

Part Specification
Trigger Customer reports a damaged item within the return window
Inputs Order number, item, photo if your policy requires one
Checks Amount is below the limit you set, no earlier refund on this order
Result Refund created, customer told the timing, ticket marked solved
Undo Finance reviews refunds weekly, and any can be flagged and corrected

Anything above the limit goes to a person. Choosing that limit is a business decision, so decide it with finance before launch, not after.

Worked example three: book a call

Part Specification
Trigger Visitor meets your qualification rule and asks for a call
Inputs Name, email, topic, preferred time
Checks Time is within available slots, email looks valid
Result Calendar invite sent, summary added for the host
Undo Customer can reschedule from the invite, host can cancel

This one is low risk because the undo is easy and the cost of a mistake is small. Low-risk actions are the right place to begin. The sales agent page shows where booking fits.

Choosing which actions to give first

Sort your candidate actions by how easy they are to undo and how much they cost when wrong.

  • Start: lookups, sending links, adding notes, collecting details.
  • Next: changing bookings, resending items, small credits within a limit.
  • Later or never: large refunds, cancelling accounts, deleting data, changing payment details.

The tiering idea is covered in connecting an AI agent to your helpdesk and CRM, and the AI agent for Shopify article applies it to store actions.

Testing an action before it goes live

Test with written scenarios, not only the happy path. For each action, prepare:

  • A case where every check passes.
  • A case where each check fails in turn.
  • A case where the customer gives half the information.
  • A case where the customer changes their mind midway.
  • A case where the connected system returns an error.

Run them in a test environment or with test records first, following the checklist in testing an AI support agent before launch. In Askocto you can try the agent in the Playground and replay written conversations as tests before publishing a version, so you can compare answers after each change.

Keeping actions reviewable

An action you cannot review is an action you cannot trust. Three habits help:

  1. Log every action with who, what, when and which conversation.
  2. Review a sample weekly and compare what the agent did with what a person would have done.
  3. Keep a change history for the agent's configuration so you know when a rule changed.

If you want a view of the whole setup, the procedures feature page explains how steps and actions are written together.

Frequently asked questions

What actions can an AI agent take?

That depends on what you connect. Typical actions are looking up orders, collecting details, creating tickets, booking meetings, processing small refunds and handing over to a person.

Is it safe to let an AI agent take actions?

It is as safe as the limits you set. Use narrow actions, clear checks, amount limits and human approval for high-impact steps, and review the log.

How do I stop an agent from making the wrong change?

Require verified inputs, write the conditions into the procedure, test failure cases and give the agent no more permission than it needs.

What if an action fails halfway?

Specify the fallback. Usually the agent tells the customer plainly what happened, records the failure and hands the case to a person with the details.

Train an agent on your own help center

Askocto answers the repeat questions across chat, email and voice and hands the hard ones to your team.

Keep reading

All articles
Insightsai agents
Aug 24, 20245 min read

AI agents explained: what they are and how they work

AI agents explained without jargon: the five parts every agent has, how it differs from a chatbot, a script or an assistant, and a short checklist for judging one.

Read article
Insightscustomer support automation ideas
Nov 6, 20266 min read

15 customer support automation ideas to start this quarter

Fifteen support tasks you can automate, in three tiers ordered by effort and risk, with what each needs and where it can go wrong. Pick a first batch and move up as it holds.

Read article