Shopigent
← All posts

Dry-run: preview every agent action before it happens

Every write tool in Shopigent accepts dry_run: true. When set, the tool validates the input, resolves all references (products, variants, customers), and returns the exact mutation it would execute — without executing it.

Why it matters

Agents are great at intent, imperfect at details. Dry-run catches the gap:

{
  "tool": "discounts_create",
  "dry_run": true,
  "input": { "title": "WEEKEND20", "value": "20%", "applies_to": "collection:hoodies" }
}

The response shows the resolved discount — which collection ID matched, start/end dates, usage limits — so the agent (or you) can verify before committing.

Dry-run + confirmation gate

The two features stack:

  1. Agent calls the tool with dry_run: true → sees the preview.
  2. Agent calls it for real → Shopigent pauses at the confirmation gate.
  3. You approve in the dashboard → the mutation runs and lands in the audit log.

Three checkpoints between "the agent had an idea" and "your store changed". That's how it should be.