AWS Builder Center
SubSentry: An Agent That Only Interrupts You When It Matters

SubSentry: An Agent That Only Interrupts You When It Matters

How I built a Strands Agent on Amazon Bedrock AgentCore Runtime that auto-renews clean subscriptions and asks a human only when it matters.

Cloud Engineer
Nobody reads their subscription statement line by line every month. That's the whole premise of SubSentry, the agent I built for AWS's Agents for Humans Hackathon (Everyday Agents track): scan a billing cycle, quietly renew anything that looks fine, and only interrupt a human when something actually needs a decision.

The problem I was actually annoyed by

The hackathon brief's framing stuck with me: the best everyday agents run in the background and only surface when there's a real decision to make. Subscriptions fit that idea almost too well. A gym membership doubles in price once the intro period ends. A free trial converts to a paid plan under some company name you don't recognize. A billing system glitches and charges your card twice in the same cycle. None of it is dramatic enough to notice in the moment, and almost nobody actually reads their card statement line by line every month, so it all just adds up quietly until you happen to look.

What it does

SubSentry scans a billing cycle and checks every subscription against four rules: did the price jump more than 15%, was it charged more than once this cycle, is the merchant new to the ledger, or does it overlap with another subscription in a category where duplicates are pure waste (two gym memberships, two cloud storage plans). Anything clean renews automatically, no questions asked. Anything that trips a rule shows up as a card in the web UI with the reason spelled out, and it waits for a human to approve or reject it. Reject, and the agent holds with no action instead of guessing what you meant.
The core is a Strands Agent with four tools, running on Amazon Bedrock AgentCore Runtime and reasoning with Claude Sonnet 4.6.


The part I actually spent time on

The reasoning wasn't the hard part. The handoff was.
The agent's  request_review  tool call blocks and polls a DynamoDB row while a Next.js UI on Vercel polls the exact same row from the other side. Neither process talks to the other directly. The agent writes  PENDING , the browser shows a card, a human clicks Approve or Reject (or runs the CLI instead), the decision gets written to that same row, and the agent's poll picks it up and resumes. That's what lets one long-running AgentCore invocation coordinate with an async browser click without a websocket or a shared process anywhere in the picture. It also means the CLI can approve or reject just as well as the web UI, because it's just another writer to the same table.

Two things that broke

The first time I ran the full flow locally, with six clean subscriptions and four flagged ones, the output was wrong in a way that took a minute to even notice. Some approval records were missing, and one local JSON file had what looked like two writes tangled together mid-file. Strands was dispatching several tool calls from the same turn concurrently, and my local storage was a plain read-JSON-modify-write with no locking, so two parallel writes clobbered each other. The fix was a five-line threading.Lock around the critical section, but I want to be honest that I only found it because I actually opened the corrupted file and looked at the bytes instead of assuming the bug was somewhere in my prompt.
The second one showed up when I deployed the frontend. I'd set up OIDC federation between Vercel and an IAM role, which looked correct on paper, but the deployed app couldn't load AWS credentials at runtime. Rather than debug OIDC further under time pressure, I fell back to a scoped IAM user with access keys limited to exactly two DynamoDB tables and InvokeAgentRuntime on this one agent. Not the elegant answer, but a bounded one, and it works.


Trying it yourself

The whole loop runs on real infrastructure, not a mock. A click on the live URL triggers an actual InvokeAgentRuntime call, the agent reasons with Claude Sonnet 4.6, writes real DynamoDB rows, and a human approving or rejecting from a browser (or a terminal) resumes a genuinely blocked backend call.
The billing ledger is a fixed mock file right now so the demo stays repeatable, but the obvious next step is a real bank or card-issuer connection feeding the same scan_subscriptions tool, plus a notification channel so the agent can actually ping you instead of you needing to remember to open a tab. That's closer to the "runs quietly in the background" idea this whole hackathon track was built around.
Built for AWS's Agents for Humans Hackathon. #AgentsforHumans
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article