A coding agent can request a discount. Who gets to approve it?
Description and use
Automated quote creation and approval workflow using Accordo, illustrating distinction between refusal and approval with audit trail.
Problem
Automating discount approval while ensuring policy enforcement and auditability in a CRM workflow.
Outcome
The recipe demonstrates automated quote creation, policy-based approval workflow, and audit logging, distinguishing between refused and approved actions.
Workflow
- Clone the agent-crm repository and checkout a specific commit
- Run the provided recipe script to create a local CRM project
- The script generates a synthetic quote and applies discount policy
- The agent attempts to approve the quote and receives a 403 with HUMAN_APPROVAL_REQUIRED
- A simulated user approves the quote, changing status to approved and recording an audit entry
- Verify the receipt JSON for audit fields and trace information
- Inspect the local SQLite database for persisted records
Evidence
The script contains assertions for each transition: ... An approval request from the simulated agent receives HTTP 403 with HUMAN_APPROVAL_REQUIRED.
A simulated user approves. The quote becomes approved, with one user decision audit and a completed trace.
- Record date: 2026-09-14T19:00:21.756Z