Home » How to Build an AI Workflow Inbox for Tasks That Need Human Input in React Native
React • Technology

How to Build an AI Workflow Inbox for Tasks That Need Human Input in React Native

Build a human-in-the-loop approval inbox that lets reviewers inspect evidence, make a decision, and resume an AI workflow from iOS or Android.

An AI support agent recommends an $85 refund. It has checked the order history, but the customer has already received a partial refund and the policy requires a supervisor to review the remaining amount. The agent needs to pause, show the supervisor the evidence, and resume only after an authorized decision.

That’s the job of an AI workflow inbox. The React Native app gives reviewers a queue and a decision screen. The backend persists the paused workflow, checks who can act, and records which proposal the reviewer approved. The task stays available even if the reviewer misses the push notification or closes the app.

1. Create a Task Whenever the Workflow Needs a Decision

Start with three reasons to interrupt a workflow:

  • Approval required. The next action has consequences, such as issuing a refund or changing an account.
  • Information missing. The workflow cannot proceed until someone supplies a required field or confirms which record is correct.
  • Exception detected. A policy rule, conflicting evidence, or a failed verification requires a reviewer to decide what happens next.

Persist the workflow checkpoint and create a task linked to that checkpoint. Give repeat deliveries of the same interruption a stable ID so a worker retry can find the existing task instead of opening a second one. If the workflow engine and inbox use separate stores, use a durable event or reconciliation job to recover interruptions that were saved but never turned into tasks.

Each task needs enough context for someone who hasn’t read the agent’s conversation. For the refund example, the detail screen should show the proposed amount, the prior refund, the policy that triggered review, and the evidence behind the recommendation. Save the exact proposal and policy version alongside the task so a later policy change doesn’t rewrite what the reviewer saw.

2. Build the Inbox and Review Screen in React Native

Use a cursor-paginated API for the inbox and render the results with FlatList, keyed by task ID. Each row can show the task title, why it needs attention, who owns it, and when it expires. The detail screen should fetch the latest task state when opened, including when the user arrives through a notification or deep link. React Native provides Linking for incoming URLs and AppState for foreground changes. 

  • Use push as a prompt to open the task. Send the task ID and a generic message. Retrieve sensitive evidence only after authentication. Expo documents at-least-once delivery to the underlying push services, so duplicate notifications are possible. The inbox should also load pending tasks without relying on a notification. 
  • Make the proposed action explicit. A button labeled Approve $85 refund gives the reviewer more context than Approve. Use accessible labels and announce the result so screen reader users can tell whether the decision was saved. 
  • Refresh after returning to the app. Someone else may have resolved the task while the phone was locked. If the task has changed or expired, show the latest status and remove actions that no longer apply.
  • Separate saved decisions from completed actions. After approval, show Approval recorded · Refund pending until the backend confirms the refund went through. If the network drops before the app receives a response, show Checking decision status and reconcile with the server.

3. Make Decisions Safe to Retry

Two reviewers may open the same task. A reviewer may also tap twice or retry after the server saves a decision but the response is lost. The API needs to handle both situations.

Here’s an example request from the React Native app:

POST /v1/review-tasks/task_124/decisions
Idempotency-Key: 8a0a6bed-a9a1-4d9d-a38a-7e1be049c15b
Content-Type: application/json

{
  "expectedVersion": 7,
  "decision": "approve",
  "reason": "Remaining balance verified against the order record."
}

The server checks the reviewer’s identity, tenant, assignment or role, task expiry, and expected version. It then saves the decision, updates the task, and adds a workflow-resume event to an outbox in one database transaction. A retry with the same idempotency key and request payload returns the original outcome. If another reviewer resolved the task or the proposal changed, a fresh submission gets a conflict and the app reloads the task. 

The worker that resumes the workflow also needs to tolerate retries. Use a stable execution key for the downstream action when the provider supports it. For a refund provider that lacks idempotency, reconcile an uncertain result before retrying. And if the amount or destination changes after approval, create a new review task for the revised proposal.

How Five Companies Handle Human Input in AI Workflows

These examples show different parts of the pattern, from mobile review screens to workflow checkpoints.

  1. GeekyAnts discusses an example from DevOps and data pipelines in which an agent needs to recognize when it lacks enough context to act. For an inbox, that translates into a clear escalation reason and a specific question the reviewer can answer. 
  2. Microsoft lets reviewers act on pending requests from the Approvals screen in the Power Automate mobile app. Its documentation also supports custom responses, a useful pattern when a task needs an amount, option, or clarification.
  3. UiPath uses Action Center and Action Apps for agent escalations. The escalation can open a task-specific form, a useful reference for workflows that need structured reviewer input. 
  4. AWS supports user confirmation for Amazon Bedrock Agent action groups. Its Return Control option lets the application receive proposed action inputs and later return the result using the invocation ID. Together, these show where an application can place a confirmation step or its own review workflow. 
  5. LangChain provides LangGraph interrupts to pause execution, persist state with a checkpointer, and resume on the same thread. The interrupted node starts again from the beginning on resume, so any side effects before the interrupt must be safe to repeat or moved elsewhere. 

What to Test Before Launch

  • Two reviewers submit different decisions for the same task. Only one decision takes effect.
  • The server saves a decision but the phone loses the response. Retrying returns the recorded decision without repeating the downstream action.
  • A push notification opens a task after another reviewer resolves it. The app shows the final status.
  • The refund amount changes after approval. The workflow creates a fresh review task.
  • A reviewer tries to open a task from another organization. The API denies access and the notification exposes no sensitive details.

Once live, track median and 95th-percentile time to decision, task expiry rate, and how often reviewers override the agent. Break the results down by escalation reason. A slow approval queue may need better routing. A high override rate on one task type may point to a missing data source, an outdated policy, or a poorly scoped recommendation.