All articles
November 25, 2026

AI Agent Human Approval: How to Add It to Your Workflow

AI agent human approval means your agent stops and a person says yes or no on their phone. M91 rings that person and returns the answer, and only a clear yes lets your own software act.

#

TL;DR

  • Stop the agent before it changes anything. Send the planned action to M91 with a POST request and wait for a person's answer.

  • Get the answer when M91 calls your web address, or ask M91 for it. Act only on a clear Approve.

  • Treat Reject, a timeout and no answer as a no. Your own software sets the timeout.

#

How can an AI agent ask a person to approve an action before an external system performs it?

Pause the workflow before the external write, send the proposed action to M91, and wait for a person's decision. Your software then passes only an explicit approval to its executor, the separate service that does the real write.

Human-in-the-loop means a person takes part in a workflow at a key step. Here the step is a yes or no on an agent proposed action, which is agent action approval. M91 does not run the action; your own software does.

Here is the full handoff, which is your AI agent approval workflow, in five moments:

  1. The agent proposes an action. Your software stops before the external write. What you should see: nothing has changed in the outside system yet.

  2. Your software sends the proposed action to M91 as an alert, with Approve and Reject as the answers. What you should see: M91 responds to the alert request.

  3. The person's phone rings, and they choose Approve or Reject. Each choice is a SHARED response, which means the person takes responsibility for the alert. What you should see: the alert shows a decision.

  4. Your software gets the decision. A callback is a message M91 sends to your web address, or you can read the alert back. What you should see: a decision that says Approve or Reject, not a guess.

  5. The executor acts only if the decision is Approve. What you should see: the write happens after approval, and not before it.

New to how an alert moves from software to a person? See the earlier guide: How the M91 Alert Flow Moves an Alert From Software to a Person.

Developers have asked for this pattern. A Google Cloud Platform Scion discussion on GitHub asks for an approval webhook and API. It wants an external executor to perform an approved write using its own credentials.

A GitHub community discussion asks whether Copilot can request approval for a specific action such as publishing a GitHub Release. These show demand, not proof that either product supports the integration.

#

What should the agent send for human approval?

Send a clear request that lets the person understand the proposed action and choose Approve or Reject. Use a POST request to the send link of an M91 channel. A send-link URL can't carry other, attachments or callbackUrl.

A POST payload is the full body of data you send in an HTTP POST request. A send link is the private URL for one M91 channel. Here, other is the free-text reply option, attachments are file links, and callbackUrl is the address for the answer.

These are the fields that matter for an approval:

  • title: the line the person reads first. Name the action in plain words, such as a refund or a GitHub Release publish. Check the request-field documentation for the title limit.

  • description: what happened and what the person needs to decide. Check the request-field documentation for the description limit.

  • severity: how hard M91 chases an answer. Pick the level that fits the action.

  • responseOptions: Approve and Reject, both set as SHARED. You can require a note on Reject, so your code gets a reason and not only a refusal.

  • attachments: HTTPS links to files shown inside the alert, such as a screenshot of the change. M91 does not store copies, so each link must stay available and open without a login.

  • callbackUrl: an HTTPS address for the answer. The next section explains it.

  • customId: groups repeats of the same condition into one alert record. Use one that names the proposed action.

Write the title and description for a person who was not watching the agent. They should be able to decide from the phone screen alone. The docs give no required layout for describing an action, so use your own words.

Both options are SHARED for a reason. The docs say the decision is set only by a SHARED response. So a PERSONAL answer such as 'Seen' is not read as approval.

By default, M91 allows the person to reply in their own words. The docs say only a SHARED response sets the decision.

While an alert with a given customId is open, sending it again alerts nobody. If your agent retries the same request, the repeat reaches the same alert record. Closing the alert is what re-arms that customId.

This post does not show a code sample for the request. The supplied docs describe the POST endpoint and approval response options; check the request-field docs for the complete payload.

#

How does AI agent human approval return a decision to the workflow?

Give M91 a callback URL if your service can receive HTTPS requests, or read the alert back through the API. Either way, use the returned decision to resume the workflow.

A callback URL is a web address on your server that M91 sends a POST to. It can receive an event for each response and another when the alert ends. That is the M91 callback.

Option A: a callback URL. Add callbackUrl to your POST request. The callback URL can receive HTTPS POST events for responses and when the alert ends. Use an HTTPS callback URL that your service can receive requests at.

The supplied docs mention callback fields and describe response and end-of-alert events, but this post makes no delivery guarantee. It also gives no exact event timing.

Treat each callback as a signal, not as proof. Anyone who finds your callback URL can send it a request. The callback signature can't currently be verified, because the callback secret is not shown in the app or the API.

So on any callback, read the alert back and act on what the read-back says. Do not act on the callback body alone.

Option B: read the alert back. Software can read alert status and responses back through the send-link API. The read-back returns the alert's status, its decision and its responses. Your code can poll, which means ask again on a timer, while it waits for a human.

The docs text used here gives no polling interval. Pick one that fits your workflow, and stop polling when you reach your own timeout.

The two calls your code makes to M91, the POST and the read-back, are your approval API. Use the same read-back whether you started from a callback or from polling. That way one code path decides what happens next.

The approval decision comes from a SHARED response. The docs say each person gets one response, and it is final. A SHARED response can't be replaced by somebody answering later.

#

When should the external executor perform the proposed action?

Only after the workflow confirms an explicit approval decision should the external executor perform the write. A rejection, timeout, alert end or missing response must not be treated as approval.

The executor belongs to your originating software. M91 returns the approval decision and does not carry out the approved action. Your software reads the decision, and your executor does the write.

Keep the credentials for the write in the executor, not in the agent. The Scion discussion describes this setup: an approved write done with the executor's own credentials. Your executor can then refuse to run without a confirmed approval.

Each outcome has its own rule:

Approve (a SHARED response). Run the executor. Do it only after the read-back shows the Approve decision.

Reject. Do not run the executor. If you required a note, record it as the reason.

No answer or timeout. Do not run the executor. Treat it as the safe outcome, which is usually a no, and close the alert yourself.

Alert ended without a decision. Do not run the executor. The end-of-alert callback is not an approval, and the decision comes only from a SHARED response.

'Seen' (a PERSONAL response) or a typed reply. Do not run the executor. Only a SHARED response sets the decision.

A phone call picked up. Do not run the executor. M91 does not know whether a recipient answered an escalated call, and a phone answer alone is not a response.

M91 has adapters for LangChain, LangGraph, Vercel AI, Mastra, OpenAI Agents, the Claude Agent SDK and Google ADK. The documented adapters return approved or rejected. A failure to reach anybody comes back as rejected.

Gate your executor on approved and nothing else. A check that only looks for rejected would let an unexpected value through.

#

How should you handle callbacks, retries, and setup?

Make the callback handler safe to repeat and verify the decision by reading the alert back. Plan timeout behavior in your own software. Complete the required M91 setup before connecting the workflow.

Make the handler safe to repeat. A safe-to-repeat handler, also called idempotent, gives the same result when it runs twice. Before the executor writes, record that this alert was handled. Skip the write if a record already exists.

Make the check and the record one step in your own store. Two requests at the same time could otherwise both pass the check.

This design does not cover a crash between reading the approval and doing the write. The docs text used here does not cover that case, so plan your own recovery for it.

Own the approval timeout. M91 has no server-side alert expiry or expiresIn. Your software must decide what a timeout means and close the alert itself.

Decide before you send what a non-answer means. Treat it as a no, and set the wait time in your own code. How long a person has to wake up is an operations decision.

To close an alert, send a close request with the customId. If you send both a customId and an alert id, customId wins. Check the close-request documentation for the identifier to use when there is no customId.

Finish setup first. A person must install the app and verify their phone number. A person can also create a channel and choose who is woken.

An API cannot complete all of these setup steps. The app is available for iOS and Android.

A send link can't create channels. It also can't be generated, guessed or derived, so get it from configuration or from a person. Keep it in configuration, not in the agent's prompt.

To check a link before going live, send a GET with no title. It raises no alert and wakes nobody. For a full walkthrough, see Step-by-Step: How to Test Your M91 Alert Link Without Waking Anyone.

#

AI agent approval checklist

Before you turn the workflow on, tick each item.

  • A person has installed the M91 app, verified their phone number, created a channel and chosen who is woken.
  • The send link is in configuration, and a GET with no title confirmed it is live.
  • The request is a POST with a clear title, and Approve and Reject set as SHARED responses.
  • A callback URL is set, or polling is in place, and the handler reads the alert back before acting.
  • The handler is safe to repeat, and the executor records each alert it has handled.
  • The executor runs only on an explicit Approve, and Reject, timeout, no answer and an ended alert all stop it.
  • Your software sets the approval timeout and closes the alert itself.

When every box is checked, your workflow holds the write until a person explicitly approves it.

#

Frequently Asked Questions

#

How do I add AI agent human approval to an agent workflow?

Pause the agent before the external write. Send the proposed action to M91 as a POST alert with Approve and Reject options. Use a callback or polling to trigger read-back, and let your executor act only when read-back confirms an explicit Approve.

#

What is human-in-the-loop approval for an AI agent?

It means a person takes part in the workflow at a key step. Here the person approves or rejects an agent action before it happens.

#

Does M91 perform the approved action?

No. M91 returns the person's decision. Your originating software and its executor perform the action.

#

Do I need a callback URL?

No. You can read the alert's status and responses back through the API and poll while you wait. A callback URL saves you from writing that loop.

#

Can I verify the callback signature?

Not currently. The callback secret is not shown in the app or the API. So read the alert back before you act on any callback.

#

What happens if nobody answers?

M91 has no server-side expiry, so your software decides what the approval timeout means. Treat no answer as a no, do not run the executor, and close the alert yourself.

#

Who sets up the channel and chooses who is woken?

A person can create the channel and choose who is woken. A person must also install the app and verify their phone number. An API cannot complete all of these setup steps.

#

Could an agent submit a proposed action for approval, then have an external executor carry it out using its own credentials?

M91 can carry the approval step. It returns the decision, and your own executor does the write. A Scion discussion on GitHub asks for an approval webhook and API, which shows demand, not support.

#

Can Copilot ask for GitHub Release approval through M91?

A GitHub community discussion asks whether Copilot can request approval for a specific action such as publishing a GitHub Release. That shows demand, not evidence that Copilot or M91 supports the integration. In your own software, you can put an M91 approval before the executor that publishes.

#

What to do next

Set up M91 for your approval workflow.

New to M91? Start with How the M91 Alert Flow Moves an Alert From Software to a Person.

#

Sources

  1. How the M91 Alert Flow Moves an Alert From Software to a Person

  2. Google Cloud Platform Scion discussion on GitHub

  3. GitHub community discussion

  4. Step-by-Step: How to Test Your M91 Alert Link Without Waking Anyone