<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ziyad Basheer</title>
    <description>The latest articles on DEV Community by Ziyad Basheer (@ziyadbasheer).</description>
    <link>https://dev.to/ziyadbasheer</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4263113%2F5efdbe83-a682-4900-8e5d-106fb1684572.png</url>
      <title>DEV Community: Ziyad Basheer</title>
      <link>https://dev.to/ziyadbasheer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ziyadbasheer"/>
    <language>en</language>
    <item>
      <title>Guardrails for a customer-facing AI agent: a ten-point production checklist</title>
      <dc:creator>Ziyad Basheer</dc:creator>
      <pubDate>Tue, 24 Nov 2026 17:18:21 +0000</pubDate>
      <link>https://dev.to/ziyadbasheer/guardrails-for-a-customer-facing-ai-agent-a-ten-point-production-checklist-62c</link>
      <guid>https://dev.to/ziyadbasheer/guardrails-for-a-customer-facing-ai-agent-a-ten-point-production-checklist-62c</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I'm the founder of Aide, an AI customer service platform. Each point below says how we built it, so you can check the claim. The checklist itself is vendor-neutral.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The short answer
&lt;/h2&gt;

&lt;p&gt;An AI agent makes up a refund promise when the only thing between the model and the customer is a prompt. A prompt is a request. A guardrail is code that runs after the model has written its answer and before the customer sees it, plus limits the model cannot talk its way around. Ten of them follow.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Set scope by topic
&lt;/h2&gt;

&lt;p&gt;Decide what the agent may do one topic at a time. We use three levels: &lt;em&gt;AI Agent&lt;/em&gt; (acts on its own within the team's procedures), &lt;em&gt;Drafts&lt;/em&gt; (proposes, a person sends) and &lt;em&gt;None&lt;/em&gt;. A new topic starts at Drafts.&lt;/p&gt;

&lt;p&gt;Ask: can I let it answer shipping questions on its own while refunds stay with a person?&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Write the rule where the team can read it
&lt;/h2&gt;

&lt;p&gt;If the policy lives in a prompt only an engineer can open, nobody on the support team can check it. Our procedures are plain language: when to use this, only if, the steps, how it finishes.&lt;/p&gt;

&lt;p&gt;Ask: can the person who owns the refund policy read exactly what the agent was told?&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Check every reply after the model writes it
&lt;/h2&gt;

&lt;p&gt;This is the one that stops invented promises. Before a reply is sent, it is checked against the level of its topic. A reply that promises something that level does not allow is rejected, then revised or handed to a person.&lt;/p&gt;

&lt;p&gt;Ask: what happens, step by step, when the model writes "I've refunded you" on a topic that only allows drafts?&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Verify the person before acting
&lt;/h2&gt;

&lt;p&gt;An agent that will cancel any order number typed into a chat is a fraud tool. We act on an order only for a shopper who is logged in, or who gives the order number and the matching email.&lt;/p&gt;

&lt;p&gt;Ask: what does a customer have to prove before the agent changes anything?&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Put money behind an approval
&lt;/h2&gt;

&lt;p&gt;A refund the agent offers waits for a teammate by default. Teammates have approval limits by role, and a refund above the limit waits for an admin.&lt;/p&gt;

&lt;p&gt;Ask: what is the largest amount the agent can move with no person involved, and who set that number?&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Test on real history before going live
&lt;/h2&gt;

&lt;p&gt;A test you write yourself only covers the cases you thought of. We check each procedure's trigger against the last 50 conversations, replay a past conversation with the draft procedure, and show the agent's drafts on recent tickets beside what the team sent.&lt;/p&gt;

&lt;p&gt;Ask: can I see what it would have said to last week's customers before it says anything to this week's?&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Roll out in stages
&lt;/h2&gt;

&lt;p&gt;Inside a helpdesk we go from watch only, to test senders, to a share of conversations, to everyone.&lt;/p&gt;

&lt;p&gt;Ask: can I put it live for 10% of conversations?&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Always say it is an AI
&lt;/h2&gt;

&lt;p&gt;When a customer asks, the agent says it is an AI. In English it uses a fixed line no setting can change. A reply that claims to be human is rejected. "Talk to a person" reaches the team at once.&lt;/p&gt;

&lt;p&gt;Ask: is there any configuration in which it will say it is a person?&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Log every change, and make learning reversible
&lt;/h2&gt;

&lt;p&gt;Our audit log records every sign-in and change and is kept two years. The agent learns from the team's replies every night, tests each change before keeping it, and lists it with an Undo.&lt;/p&gt;

&lt;p&gt;Ask: if the agent's behaviour changed on Tuesday, can I see what changed and reverse it?&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Grade the agent on the same scorecard as people
&lt;/h2&gt;

&lt;p&gt;The agent's replies and the team's replies are graded on one scorecard, and the agent is shown beside the team's median and its top quarter. That tells you, topic by topic, when its drafts are good enough to send on their own.&lt;/p&gt;

&lt;p&gt;Ask: how do I know it is as good as my best teammate, on my own conversations?&lt;/p&gt;

&lt;h2&gt;
  
  
  What the ten have in common
&lt;/h2&gt;

&lt;p&gt;Each one moves a decision out of the model and into something a person on the support team can read, test and reverse. That is also what makes the team better at its own work over time: the policy gets written down, the gaps show up in the drafts, and what the agent learns comes from what the team actually sent. An agent you cannot inspect teaches the team nothing.&lt;/p&gt;

&lt;p&gt;How we apply each of these is on &lt;a href="https://aide.app/what-is-aide" rel="noopener noreferrer"&gt;aide.app/what-is-aide&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>customerservice</category>
      <category>saas</category>
    </item>
    <item>
      <title>Can Claude refund a Shopify order? Yes, through an MCP server. Here is the permission model</title>
      <dc:creator>Ziyad Basheer</dc:creator>
      <pubDate>Tue, 24 Nov 2026 16:47:32 +0000</pubDate>
      <link>https://dev.to/ziyadbasheer/can-claude-refund-a-shopify-order-yes-through-an-mcp-server-here-is-the-permission-model-13fg</link>
      <guid>https://dev.to/ziyadbasheer/can-claude-refund-a-shopify-order-yes-through-an-mcp-server-here-is-the-permission-model-13fg</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I'm the founder of Aide. This post uses Aide's MCP server as the example. The permission model in the second half applies to any server you build yourself.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The short answer
&lt;/h2&gt;

&lt;p&gt;Yes. Claude can look up a Shopify order, refund it or cancel it when it is connected to an MCP server that exposes those actions. The part that matters is not the tool call. It is who Claude is acting as, and what stops a refund that a person on your team would not be allowed to make.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting it
&lt;/h2&gt;

&lt;p&gt;You need a Shopify store, an Aide workspace and Claude on the web, desktop or mobile.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open Aide in Claude's directory and add it.&lt;/li&gt;
&lt;li&gt;Sign in with your Aide account. There is no API key to paste.&lt;/li&gt;
&lt;li&gt;Choose &lt;em&gt;read only&lt;/em&gt; or &lt;em&gt;read and act&lt;/em&gt; on the approval screen.&lt;/li&gt;
&lt;li&gt;In a chat, select +, then Connectors, and turn Aide on.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Then ask in plain words:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Find the order for &lt;a href="mailto:dana@example.com"&gt;dana@example.com&lt;/a&gt; and tell me if it can be returned."&lt;/li&gt;
&lt;li&gt;"Show me the open conversations about late deliveries, with the draft for each."&lt;/li&gt;
&lt;li&gt;"Refund order 1042 and add a note to the conversation saying why."&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For the last one, Claude shows you the refund and asks you to confirm before it runs.&lt;/p&gt;

&lt;p&gt;ChatGPT works the same way from its plugin directory. Cursor, Perplexity and other MCP clients connect to the server address, &lt;code&gt;https://app-api.aide.app/mcp&lt;/code&gt;, and sign in.&lt;/p&gt;

&lt;h2&gt;
  
  
  The permission model
&lt;/h2&gt;

&lt;p&gt;These six rules are what I would copy into any MCP server that touches customers or money.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The assistant acts as a person, not as the company
&lt;/h3&gt;

&lt;p&gt;Claude signs in as a teammate. Notes, replies and order requests show up under that teammate's name, with that teammate's role. An API key is the other option, and it acts as the workspace: it can read knowledge and orders, and it never sees conversations.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Limits live on the server, not in the prompt
&lt;/h3&gt;

&lt;p&gt;A refund above the teammate's approval limit does not run. It waits for an admin, and Claude is told it is waiting. Nothing the model writes can raise the limit.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Tools that reach the outside world say so
&lt;/h3&gt;

&lt;p&gt;Replying to a customer, refunding and cancelling are marked, so the client asks the person before running them. One caveat: Claude's Research mode can use tools without asking, so connect &lt;em&gt;read only&lt;/em&gt; if you use it.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Scope is chosen at sign-in
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Read only&lt;/em&gt; covers conversations, knowledge, orders and analytics. &lt;em&gt;Read and act&lt;/em&gt; adds notes, replies, and refund and cancellation requests. The person can disconnect the app at any time, and it is cut off at once.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Every tool is one call to the same API the dashboard uses
&lt;/h3&gt;

&lt;p&gt;Same permissions, same approval rules, same rate limits. There is no second, looser path for AI apps. The server allows 300 MCP messages a minute per sign-in.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. What the assistant did is visible afterwards
&lt;/h3&gt;

&lt;p&gt;The workspace lists which AI apps are connected, when each was last used, and what they changed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tools
&lt;/h2&gt;

&lt;p&gt;Four of them cover the refund question: &lt;code&gt;lookup_orders&lt;/code&gt;, &lt;code&gt;check_return_eligibility&lt;/code&gt;, &lt;code&gt;refund_order&lt;/code&gt; and &lt;code&gt;cancel_order&lt;/code&gt;. The full list, grouped by who can use each one, is on &lt;a href="https://aide.app/mcp" rel="noopener noreferrer"&gt;aide.app/mcp&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does not do
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Order lookups and actions cover Shopify orders only.&lt;/li&gt;
&lt;li&gt;A reply goes to the customer and cannot be unsent. Ask for a note if you want something kept internal.&lt;/li&gt;
&lt;li&gt;A teammate in the Agent role does not see analytics and cannot change how the AI agent is set up.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Answering customers is a different job
&lt;/h2&gt;

&lt;p&gt;Everything above is Claude working as &lt;em&gt;your&lt;/em&gt; assistant: you ask, it acts for you. The agent that answers customers on its own, at three in the morning, is a separate thing. In Aide that is the AI agent, and your team sets how far it goes one topic at a time: AI Agent, Drafts or None. When it acts on an order, the shopper has to prove the order is theirs first, and a refund waits for a teammate by default.&lt;/p&gt;

&lt;p&gt;You can set that agent up from Claude as well. Send "Set up Aide for my business" and Claude imports your website, tests the agent with you, connects a channel and asks before it goes live.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>shopify</category>
      <category>claude</category>
    </item>
    <item>
      <title>Per reply, per resolution, and per conversation: the math behind AI support pricing</title>
      <dc:creator>Ziyad Basheer</dc:creator>
      <pubDate>Tue, 24 Nov 2026 16:45:53 +0000</pubDate>
      <link>https://dev.to/ziyadbasheer/per-reply-per-resolution-per-conversation-the-math-behind-ai-support-pricing-1e69</link>
      <guid>https://dev.to/ziyadbasheer/per-reply-per-resolution-per-conversation-the-math-behind-ai-support-pricing-1e69</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: I'm the founder of Aide, an AI customer service platform that bills per AI reply. The formula below works for any vendor, and I show where our own model costs more.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The short answer
&lt;/h2&gt;

&lt;p&gt;AI customer support is sold in four units: per seat, per conversation, per resolution and per reply. No unit is the low-cost one by nature. Your bill depends on three numbers you already have: conversations a month, AI replies per conversation, and the share of conversations the AI resolves. One formula turns any price into &lt;em&gt;cost per resolved conversation&lt;/em&gt;, and that is the number to compare.&lt;/p&gt;

&lt;h2&gt;
  
  
  The four units
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Unit&lt;/th&gt;
&lt;th&gt;You are charged when&lt;/th&gt;
&lt;th&gt;Do you pay when the AI fails?&lt;/th&gt;
&lt;th&gt;The bill grows with&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Per seat&lt;/td&gt;
&lt;td&gt;A teammate has a login&lt;/td&gt;
&lt;td&gt;Yes, it is flat&lt;/td&gt;
&lt;td&gt;Headcount&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Per conversation&lt;/td&gt;
&lt;td&gt;The AI takes part in a conversation&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Volume&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Per resolution&lt;/td&gt;
&lt;td&gt;The vendor counts a conversation as resolved by AI&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Volume, and how good the AI gets&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Per reply&lt;/td&gt;
&lt;td&gt;The AI writes a reply or a draft&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Volume, and how long conversations run&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Many products combine two: a seat fee for the helpdesk plus a usage fee for the AI. Add both before comparing.&lt;/p&gt;

&lt;h2&gt;
  
  
  One formula
&lt;/h2&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cost per resolved conversation = monthly AI bill / (conversations x resolution rate)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;For a per-reply price, that becomes:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(AI replies per conversation x price per reply) / resolution rate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;For a per-conversation price it is the price divided by the resolution rate. For a per-resolution price it is the price itself, plus any seat or platform fee spread over the resolved conversations.&lt;/p&gt;

&lt;h2&gt;
  
  
  A worked example
&lt;/h2&gt;

&lt;p&gt;Take 1,000 conversations a month, 2 AI replies in each, and an AI that resolves 60% of them. That is 2,000 AI replies and 600 resolved conversations.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Per resolution: public prices on the vendor pages I read in November 2026 ran from $0.75 to $1.50, usually on top of seats. 600 resolutions cost $450 to $900 a month.&lt;/li&gt;
&lt;li&gt;Per reply: 2,000 replies. On our own card that is the $149 plan, which includes 4,000. $149 over 600 resolved conversations is $0.25 each.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now grow to 5,000 conversations at the same rates. Per resolution: 3,000 resolutions, $2,250 to $4,500 a month. Per reply: 10,000 replies, which on our card is the $499 plan.&lt;/p&gt;

&lt;h2&gt;
  
  
  Does per-resolution get expensive as you grow?
&lt;/h2&gt;

&lt;p&gt;It grows in a straight line with volume, and it also grows as the AI improves. Move from 60% to 80% resolved at the same volume and a per-resolution bill rises by a third. That is the model doing what it says: you pay for outcomes, so more outcomes cost more. A per-reply bill does not move when the resolution rate does.&lt;/p&gt;

&lt;p&gt;The trade is real in the other direction too. Per resolution, a conversation the AI fails on is free. Per reply, it is not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where per reply costs more
&lt;/h2&gt;

&lt;p&gt;Run the formula at a price of $0.10 per reply:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;AI replies per conversation&lt;/th&gt;
&lt;th&gt;40% resolved&lt;/th&gt;
&lt;th&gt;60% resolved&lt;/th&gt;
&lt;th&gt;80% resolved&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;$0.50&lt;/td&gt;
&lt;td&gt;$0.33&lt;/td&gt;
&lt;td&gt;$0.25&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;$0.75&lt;/td&gt;
&lt;td&gt;$0.50&lt;/td&gt;
&lt;td&gt;$0.38&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;$1.25&lt;/td&gt;
&lt;td&gt;$0.83&lt;/td&gt;
&lt;td&gt;$0.63&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Long conversations with a low resolution rate are where per reply loses. At 5 replies and 40% resolved, each resolved conversation costs $1.25, which is inside the per-resolution range above. If your conversations look like that, a per-resolution price protects you. If they are short and mostly resolved, a per-reply price does.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a fair price per AI reply?
&lt;/h2&gt;

&lt;p&gt;Convert it. At 2 replies per conversation and 60% resolved, multiply the per-reply price by 3.33 to get its per-resolution equivalent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;$0.15 per reply is about $0.50 per resolution&lt;/li&gt;
&lt;li&gt;$0.10 per reply is about $0.33&lt;/li&gt;
&lt;li&gt;$0.04 per reply, roughly what an included reply costs on a monthly plan, is about $0.12&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then use your own two numbers in place of mine. A fair per-reply price is one that lands below what you would pay per resolution at your own conversation length and resolution rate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions to ask before you sign
&lt;/h2&gt;

&lt;p&gt;For a per-resolution price:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Who decides a conversation was resolved: the customer, or the vendor's own classifier?&lt;/li&gt;
&lt;li&gt;Does a customer who goes silent count as resolved?&lt;/li&gt;
&lt;li&gt;If the customer writes back within a few days, is the charge reversed?&lt;/li&gt;
&lt;li&gt;Does a handoff to a person count?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For a per-reply price:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Do drafts for my team count, or only replies sent to customers?&lt;/li&gt;
&lt;li&gt;Do replies in a conversation that ends in a handoff count?&lt;/li&gt;
&lt;li&gt;Is there a monthly cap, and what happens when I reach it?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Our answers, so you can hold us to them: an AI reply is each customer message Aide writes a reply or a draft for, sent or not, handoffs included. What Aide drafts for your team counts too. Replies your team writes are never billed. Plans are $39 a month (1,000 AI replies), $149 (4,000) and $499 (15,000), and each starts with a 7-day free trial. Extra replies are $0.15, $0.10 or $0.07 each, capped at $110, $350 and $1,000 a month. At the cap the AI pauses and your team keeps answering.&lt;/p&gt;

&lt;p&gt;The full card is at &lt;a href="https://aide.app/pricing" rel="noopener noreferrer"&gt;aide.app/pricing&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>saas</category>
      <category>pricing</category>
      <category>customerservice</category>
    </item>
  </channel>
</rss>
