Let agents retry safely.

Each action runs once and leaves a receipt.

One accepted request key permits at most one gateway dispatch to the configured upstream tool and at most one debit. Each finalized or reconciled path has a receipt.

Python curl
git clone https://github.com/agentmiddleware/amw-demo.git
cd amw-demo
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
export AMW_API_KEY='YOUR_DEMO_KEY'
export AMW_WALLET_ID='YOUR_WALLET_ID'
python examples/permit_echo_retry.py
curl -s -X POST https://api.thisisatest.tech/v1/demo/keys

Recorded local run (proof transcript)

call   receipt_id: rcpt-641b10a5d96547bb
retry  receipt_id: rcpt-641b10a5d96547bb (1 ledger debit)

The button above fills these Python commands with a demo key. With curl, replace both export placeholders using api_key and wallet_id from the response.

1

Permit

tool trust-plane-echo, budget, expiry.

2

Call

accepted request key, at most one gateway dispatch and debit; the gateway returns a signed receipt

3

Retry

the same request key returns its linked receipt

The gateway does not dispatch again.
4

Receipt

signed, can be checked offline.

✓

Apache 2.0 (gateway is Fair Source, FSL-1.1)

Permit

A permit says which tool an agent may use, how much it may spend, and when that ends.

Request key

A request key is a name you give one action so a retry is recognized as the same action.

Receipt

A receipt records the gateway decision and linked outcome. You can check its signature offline. It does not prove the downstream effect.

How it works

From demo key to checked receipt

Limits

Know where the boundary ends

AMW is not exactly once. For a configured upstream tool, one accepted request key permits at most one gateway dispatch and one debit.

delivery_uncertain means we charged this call but do not know if the tool finished. Check the tool directly before you try again. We never resend it on our own.

Receipts sign hashes of the request and response, not the content, and do not prove the tool was right. Read the limits.

Source

Read the code

github.com/agentmiddleware

Apache 2.0 (gateway is Fair Source, FSL-1.1)