-
-
Reopen any result by order, lot, case, or packet id.
-
Mobile parity: the full governed containment flow on a phone.
-
Low-confidence case (0.54): below the action floor the agent refuses to act and routes to Human Review.
-
Saved Stop-Ship Packet: before/after diff, evidence, named approver, and every excluded order — reopenable.
-
The QA human-approval checkpoint. Nothing changes until a manager clicks Approve Stop-Ship.
-
Live UiPath Action Center task in the Governance panel: the human checkpoint, with an inspectable task id.
Inspiration
When a product-safety complaint lands on a lot you might still be shipping, you have minutes, not days. The usual options are both bad: freeze the whole warehouse and break shipping, or chase orders by hand in a spreadsheet while bad units keep going out. We wanted one governed action that holds exactly the right orders, behind a human sign-off, with a record that proves what happened.
What it does
Red Batch is a governed containment workspace. The Batch Containment Agent traces the bad lot to its SKU and warehouse and finds every Ready-to-Ship order in scope (37 to hold, 11 excluded with a reason each). Nothing changes until a QA manager approves — that approval is the governance line, and in cloud mode it is a real UiPath Action Center task. On approval, 37 order rows move from Ready to Ship to Quarantined - QA Review (about $360,480 held across 3 zones), the agent verifies the change by reading it back (37 of 37), and a Final Stop-Ship Packet is saved that you can reopen by order, lot, case, or packet id. A second case (RB-7712, confidence 0.54) shows the recovery path: below the 0.70 action floor the agent refuses to act alone and routes to Human Review with a partial scope and an evidence task.
How we built it
- Next.js (App Router) with React Server Components and TypeScript.
- A real owned store using Node's built-in node:sqlite, with a Postgres-portable schema. Cases, orders, approvals, packets, timeline, and governed runs are real rows that survive a restart.
- A deterministic containment policy and a step-by-step agent loop (observe, map, fan out, classify, approve, mutate, verify, save packet). Each step writes a governed run and a timeline event.
- A UiPath governance adapter. With credentials it runs in cloud mode against a live UiPath Automation Cloud tenant, and the QA approval step is a real UiPath Action Center task: the agent creates it (CreateTask) at the human gate and completing the approval completes it (CompleteTask) before any order changes — a genuine platform action with an inspectable task id.
- A published UiPath coded agent: the same containment policy is also packaged as a Python coded agent with the UiPath CLI and published to the live tenant — visible under Orchestrator → Tenant → Packages (red-batch-containment, Type: Function, runtime python) and deployed as a Process (Shared → Processes, entry point main). Proof and screenshots are in the repo's docs/uipath-proof.md.
- Optional, additive LLM narration of the agent's reasoning, with a deterministic fallback.
How it maps to the UiPath Maestro Case track
A durable case object with status; an agent acting through governed actions; a human approval task on the state-changing step (a live UiPath Action Center task in cloud mode); explicit state mutation; verification; exception handling; and a saved, reopenable artifact. The Governance panel shows the recorded run for each step and links to the Action Center task.
Challenges we ran into
The hardest bug was structural. Node's node:sqlite returns rows with a null prototype, and React Server Components refuse to pass null-prototype objects to client components, so every case and packet page returned a 500 even though the JSON API worked. We traced it from the server logs, then normalized every row into a plain object at the data layer.
Accomplishments that we're proud of
- A real state change behind a human approval, not a mock. Order rows actually move and are verified.
- A live UiPath platform integration: the approval gate creates and completes a real Action Center task on a live Automation Cloud tenant, with an inspectable task id.
- An honest integration story: when a credential is missing, the UI says so instead of faking a call.
- A second, working recovery path for low-confidence cases.
What we learned
Smoke tests that only hit JSON endpoints can pass while the rendered product is broken. We added a screenshot pass over every real state to catch what the API checks could not.
What's next for Red Batch
The approval gate already runs as a live UiPath Action Center task, and the agent is published to the tenant as a coded agent and deployed as a Process in Orchestrator. Next is an unattended robot so the whole loop runs as a UiPath job, then managed Postgres for the store, the warehouse and ERP connectors that feed real order data, and role-scoped queues and notifications.
Built With
- maestro-case
- next.js
- node.js
- node:sqlite
- openai
- react
- tailwindcss
- typescript
- uipath
- uipath-action-center
Log in or sign up for Devpost to join the conversation.