---
title: Agent
description: Enable product discovery, store questions, and cart updates through conversation.
url: "https://shop-docs.labs.vercel.dev/docs/anatomy/agent"
docs_index: /llms.txt
lastUpdated: 2026-09-15
type: guide
prerequisites:
  - /docs/getting-started
---

> For an index of all documentation, see [/llms.txt](/llms.txt).

Shop Agent helps shoppers find products, choose options, ask store questions, and manage their cart through conversation.

It is **disabled by default**. The storefront works without it, and the chat control stays hidden until you enable it. Customer sign-in is not required.

## Enable Shop Agent

Shop Agent uses your storefront's existing Shopify connection. It runs on [Eve](https://eve.dev) with OpenAI GPT-5.6 Luna (Fast) through [Vercel AI Gateway](https://vercel.com/ai-gateway).

1. Set `agent.isEnabled` to `true` in `lib/config/index.ts`. The chat button floats in the bottom corner; move it by rendering `AgentButton` elsewhere in the layout.
2. Configure AI Gateway access. Vercel deployments can use deployment identity authentication. For local development or other hosts without that authentication, set `AI_GATEWAY_API_KEY` in your server environment. Use `.env.local` for local values and keep the key server-only. See [Environment Variables](/docs/reference/env-vars#shop-agent).
3. Run `pnpm dev`, open Shop Agent, and ask for a product from your store. The reply should show product cards you can open or ask about.

Before allowing public traffic, review [privacy and usage limits](#privacy-and-usage-limits). On Vercel, deploy the storefront with the setting and Gateway access configured; you do not need a separate agent deployment.

### Local production

For a local production build, run `pnpm build:agent && pnpm build`. Then run `pnpm exec eve start --port 4274` and `pnpm start` in separate terminals. Use `pnpm dev` for ordinary development.

## Shopper experience

Shoppers can:

- Find products and collections, narrow results by color or size, and choose variants.
- Get product recommendations and answers about store policies.
- Add items, change quantities, remove items, and add an order note.

Product and policy answers use Shopify data. Keep your catalog and store policies up to date so shoppers can get useful answers.

### One cart, with the shopper in control

Chat shares the storefront's [cart](/docs/anatomy/cart). Confirmed changes show the updated cart in the conversation. The assistant cannot place orders or process payments; shoppers use the checkout button.

New messages and checkout wait while the assistant is working or confirming the cart in that browser tab. If confirmation fails, use **Refresh cart**. This checks the cart without repeating the change. Wait for the response before checking out in another tab.

A cart change may finish after a response is stopped or interrupted. Check the cart before asking again, especially after a timeout or connection failure.

### Continue a conversation or start over

The conversation and draft can be restored after navigation or reload in the same browser.

Use **Stop** to interrupt a response or **Clear chat** to start over. Clear waits for an active response to stop; if it cannot confirm that, it keeps the conversation for retry. Clearing chat does not empty the cart.

Long conversations are summarized automatically so they stay within the model's context. Conversations expire after 30 days; if one has expired, clear it to start a new one.

## Privacy and usage limits

Once enabled, chat is publicly accessible and messages can incur model charges. The template does not cap tokens per conversation; control cost where traffic enters instead. Add deployment-level rate limits and Gateway spending controls appropriate to your traffic.

Bot protection is **disabled by default**. For Vercel deployments, enable `botid.isEnabled` in [Shop Configuration](/docs/reference/shop-config) so automated traffic is rejected before it reaches the model. Bot protection does not replace access controls or spending limits.

Customer sign-in does not make chat history private. The default setup does not restrict a conversation to its original shopper: anyone with its conversation ID may be able to read or control it. Do not share conversation IDs. Add authenticated conversation ownership before using chat for private account or support data.

Eve stores conversations on the server, and conversation content is sent to the model provider. Clearing chat or conversation expiry does not guarantee deletion of those records. Configure retention and access policies, and explain to shoppers how their messages are handled.

The assistant receives a summary of cart items rather than gift-card recipient details. Personal information shoppers type into chat still reaches the model provider. Avoid requesting sensitive information that is not needed for shopping.

## What’s next

Adapt the tone, product presentation, and recommendations to your store. Add store-specific guidance while keeping Shopify as the source of prices and availability. Choose a model that balances response quality, speed, and cost.

---

For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)

For an index of all available documentation, see [/llms.txt](/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/agents.md](/agents.md)