Pular para o conteúdo
AIAgentsCustomer Service

AI agents for customer service: beyond the traditional chatbot

9 min

Traditional chatbots are glorified FAQ pages with a conversation interface. They recognize keywords, match to scripted responses and transfer to a human when anything gets complicated. AI agents are fundamentally different: they understand context, reason about problems and take autonomous actions to resolve issues. The distinction matters because chatbots deflect support tickets while agents actually resolve them. A chatbot says your return request has been noted, our team will get back to you in 24-48 hours. An agent checks the return policy, validates the request, creates the return in your platform, generates a shipping label and sends it to the customer. Same interaction, dramatically different outcome for both the customer and your operations team.

What an AI agent can actually do: real capabilities

Order management: check status across any platform API (VTEX OMS, Shopify Orders), provide tracking with carrier-specific estimated delivery dates, detect delays proactively and notify customers before they ask. Modify orders (cancel items, change shipping address) within your defined policy windows by calling the appropriate API endpoints. Returns and refunds: validate return eligibility against your policy (return window, product condition, original payment method). Create return authorizations via VTEX Return Request API or Shopify Refunds API. Generate prepaid return labels via carrier APIs (Melhor Envio for Brazil, EasyPost for US). Process refunds within authorized limits. Coupon and compensation: generate single-use discount codes via VTEX Promotions API or Shopify Price Rules API. Apply compensation within defined guardrails (maximum 15% discount, maximum R$50 value, one per customer per 30 days). This transforms service recovery from a manual approval process into an instant resolution. Product guidance: search your catalog semantically (not just keyword matching), compare products based on customer needs, check real-time inventory across locations and provide personalized recommendations based on purchase history stored in Supabase. Account management: update customer information, manage subscription preferences, check loyalty points balance, apply accumulated rewards. All through API calls to your platform and CRM.

Required integrations: connecting the agent to your stack

The agent's effectiveness is directly proportional to the APIs it can access. Minimum viable integrations: orders API (read order status, items, tracking), customer API (read customer profile, purchase history), catalog API (search products, check inventory). These three integrations handle 60-70% of typical support interactions. High-value additions: promotions/coupons API (generate compensation codes), returns API (create and manage returns), shipping API (track packages, generate labels), payment API (check payment status, process refunds). For VTEX: the OMS API handles orders and returns. The Master Data API stores customer information. The Catalog API provides product data. The Promotions API manages coupons. Authentication uses appKey and appToken headers. Rate limits are generous (approximately 5,000 requests per minute for most endpoints). For Shopify: the Admin API (REST or GraphQL) covers orders, customers, products, inventory and price rules. Webhooks push real-time updates. Authentication uses access tokens with granular permission scopes. GraphQL is preferred for complex queries to reduce API calls. External services: carrier tracking APIs (Correios via Melhor Envio API, FedEx, DHL), payment gateways (for payment status queries), CRM systems (for customer context), and communication channels (WhatsApp Business API, email via SendGrid or Resend).

Architecture: Claude API + Supabase + Cloudflare Workers

The production architecture for an e-commerce AI agent uses three core services. Cloudflare Workers serve as the compute layer. A Worker receives incoming messages from any channel (website chat widget, WhatsApp webhook, email webhook). It handles authentication, rate limiting and request routing. Workers run at the edge with sub-millisecond cold starts and no server management. The free tier handles 100,000 requests per day, which covers most mid-size stores. Supabase serves as the data and memory layer. Tables: conversations (id, customer_id, channel, messages jsonb, status, created_at), customers (id, platform_id, email, preferences, interaction_history), agent_actions (id, conversation_id, action_type, input, output, status). Use pgvector for semantic search over product catalog and FAQ content. Row Level Security ensures customers only access their own data. Claude API serves as the reasoning layer. The system prompt defines: agent identity and brand voice, available tools with descriptions and parameter schemas, policy rules (return windows, discount limits, escalation triggers), response format guidelines. Tool definitions map to functions in your Worker that call platform APIs. The agent loop: receive message, load conversation history from Supabase, construct prompt with context, call Claude API, if tool call then execute and loop back to Claude with result, if text response then send to customer and store in Supabase. Cost breakdown for 5,000 monthly conversations: Claude API approximately $50-150 (depending on conversation length), Supabase free tier (under 50K MAU), Cloudflare Workers free tier. Total: $50-150/month for infrastructure that replaces 1-2 full-time support agents.

Costs and ROI: human team versus AI agent

Human support team costs (Brazilian market, 2025): junior support agent salary R$2,500-3,500/month, with benefits and taxes the fully loaded cost is R$4,000-6,000/month. One agent handles approximately 40-60 tickets per day in an 8-hour shift. Cost per ticket: R$3.00-6.00. Availability: business hours only unless you pay for shifts. Quality: variable, dependent on training, experience and motivation. AI agent costs: infrastructure (Claude API + Supabase + Cloudflare Workers) R$250-750/month for mid-size stores. One-time development cost: R$15,000-40,000 for a well-built agent with 5-8 tool integrations. Cost per ticket: R$0.05-0.30. Availability: 24/7/365. Quality: consistent but limited to defined capabilities. Resolution comparison at 3,000 monthly tickets: human-only team needs 2-3 agents at R$12,000-18,000/month. AI agent resolving 60% (1,800 tickets) plus 1 human agent for complex cases at R$5,000/month equals R$5,500-5,750/month total. Annual saving: R$78,000-147,000. Payback on development investment: 2-6 months. The non-obvious ROI: response time drops from 2-4 hours average (human) to under 30 seconds (agent). This alone improves customer satisfaction scores by 15-25% in most implementations. Faster resolution also reduces the number of follow-up messages per ticket, further reducing volume.

Metrics to track and agent limitations

Essential metrics: automated resolution rate (percentage of conversations resolved without human intervention, target 50-70%), customer satisfaction score for agent interactions (target: equal or better than human baseline), average resolution time (should be under 2 minutes for automated resolutions), escalation rate (percentage transferred to human, should decrease over time as you add tools and improve prompts), false resolution rate (cases the agent marked resolved but customer contacted again within 24 hours, target under 5%). Monitoring: log every agent action in Supabase. Review escalated conversations weekly to identify patterns. If the agent frequently escalates on a specific topic, add a tool or policy to handle it. Track cost per resolution over time; it should decrease as the agent gets better. Known limitations: emotional situations (bereaved customer, frustrated repeat contact) require human empathy that AI cannot replicate. Complex multi-party issues (disputes involving marketplace sellers, logistics partners and the customer) need human judgment. Creative problem-solving for unprecedented situations is beyond current agent capabilities. Legal and compliance-sensitive situations (product safety issues, regulatory inquiries) should always escalate to trained staff. Design your agent with clear escalation triggers: explicit customer request for human agent, detected frustration (multiple messages expressing dissatisfaction), conversation exceeding a defined turn limit without resolution, and any interaction involving legal, safety or compliance topics. The agent should hand off gracefully, providing the human agent with full conversation context and a summary of what was attempted.