- Normalize the user intent.
- Quote or construct the order.
- Build the executable payload.
- Ask the user to authorize the exact payload.
- Submit and track until the flow completes or fails.
Universal agent loop
| Step | Agent action | Output |
|---|---|---|
| 1. Normalize | Resolve chain, tokens, amount, direction, recipient, execution preference, and constraints. | Complete intent object |
| 2. Quote or construct | Quote swaps, or construct a limit order, TWAP, or OTC intent. | Top-level delta, top-level market, or order draft |
| 3. Build | Build typed data or transaction calldata. | EIP-712 payload or transaction request |
| 4. Authorize | Ask the user to review and sign or send. | Signature or transaction hash |
| 5. Track | Poll order status or transaction receipt. | Filled, failed, expired, reverted, or pending |
Delta Swap
Use Delta when the user wants gasless execution, MEV protection, solver competition, or a Delta-only flow.- Use
chainId, notnetwork, on quote requests. - Include a
partnervalue on quote requests. Use the app or project partner key; examples usemy-app-nameonly as a placeholder. - Pass the
delta.routefrom the quote response into/v2/delta/orders/buildunchanged, and submittoSign.valueunchanged asorder. - Do not grant approval to Augustus for a Delta order; approve the Delta contract (the
spenderfrom the quote response). - Track by Delta order ID, not by transaction hash.
Market Swap
Use Market when the user wants immediate on-chain settlement or when the selected quote response has a top-levelmarket object.
- Market is an on-chain transaction flow.
- The user signs a transaction and pays gas.
- Track with the transaction hash.
- Requote if the transaction build fails, the quote expires, or balances materially change.
- Do not submit a Market response as a Delta order.
Auto-route with mode=ALL
Use mode=ALL when the user asks for a normal swap or best available execution without choosing Delta or Market.
mode=ALLreturns one selected execution path, not both.- Branch on the top-level response field, not on the requested mode.
- Ask before changing execution mode if the user explicitly requested Delta or Market.
Delta Limit Order
Use a Delta Limit Order when the user wants target-price execution, delayed settlement, or “only trade if price reaches X”. New integrations should describe the HTTP API flow directly: price the route, build a Delta order withtype=LIMIT, sign the returned EIP-712 payload, submit the signed order, then track it through Delta order status.
- Limit orders are Delta orders, not AugustusRFQ orders.
- Preserve the user’s target price, side, amount, token pair, chain, recipient, expiry/deadline, and partially-fillable preference.
- Treat
LIMITas the order type constraint; do not turn it into a Market Swap just because a spot quote is available. - Pass
routeinto/v2/delta/orders/buildunchanged, and submittoSign.valueunchanged asorder. - If the target price, expiry, amount, or recipient changes, rebuild and ask the user to sign again.
Delta TWAP
Use a Delta TWAP when the user wants one signed order to split execution across time. Delta exposes TWAP as advanced order families in/v2/delta/orders/build: orderType=TWAPOrder for sell-side schedules and orderType=TWAPBuyOrder for buy-side schedules.
- Do not model TWAP as a loop of unrelated swaps; it is one scheduled Delta order.
- Sell TWAP: preserve the total source amount to sell and split source amount across slices.
- Buy TWAP: preserve the total destination amount to receive and split destination target across slices while capping source spend.
- Preserve slice count, cadence/interval, deadline/expiry, token pair, chain, recipient, slippage or price constraints, and partially-fillable behavior.
- If any schedule field changes, rebuild the TWAP order and ask the user to sign again.
Failure handling
| Failure | Agent action |
|---|---|
| Missing required field | Ask the user for the missing field. |
| No route | Ask for a different amount, token, chain, or execution mode. |
| Quote expired | Requote and rebuild. |
| HMAC or quote validation error | Requote and keep the new response object paired with its new validation data. |
| User rejects signature or transaction | Stop. Do not retry automatically. |
| Transaction reverts | Surface the revert and suggest requoting. |
| Delta order remains pending | Poll with backoff and show the latest order status. |
| Limit order or TWAP expires | Surface the expiry. Do not recreate automatically. |
Guardrails
- Never invent token addresses, chain IDs, quotes, transaction hashes, or order IDs.
- Do not mutate top-level
deltaormarketresponse objects. - Do not treat limit orders as AugustusRFQ.
- Do not treat TWAP as unrelated swaps.
- Do not retry rejected signatures automatically.
- Ask before changing chain, recipient, order type, execution mode, amount direction, target price, schedule, or expiry.
Decision tables
Route user intent and API responses to the next action.
Delta quote
Quote Delta, Market, or auto-routed paths.
Market transaction
Build calldata from a Market response.
Troubleshooting
Per-endpoint failure modes: symptom, root cause, fix.