Refund walkthrough
See how OpenEight checks a refund before the tool runs. USD refunds through $100 can proceed. Larger USD refunds and refunds in other currencies wait for a reviewer. All receipts in this walkthrough are simulated.
First time here? Follow Build your first agent and use the refund prompt under Agentic installation.
Get the runnable example
The OpenEight cookbook includes LangChain and Deep Agents versions of the refund agent. Clone it and open the example directory.
git clone https://github.com/OpenEight-Labs/openeight.git
cd openeight/cookbook/patterns/governed-refundFollow the refund example README on GitHub to install dependencies and configure your Agent credentials.
Try the three refunds
Use the active example policy to compare what happens when the same tool receives different refund requests.
Run these commands in the cookbook’s patterns/governed-refund directory with its environment active and the example refund policy enabled for issue_refund.
$25 · Allowed
python langchain_agent.py run ORD-1041The policy allows the request. The tool issues one simulated $25 receipt.
€180 · Requires approval
python langchain_agent.py run ORD-1042Leave this process running. The tool issues no receipt while it waits. In Approvals, check the order, amount, and currency. Approve the request to let the waiting run issue one receipt, or reject it to finish without a refund.
¥50,000 · Requires approval
python langchain_agent.py run ORD-1043The currency is JPY, so the request waits for approval. To see a rejection, choose Reject in Approvals. The run finishes without a receipt.
Inspect a decision
Open the Run for your Agent and select the refund Decision. Check the requested amount, currency, and policy outcome.
For the €180 request, check why the policy required approval and who reviewed it. If you approved it, the terminal should show one receipt for ORD-1042. If you rejected it, the run should finish without a receipt.
Sign in to view Agent activity ↗
If the run or Decision is missing, troubleshoot your integration.