For the complete documentation index, see llms.txt. This page is also available as Markdown.

Frontend Agent

The Frontend Agent is a predefined agent you can attach to your commerce frontend to assist your customers.

The Frontend Agent template is available in the AI Agents Library. You can connect it to your commerce frontend to help your customers get what they need quickly and effortlessly.

Purpose

Improve the customer experience with the Frontend Agent that is capable of assisting the customers throughout their whole journey. Frontend Agent understands natural language queries and requests so the customers can easily communicate with the agent and get instant guidance and support with their tasks. Whether it be checking the order history, returning the purchased products, searching for relevant products in your store using just descriptions of requirements, adding items to cart and doing checkout, or assisting with a reported complaint, the Frontend AI Agent tackles the requests efficiently and securely fetching the specific customer's contextual data.

Key benefits

The Frontend Agent comes with built-in capabilities that contribute to better customer satisfaction.

Feature
Description

Customer-contextual data access

As the Frontend Agent is triggered by the customer directly, it safely receives the customer token which passes the contextual data, so that the Agent's answers are more accurate and relevant. The Agent knows the customer and is able to provide the right support.

RAG tools attached

The Frontend Agent can use the RAG AI Tools, whether Emporix or custom ones, to make the searching experience smoother. • Attaching Product RAG tools adds embeddings to the product search index so the Agent can interpret natural-language product descriptions. • Attaching an Orders RAG tool (RAG_EMPORIX with entity type Order) enables semantic discovery of orders the customer is allowed to access. You decide which entity properties to embed.

Additional customer support

The Frontend Agent stands at your store's door able to provide quick guidance to the customers, showing them around and helping to find the right information. The Agent answers customer questions about products, orders, quotes, and returns. It can perform storefront actions on behalf of the customer or guide customers through structured flows such as checkout and quote handling.

Structured responses

The Agent returns structured, UI-ready responses following a strict JSON schema. This allows you to display the responses on your storefront in the style/format you want with ease.

How it works

When granted the customer scope, it operates entirely within an authenticated customer context. The agent handles the following functionalities:

  • Product discovery and selection

  • Cart management

  • Checkout

  • Orders

  • Quotes

  • Returns

  • Account and address management

All actions are performed using live data from the connected MCP tools through the Frontend MCP Server and are strictly limited to the customer’s scope.

The agent's responses are well-grounded and reliable as the Agent follows the rules to never fabricate data, never assume defaults, and never operate outside the customer context.

Trigger

The Agent is triggered by an API call made by the customer query on a storefront. The customer scope is passed in the request, allowing the Agent to understand the specific customer's context.

Returned data

The Agent returns structured JSON responses, which can be directly consumed by a storefront or any other customer-facing application to render user-friendly UI components.

Default Agent responses

All responses must follow the base structure:

Common types definition

Price Object
Address Object
Item Object - used for cart items, order items, and quote items

Response types

The default response types are defined in the User Prompt.

Cart Summary
Order Summary
Order List
Product List
Product Selection
Address List
Account Details
Return List
Return Details
Quote Details
Text Response
HTML Response - used for rich HTML-formatted content when plain text is insufficient
Table - used for tabular data representation (orders, products, quotes, etc.)
Error Response

Agent Configuration

When you enable the Frontend Agent from the template, you can adjust its configuration as required.

Scopes

The Frontend Agent is designed to operate on behalf of the customer on the commerce frontend. It uses the Frontend MCP server and therefore it requires the Customer scope. This means the agent is explicitly programmed to work only in a customer context. Any invocation outside of this scope is not supported and is going to fail.

If you want to make the agent generally available on your frontend to allow it to provide semantic product search functionality for the anonymous customers without logging in, you can grant the Anonymous scope to the agent. Then, the agent is NOT able to provide any customer-related information or perform any action on behalf of a customer, as it doesn't have access to contextual information or relevant tools.

User Prompt

The User Prompt defines the basic Emporix concepts for the agent so that it understands the context better. It also specifies the format of responses for the agent to follow.

If needed, adjust the prompt to your specific usage requirements. You can customize all response types and data structures but also extend the agent's existing responses. For example, if additional fields are required, add them to the prompt accordingly and the agent includes them in its output.

The default prompt for the Frontend Agent looks as follows:

User prompt

MCP Servers

The Frontend Agent uses the tools that originate from the Emporix Frontend MCP Server that is by default attached to the agent. See the Frontend MCP Tools. The tools allow the agent to get relevant information and perform an action on behalf of a customer.

The Frontend Agent uses the Frontend MCP Server in the background. The MCP provides the tools required to get instant information or perform an action on behalf of a customer on entities such as customer, address, product, order, return, cart, quote, and checkout. The Frontend MCP Server is required for smooth operation of the Frontend Agent.

If needed, add more Emporix or custom MCP tools.

AI Tools

If you want the agent to provide customized recommendations and allow semantic search, attach the RAG AI Tools to the agent. RAG tools index selected entity fields as embeddings. The RAG Tools are not attached by default — add them in the AI Tools view first and configure which properties to index. You can use the Emporix RAG tool (RAG_EMPORIX) or a custom one (RAG_CUSTOM).

For product semantic search, create a RAG_EMPORIX tool with entity type Product (or use RAG_CUSTOM) and attach it to the agent.

For order semantic search, create a RAG_EMPORIX tool with entity type Order, configure indexed and filter fields for your order data, run indexing or reindex as needed, then attach that tool to the agent. Orders RAG grounds answers in order context the customer is allowed to see; it does not replace MCP tools for exact fetches or mutations. Use Orders RAG for natural-language discovery (for example, open or delayed orders by product theme), and Frontend MCP tools such as get-customer-orders for precise lookups and follow-up actions. Retrieval respects scoped retrieval for orders — typically the customer's own orders or orders for legal entities available to that customer.

For more information about how to set RAG AI tool and run index on the entities, see the RAG AI Tool.

Order scenarios and capabilities

Orders RAG complements Frontend MCP tools: RAG retrieves allowed order context; MCP performs reads and actions. The table below maps common order-related scenarios to what the Frontend Agent can cover and any important scope notes.

Scenario
Coverage
Notes

Has my order been confirmed? / Show open or delayed orders

Orders RAG for discovery; get-customer-orders for exact status and details

Status must be available in indexed fields or the MCP order payload

Show me the invoice for order X

Order data via RAG/MCP; send-invoice on Order domain MCP (employee/support agents)

Invoice download or resend is handled outside Frontend MCP — typically via a storefront flow or an employee/support agent

Rebuild a cart from a past order / Add items from order X (excluding item Y)

Order read (RAG or get-customer-orders) + modify-cart-items

Reorder is composed from order lines into cart items rather than a single dedicated tool

Reorder for another ship-to location

Cart tools + upsert-customer-address / get-companies-addresses + checkout

Ship-to change is composed through cart and checkout tools

Change quantity, add an item before shipment, change ship-to, split delivery, cancel one line, request partial shipment

Limited Order domain MCP: update-order-delivery-date, update-order-billing-data

Line-level and shipment mutations beyond the listed Order domain tools require other channels or workflows

Create a return for product Y from order X with reason Z

create-return

Works when return items and reason are supported by the tool

Top customers who buy product Y but never bought Z; which orders are affected by supplier delay; high-value delayed orders

Orders RAG may help discover matching orders in broader (Employee) agents

Cross-customer analytics belong to Employee/Integration agents with broader tools; the Frontend Agent stays in customer context

Orders across legal entities / alternate ship-to

Scoped Orders RAG (customer or legal entity available to customer) + address/cart MCP

RAG returns only orders the customer is allowed to see; follow-up actions use cart and address tools

All agent operations are tracked in the AI Logs view. You can check the details of the requests, jobs, and sessions for monitoring and evaluation purposes. For more information, see the AI Logs.

Last updated

Was this helpful?