SShortSingh.
Back to feed

Human Approval for AI Agents Using Step Functions Callback Pattern

0
·4 views

The article argues that AI agents performing costly or irreversible actions need a human checkpoint before proceeding. It proposes using AWS Step Functions' wait-for-callback pattern, which pauses a workflow until a person responds, and can wait up to a year at no waiting cost. Actions are sorted by reversibility and cost, with small low-risk actions automated and larger ones routed to human approval. In the example, a bookshop's support agent may auto-apply credits up to 20 euros, requires team approval up to 500 euros with escalation after four hours, and is blocked entirely above 500 euros. The author stresses that these rules belong in the workflow rather than the prompt, since language models can be forgotten or manipulated, whereas choice rules cannot. The task token that resumes a paused step is treated as a sensitive credential and should be kept away from emails and the agent.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer seeks guidance on starting open source contributions and joining GSoC

A developer on DEV Community asked how to begin contributing to open source projects, including through pull requests and other forms of participation. They also said they plan to pursue Google Summer of Code (GSoC) and requested beginner advice. The post invites community guidance on where and how to start. No specific projects, resources, or answers are included in the original text.

0
ProgrammingDEV Community ·

Polecat Brings Document Storage and Wolverine Messaging to SQL Server 2025

A .NET team documented a production spike migrating to Polecat, a document database library that runs on Microsoft SQL Server 2025. Native binary JSON support in SQL Server 2025 made it practical to run a high-performance document store on the platform, which many enterprises require. The spike found the Aspire host and Wolverine outbox worked with minimal friction, while LINQ predicates, FastEndpoints scope disposal, and batch queries needed refactoring. Polecat's LINQ parser is stricter than Marten's, requiring direct member-to-constant comparisons, and it supports only asynchronous enumeration and disposal. The authors provide workarounds, such as switching to async scopes and avoiding interface-constrained filters.

0
ProgrammingDEV Community ·

Opening hours component in React handles time zones correctly

A developer's first 'Open now' badge showed the wrong status because the date was computed in the wrong time zone, with the salon in Zurich and the site hosted on US servers. Relying on the visitor's or server's local clock causes mismatches for out-of-town users and between server and browser rendering. The recommended fix is to store one IANA time zone per business and compare all times in that zone, using Intl.DateTimeFormat's formatToParts without a date library. The article also proposes a weekly hours data structure that supports split shifts and closed days as arrays of time ranges. This approach keeps the status logic consistent across the page and in structured data.

0
ProgrammingDEV Community ·

Gaming Studio Keeps Shopify, Adds Content Layer to Fix Brand Storefront

A small gaming studio in Austin, Texas sold merchandise through Shopify, which handled its commerce needs well. Its website still failed to feel like one cohesive brand, a problem its team had blamed on the platform. The article argues that before any migration, the commerce backend and the frontend should be assessed separately to find the real constraint. In this case, the shortfall was in presentation and brand content rather than selling, so the recommended fix was a content layer rather than replacing Shopify. The author suggests trying cheaper options like theme customization first, reserving headless frontends for experiences a theme cannot deliver.