The approval flow handles execution requests whose policy decision isDocumentation Index
Fetch the complete documentation index at: https://docs.xpertai.cn/llms.txt
Use this file to discover all available pages before exploring further.
require_approval. It lets high-risk actions enter human decision-making instead of being simply rejected or automatically executed.
Approval Trigger
When an Agent callssimulateAction or executeAction, if Policy Guard returns require approval, the system creates or reuses a pending approval request.
The approval request contains:
- taskId.
- resourceId.
- actionTypeCode.
- target.
- params.
- expectedEffect.
- policyId.
- riskLevel.
- reasons.
- requestedBy.
- requestedAt.
Approval Status
Approval request statuses include:- pending: waiting for approval.
- approved: approved.
- rejected: rejected.
- cancelled: cancelled.
approvalRequestId provided during execution must match the fingerprint of the current request, preventing one approval from being used to execute another action.
Approval Decision
The approval page allows reviewers to inspect:- Request ID.
- Task ID.
- Resource ID.
- Action type.
- Policy ID.
- Target object.
- Parameters.
- Risk reasons.
Continuing Execution
After approval, the Agent or user can callexecuteAction again with approvalRequestId. The system will:
- Query the approval request.
- Confirm the status is approved.
- Validate that the fingerprint matches the current execution request.
- Continue executing the adapter action.
- Write the approval reference to the audit.
Recommendations
- Put all write actions, high-risk external calls, and production data change actions under approval.
- Require write actions to provide
expectedEffectso approvers know the expected impact. - Approval notes should record business reasons, not just “approved”.
- Execute soon after approval to avoid semantic staleness caused by source-system state changes.