Human-in-the-Loop (HITL) Staging and Approval Queues
Operational runbook for reviewing, approving, modifying, and rejecting autonomous agent action proposals in the staging queue.
1. Overview & Business Value#
To ensure that autonomous agents never execute irreversible business transactions without oversight, SmartERP routes high-impact recommendations through the Human-in-the-Loop (HITL) Staging Queue (ashewa.ai.staging).
1. Overview & Business Value#
When an agent identifies an optimal operational action—such as issuing a purchase order, reallocating employee shifts, or writing off bad debt—it creates a structured staging proposal record rather than committing the transaction directly.
{screenshot:ai-hitl-staging-dashboard}
2. Prerequisites & Security Access Groups#
- Required Modules:
muk_ai, smarterp_ai_suite - Security Groups:
Financial Approver(Technical ID:account.group_account_manager)HR Approver(Technical ID:hr.group_hr_manager)Procurement Approver(Technical ID:purchase.group_purchase_manager)
3. Step-by-Step Execution Workflow#
Step 1: Accessing Pending Proposals#
- Navigate to Ashewa AI → Autonomous Operations → Staging Queue.
- Filter by status:
Pending Approval. - Click on any proposal card (e.g.,
PROP-2026-0891: Auto-replenish 500 bags Portland Cement).
{screenshot:ai-hitl-proposal-detail}
Step 2: Evaluating Agent Justification & Evidence#
Review the three analytical sections generated by the agent:
- Action Summary: Proposed model, target record ID, and exact field modifications.
- Evidence Dossier: Linked source documents (sales forecast, warehouse stock velocity, supplier price history).
- Risk Assessment: Confidence score (e.g.,
96.4%), estimated financial impact, and potential downside.
Step 3: Adjudicating the Proposal#
Choose one of three adjudication actions:
- Approve & Commit: Click Approve. The system invokes the ORM action under the approver's user ID and posts the transaction.
- Modify & Approve: Adjust parameters (e.g., reduce quantity from 500 to 350 bags) and click Approve with Changes.
- Reject: Click Reject, enter mandatory rejection feedback (e.g., "Vendor currently under dispute"), and submit. The agent incorporates this feedback into future reasoning cycles.
{screenshot:ai-hitl-adjudication-modal}
4. Advanced Configuration Points#
- Auto-Expiration Crons: Staging proposals older than 72 hours auto-expire via
ashewa_ai_suite.ir_cron_purge_expired_staging. - Audit Trails: All approvals and rejections are cryptographically logged in
ashewa.ai.audit.log.
5. Troubleshooting Matrix#
| Issue Symptom | Root Cause | Resolution |
|---|---|---|
Staging record locked by concurrent approver | Another manager has opened the record for review. | Refresh view or check lock status in Chatter. |
Commit failed: Stock location inactive | Underlying master data changed between proposal and approval. | Correct master record and re-evaluate proposal. |
2. Prerequisites & Security Access Groups#
- Required Modules:
muk_ai, muk_mcp, smarterp_ai_suite - Security Group:
Ashewa AI / User(Technical ID:muk_ai.group_ai_user) - Master Data Dependencies: Configured AI provider credentials, active system prompts, and departmental cost centers.
3. Step-by-Step UI Execution & Verification#
Step 1: Navigating to the Operational Interface#
- Log into your SmartERP instance at
https://smarterp.et/odoo. - Open the main App Switcher and select Ashewa AI.
- Select the operational workspace corresponding to this agent suite.
{screenshot:42-human-in-the-loop-hitl-approval-queues-step1-navigation}
Step 2: Executing Agent Actions#
- Review agent prompts and execution parameters.
- Trigger the scheduled or on-demand workflow action.
- Validate output in the generated operational log.
{screenshot:42-human-in-the-loop-hitl-approval-queues-step2-execution}
4. Advanced Configuration Points#
- Scheduled Crons:
muk_ai.ir_cron_agent_health_checkruns every 30 minutes. - Multi-Company Isolation: Multi-company record rules ensure agent context is isolated to Company 1 (
Ashewa Technology Solutions S.C.).
5. Comprehensive Troubleshooting Matrix#
| Symptom / Error | Probable Root Cause | Resolution Action |
|---|---|---|
Agent unresponsive or timeout | Network latency or API endpoint outage. | Verify provider connection in Settings → AI Providers. |
Access Denied during agent execution | User lacks assigned operational permissions. | Assign user to the designated operational group. |