demo
Restock
Slack agent that buys real office supplies through Stripe's Link wallet — spending limits and approvals live in code the model can't touch
$ apt list --installed
Managed Deep AgentsStripe LinkMPPSlackPython
metrics.sh
$ metrics --project=restock-agent
> Approvals: Slack review + Link wallet
> Payment Rail: Link over MPP (HTTP 402)
> Modes: rehearsal → link-test → live
A sample agent that pays for real purchases. Restock runs in Slack on LangChain's Managed Deep Agents, searches real products, builds a cart, and checks out through Link, Stripe's consumer wallet — without the model ever seeing a card number or being able to spend past the budget the user set. It's a reference pattern for any agent that spends money: let the agent search and build the cart, and keep the spending limit and approvals in code the model can't touch.
How It Works
- •Search and cart — custom tools for Zinc product search, the cart, and payment; Managed Deep Agents saves conversations and orders, so someone can come back days later and ask about the same order
- •Budget as a ceiling — the user's budget caps an upfront amount rather than setting the charge; Zinc pays the retailer out of it and refunds the rest, and Restock reads the real fees from the merchant's
402 Payment Requiredchallenge before asking for approval - •Two human approvals — a Slack review that pauses the run until the user clicks Approve or Reject (nothing the model writes into a tool call can approve it), then Link's own consent for the exact amount
- •Credentials stay out of the model — the Link session lives in a user-owned Managed Deep Agents Connection and enters the sandbox only while a command runs; the payment token is read from a private file, deleted after use, and only a public summary goes back to the model
- •Order verification — the payment tool checks the order against what the user reviewed and that the approval is still fresh, and an order counts as placed only when the merchant says so
Tech Stack
- •Agent: Managed Deep Agents in LangSmith, connected to Slack
- •Payments: Link over the Machine Payments Protocol (MPP), with
pympphandling the MPP formatting - •Commerce: Zinc's MPP order API for product search and retailer orders
- •Modes: rehearsal (fictional products, simulated approval) → link-test (real search and a real Link approval, no purchase) → live
Run end to end on a hosted deployment, a live order reached order_placed and the expected refund came through.