A coding agent can request a discount. Who gets to approve it?
Описание и применение
Автоматизированный процесс создания и утверждения скидок в CRM с использованием Accordo, демонстрирующий различие между отказом и утверждением и обеспечивающий аудит.
Задача
Automating discount approval while ensuring policy enforcement and auditability in a CRM workflow.
Результат
The recipe demonstrates automated quote creation, policy-based approval workflow, and audit logging, distinguishing between refused and approved actions.
Рабочий процесс
- 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
Доказательства
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.
- Дата записи: 2026-09-14T19:00:21.756Z