DEV Community

Marc Newstead
Marc Newstead

Posted on

Building for Agentic Commerce: What Devs Need to Know Before It's Too Late

Building for Agentic Commerce: What Devs Need to Know Before It's Too Late

If you're building ecommerce systems right now, here's something worth thinking about: what happens when your customers aren't humans anymore?

I don't mean this in a sci-fi dystopia way. I mean practically, architecturally — what changes when an AI agent, not a person clicking through your checkout flow, becomes a first-class user of your system?

The Technical Shift That's Coming

Agentic commerce isn't about chatbots that help you find products. It's about delegation at the transaction level. A user says "keep me stocked on coffee beans, optimise for price and delivery" and an agent — with its own credentials, budget, and decision-making logic — handles the rest.

From a dev perspective, this creates some genuinely new problems:

  • Authentication that isn't human-centric: OAuth flows assume a person clicking buttons. What does auth look like when the client is an autonomous process making purchasing decisions across dozens of merchants?
  • Rate limiting and bot detection: Your current bot protection is designed to block automated purchasing. Now you need to enable it, but only for legitimate agents.
  • Transaction context: When a purchase goes wrong, you can't just email the customer. The agent made the call. Who do you notify? What's the rollback protocol?

Who Sits Between the Agent and Your API?

Here's where it gets commercially interesting, and why I think this matters to you even if you're just shipping features today.

When humans shop, trust infrastructure is invisible: HTTPS, payment card networks, browser security models. We built all of that over decades.

With agents, that trust layer doesn't exist yet — and whoever builds it will control a lot. Think about:

  • Agent registries: Who certifies that an agent is acting on behalf of a real user with real funds?
  • Merchant discovery protocols: How does an agent even find your API? Is there an agent-readable product feed spec we all converge on?
  • Dispute resolution: When an agent makes a mistake, who mediates? The agent provider? The payment network? A new intermediary?

This isn't theoretical. If you're building AI automation and software development systems, you're already adjacent to this problem space.

What You Can Do Right Now

You don't need to rebuild your entire stack, but there are some practical steps worth considering:

1. Make your API agent-friendly

If your ecommerce API is designed exclusively for SPAs and mobile apps, it's going to struggle with agents.

// Instead of requiring session cookies:
GET /products?category=coffee&sort=price&delivery_speed=fast
Authorization: Bearer <agent_token>

// Return structured, parseable data
{
  "products": [...],
  "_meta": {
    "agent_hints": {
      "reorder_eligible": true,
      "subscription_available": true
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

2. Instrument for non-human transaction patterns

Your monitoring and analytics probably assume human behaviour: sessions, cart abandonment, browsing patterns.

Start logging and flagging agent-initiated transactions separately. You'll want to understand:

  • Purchase frequency and timing patterns
  • Decision speed (agents won't browse for 10 minutes)
  • Price sensitivity and optimisation behaviour

3. Design for delegation, not impersonation

When an agent acts, it's not pretending to be the user. It's acting on behalf of the user. That's a meaningful distinction.

Your data models should capture:

CREATE TABLE orders (
  id UUID PRIMARY KEY,
  user_id UUID NOT NULL,
  placed_by_agent_id UUID,  -- null if human
  agent_authority_token TEXT,  -- verifiable delegation proof
  ...
);
Enter fullscreen mode Exit fullscreen mode

The Bit No One's Solved Yet

Liability and regulation are still wide open. If an agent makes an unauthorised purchase, who's responsible? If it violates terms of service, do you ban the agent? The user? Both?

There's no case law. There's barely any industry consensus. But these questions will land on your backlog when your product manager asks you to support agent-driven purchasing.

Bottom Line for Devs

Agentic commerce isn't a 2030 problem. If you're in ecommerce, marketplace, or API platform engineering, this is a 2025–2026 problem.

You don't need to solve it all today, but you do need to be thinking about:

  • How your API will authenticate and rate-limit non-human clients
  • What your transaction model looks like when the purchaser isn't clicking buttons
  • Who you're architecturally betting on to provide the trust layer

Because once that trust layer solidifies, migrating will be expensive. Better to have a point of view now.

Top comments (0)