Docs Let your agent work

Approve actions

Approve or decline what an agent wants to change, in a goal or in chat, and read the Actions log afterwards.

Some tools change things: restart a service, scale a deployment, write a record. When you set such a tool to Asks first, an agent never runs it on its own. It proposes the call with its exact arguments, a person approves or rejects it, and an approved call runs once. Every proposal, decision and result is kept in the agent's Actions log.

In the portal The approval card in a goal's chat; Home › Needs you; Agents › your agent › Activity › Actions Member Admin

Before you start

  • The agent needs tools, and the ones that change things should be set to Asks first. A tool its server does not mark as read-only asks first unless you change it. See Runs freely or Asks first.
  • Built-in tools can ask first too; see Built-in tools.
  • To approve or reject, you need to be a member or an admin. Viewers can read every approval card and the Actions log.

Where an agent asks

An agent asks to run an Asks first tool in two places, and they work differently:

In a goalIn a plain chat
WhereAny goal, started in the portal, in a channel or by a schedule.A chat reply in the portal, or in a Slack, Discord or Teams thread.
How you decideAn approval card with Approve and Reject, on the portal.Reply yes or no in the conversation.
Listed on HomeYes, under Needs you.No.
Expires24 hours after it was proposed.24 hours after it was proposed.

Conversations over the Chat API are never offered Asks first tools.

Whichever way it asks, the agent must give a reason in its own words (at most 500 characters), and the arguments are fixed when it asks (a JSON object of at most 16 KiB). If the agent's call breaks a rule (for example, no reason given), the portal refuses it before it reaches you, and the goal card shows "Tried, refused:" with the tool and why.

Approve an action in a goal

When a goal calls an Asks first tool, the call does not run. The goal pauses, its card shows Waiting for approval, and the action appears on Home under Needs you as "Approve:" with the tool and its tool server.

  1. Open the goal: choose Decide on Home, or open the goal's chat.
  2. Read the card. It shows:
    • the tool and the tool server it runs on (a built-in tool shows "on portal"), with the server's environment and region when it has them, and a Production badge for a production server;
    • the arguments exactly as stored, laid out for reading;
    • "The agent's reason (its own words, not checked):" and the reason;
    • when it was proposed and when it expires, for example "Approve runs restart_service once, now. Expires in 23 h".
  3. Optionally write a note (at most 500 characters). The agent reads it, so a note with a rejection can tell it what to do instead.
  4. Choose Approve or Reject.

Either way the goal goes back to work. After an approval the next step runs the call first, before the agent does anything else, and then tells the agent the result. After a rejection the agent is told it was rejected, with your note.

A goal started in Slack, Discord or Teams also posts the request in its thread: "agent asks to run tool on server. Reason: … Review it on the portal:" and a link. The arguments are shown only on the portal, and that is where you decide. A reply in the goal's thread, or in its portal chat, does not approve it: it gets "agent is waiting for approval of an action. Approve or reject it above, or Stop the goal."

Approve an action in a chat

In a plain chat, the agent's reply ends with the portal's own line, for example:

I want to run `restart_service` on ops-tools with: {"service": "billing"}. Reply **yes** to run it or **no** to skip.

Long arguments are shown as a JSON block, and a single query or SQL argument as an SQL block, so you can read exactly what will run.

  1. Read the arguments in the reply.
  2. Reply with one word: yes, y, approve or ok to run it; no, n, deny or skip to skip it. Case does not matter.

A yes runs the call once, at the start of the agent's next reply, and the agent carries on with the result. A no tells the agent you skipped it. Anything other than those words is an ordinary message: the agent answers it, and the call keeps waiting. Only one call waits per conversation.

Any member or admin who writes in that conversation can answer. In the Actions log, the note on such a decision reads "answered by typing yes in the conversation" (or the word you typed).

Who may approve

  • Any Member or Admin may approve or reject, not only the person who started the goal. A viewer's card reads "You cannot decide this:" and why.
  • An admin can require that someone other than a goal's starter approves its actions; see Stop people approving their own goals.
  • Every decision is recorded with who made it and when, in the Actions log and in the organisation's audit log.

Stop people approving their own goals

By default, the person who started a goal may approve its actions. If your team wants a second pair of eyes on every change, an admin can turn this off.

In the portal Settings, panel Approvals Admin
  1. Open Settings and find Approvals.
  2. Tick The person who starts a goal may not approve its own actions.
  3. Choose Save approvals.

From then on, the starter's card hides Approve and says "Someone else must approve this: you started the goal. Any other member or admin can; you may still reject it." The rule also covers:

  • Helpers: a helper's goal counts as started by whoever started the goal that asked it (see Ask other agents).
  • Scheduled runs: the starter is the person who last saved the schedule (see Schedules).

It does not apply to a yes typed in a plain chat, which has no goal starter. Leave the box off if you work alone, or nobody could approve anything.

How it works

An approved call runs once

The call runs with exactly the stored arguments, once. The agent cannot change them after you approve. Just before running, the portal checks the tool is still given to the agent and unchanged. If an admin removed or changed the tool in the meantime, the call does not run and its outcome reads "not run: the tool changed or was removed after approval".

A call has 30 seconds. If the tool server does not answer in time, the action's state is Unknown: the portal cannot tell whether it took effect, and the outcome says to check the system. The same happens if the portal restarts in the middle of a call. A goal's "what changed" line counts such a call as "may have run (timed out)".

Expiry

An action waits 24 hours. After that, a goal's action is rejected with the note "no decision in 24 hours", and the goal goes back to work knowing it was not run. A chat's action is closed; a yes or no sent after that gets "That request expired: nobody answered within 24 hours, so it was not run. Ask the agent again if you still want it."

When the goal ends first

If a goal is stopped while an action waits, the action is closed and never runs. If it was approved but had not run yet, its outcome reads "not run: the goal ended". A second decision on the same action gets "this action was already decided, or it expired".

Action states

StateMeaning
Waiting for approvalProposed; nobody has decided yet.
ApprovedApproved; it runs at the start of the next step or reply.
RunningThe call is under way.
DoneIt ran and the tool answered.
FailedIt ran and the tool reported an error, or it did not run (for example, the tool changed).
UnknownIt may have run; the portal could not get an answer.
RejectedA person rejected it, or it expired.

Read the Actions log

Each agent has an Actions log: every call it asked to run, newest first, with the arguments exactly as proposed, who decided and when, and what came back. It lists actions from goals and from plain chats.

In the portal Agents › your agent › Activity, chip Actions Viewer Member Admin

Filter with the chips at the top:

ChipShows
AllEvery action.
WaitingActions nobody has decided yet.
RanApproved actions: approved, running, done, failed and unknown.
Rejected or expiredActions a person rejected or nobody decided in time.

The log shows the newest 100 actions. Its columns are When, Tool, Arguments (the first 80 characters; open the row's fold for the rest), State, Started by, Decided by, Decided at, Note and Outcome (the first line of the result). Open goal opens the chat the action came from.

Home's Activity also has an Actions chip, which lists actions across all agents as they are approved, run or fail.

What you can and can't do

You can
  • See the exact arguments before anything runs.
  • Approve or reject any goal's action as a member or admin, with a note the agent reads.
  • Answer a chat's request with yes or no.
  • Find every waiting goal action on Home under Needs you.
  • Require a second person to approve a goal's actions (admins).
  • Read every action an agent proposed, and its outcome, in the Actions log.
You can't
  • Edit the arguments; reject the call and tell the agent what to change.
  • Approve a goal's action from Slack, Discord or Teams; decide on the portal.
  • Run an approved call twice, or after 24 hours.
  • Have the agent run an Asks first tool with no approval, in a goal or a chat.
  • Use Asks first tools over the Chat API.
  • Undo a call that ran; the portal records it but cannot reverse it.

Troubleshooting

"agent is waiting for approval of an action. Approve or reject it above, or Stop the goal."
You sent a message to a goal that waits for a decision. Use the card's Approve or Reject.
"someone else must approve this: you started the goal"
Your organisation bars a goal's starter from approving its actions. Ask another member or admin, or reject it.
"this action was already decided, or it expired"
Someone decided it first, or the 24 hours passed. Reload the goal to see which.
"not run: the tool changed or was removed after approval"
The tool was changed or taken away from the agent between your approval and the run. Check the agent's tools on Runs freely or Asks first, then ask the agent again.
"the server did not answer within 30s; read the system to see whether it took effect"
The action is Unknown. Check the system yourself before asking for the call again.