What You’ll Build
How It Works
- Cron loop runs every hour (or on a schedule you choose)
- Price monitor checks each user’s saved items against current catalog prices
- Restock predictor analyzes purchase history to estimate when consumables run out
- Auto-buy engine executes x402 USDC purchases when thresholds are met
- Notification tells the user what the agent did (and lets them undo within a grace period)
Prerequisites
Step 1: User Preferences & Saved Items
The companion profile stores what the user cares about — saved items, price targets, and auto-buy rules.Step 2: Price Monitor
Check every saved item against the current catalog price. Flag items that hit the target.Step 3: Restock Predictor
Estimate when a consumable product will run out based on purchase history and average usage.Step 4: Auto-Buy Engine
When thresholds are met and auto-buy is enabled, execute the purchase via x402 USDC.Step 5: Notification Service
Always tell the user what the agent did. Include an undo/cancel window for auto-buy actions.Example Notification Payload
Step 6: The Main Loop
Wire everything together in a scheduled job. This runs on a cron service, task scheduler, or any recurring trigger.Scheduled Trigger
Create a webhook endpoint that your scheduler calls on a recurring basis:Safety Guardrails
A proactive agent that spends real money needs strict controls:| Guardrail | Implementation |
|---|---|
| Spending limit | Monthly cap per user, checked before every purchase |
| Undo window | 2-hour cancellation period after auto-buy |
| Notification always | User is always informed, even when not auto-buying |
| Opt-in only | Auto-buy requires explicit autoBuy: true per item |
| Price floor | Never buy above the user’s target price |
| Rate limiting | Max 3 auto-buy actions per day per user |
Architecture: Why This Matters
This recipe demonstrates the core Podium thesis: agents that act on behalf of users, transparently and with accountability. The deal agent combines:- Intent profiles (companion) — knows what the user wants
- Commerce execution (checkout + x402) — can actually buy things
- Transparent settlement (on-chain USDC) — proves what happened
- Notification + undo — maintains user trust and control
Related
- Build a Personal Shopping Agent — interactive (not proactive) agent
- x402 Payments — machine-native USDC payment protocol
- Companion API — intent profiles and saved items
- SDK Examples — more workflow patterns

