cd /news/ai-agents/model-a-sales-reminder-as-a-state-ma… · home › topics › ai-agents › article
[ARTICLE · art-148734] src=dev.to ↗ pub= topic=ai-agents verified=true sentiment=· neutral

Model a Sales Reminder as a State Machine, Not a Prompt

Tej Pandya, founder of GrowEasy.ai, published a design sketch arguing that sales reminder agents should be modeled as explicit state machines rather than relying on conversation history as the record of what an agent owes. The sketch stores appointment revision, confirmed time, consent state, contact route and reminder status, invalidates pending work tied to older revisions, and treats refusal or revoked consent as stop conditions. Pandya recommends re-checking eligibility before sending, using idempotency keys for retried side effects, and testing cancellation, duplicate webhooks and lost responses against resulting records rather than the agent's wording.

by read2 min views4 publishedOct 10, 2026

By Tej Pandya, founder of GrowEasy.ai

A reminder agent needs somewhere to store what it owes. If the only record is the conversation, developers cannot reliably tell whether an action was planned, attempted or completed.

This example is a design sketch for an appointment-led sales workflow. It is not a deployed customer result or a GrowEasy.ai feature claim.

Store an appointment revision, confirmed time, consent state, contact route and reminder status. A change to the appointment should invalidate pending work tied to an older revision.

The model can extract a proposed time from a message. Application logic validates it before updating the record. Unknown consent stays unknown; it is not filled from the model's confidence.

An illustrative transition sketch:

requested -> confirmed -> reminder_eligible -> attempted
attempted -> delivered | retryable_error | permanent_error
retryable_error -> reconciled | retry_pending | needs_human
needs_human -> assigned -> accepted -> completed

These states are not a universal standard. Choose them around the real work and the provider's actual receipts. Do not interpret "delivered" as "attended".

When a request times out, it may already have succeeded. Look up the provider result or reuse a supported idempotency key before repeating the side effect.

A key might identify the appointment revision and reminder type. It must not suppress a genuinely new reminder after the buyer changes the appointment.

Temporal's documentation recommends idempotent Activities because retry behavior can repeat execution. Durable state and safe side effects solve different problems; you need both.

Before a reminder sends, re-check current appointment state, consent, permitted time and destination. A job that was eligible when queued may no longer be eligible when it runs.

Treat refusal and revoked consent as stop conditions. Distinguish temporary transport errors from permanent failures. A retry budget is an application decision, not something the model should improvise indefinitely.

An exception record needs a question, current evidence, requested time and owner. Assignment is not acceptance. An overdue unaccepted task should remain visible to the team.

Do not tell the buyer that a callback is confirmed if the application only emitted a notification. Gate that sentence on the state that proves a responsible person and valid time exist.

Test a cancellation after queueing, duplicate webhook delivery, two workers claiming the same job, a provider success followed by a lost response, an unavailable owner and an explicit request for a person.

Check the resulting records and external actions, not only the agent's wording. Compare the design with a simpler deterministic baseline. Anthropic's workflow guidance is useful here: add model-driven flexibility where it is needed rather than turning every predictable step into an autonomous decision.

A clean state machine cannot fix bad rules. It can make those rules, and their failures, visible enough to test.

Sources:

https://www.anthropic.com/engineering/building-effective-agents

https://docs.temporal.io/activity-definition

https://temporal.io/blog/idempotency-and-durable-execution

── more in #ai-agents 4 stories · sorted by recency
── more on @tej pandya 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/model-a-sales-remind…] indexed:0 read:2min 2026-10-10 · —