Skip to main content

Define your agent profile

Quick start with AI Toolkit

The quickstart runs this same flow with the UCP CLI and Shopify AI Toolkit in about five minutes, and is the recommended way to get started. Follow this six-part series if you want to walk the protocol end-to-end against Shopify's MCP servers, integrate into an existing HTTP client, or build without the toolkit.

This guide is the second part of a six-part tutorial series that describes how to build an agentic commerce application with the Universal Commerce Protocol (UCP) using Shopify's MCP servers. It demonstrates how to define your agent's capabilities in a profile and host that profile at a URL.

By the end of this tutorial, you'll have an agent profile that declares both cart and checkout capabilities and a profile URL to pass in Cart MCP and Checkout MCP requests.


In this tutorial, you'll learn to:

  • Define your agent's UCP profile with the cart and checkout capabilities.
  • Save the profile as ucp-demo-agent.json and host it at a URL.


Anchor to Step 1: Create the agent profileStep 1: Create the agent profile

Your agent identifies itself to merchants using a profile, which is a JSON document that declares the UCP version and capabilities your agent supports. Cart MCP and Checkout MCP require you to send the URL of this profile in every request so the merchant can perform capability negotiation, verifying that your agent supports the relevant capabilities before accepting the call.

Because the upcoming tutorials use Cart MCP to build a cart and Checkout MCP to convert that cart into a checkout, your profile needs to declare both capabilities:

https://shopify.dev/ucp/agent-profiles/examples/2026-04-08/cart-and-checkout.json

{
"ucp": {
"version": "2026-04-08",
"capabilities": {
"dev.ucp.shopping.cart": [
{
"version": "2026-04-08"
}
],
"dev.ucp.shopping.checkout": [
{
"version": "2026-04-08"
}
]
}
}
}

This profile declares that your agent supports the UCP version 2026-04-08, the dev.ucp.shopping.cart capability, and the dev.ucp.shopping.checkout capability. Passing cart_id to create_checkout to convert a cart into a checkout requires both capabilities to be negotiated, so the profile must include both. You'll use the URL where this file is hosted as AGENT_PROFILE in the Build a cart and Finish checkout tutorials.


Anchor to Step 2: (Optional) Host the profileStep 2: (Optional) Host the profile

Cart MCP and Checkout MCP requests require a link to your agent profile. The merchant fetches that URI to verify your agent's capabilities.

Copy and host the file above at a public URL.

  • Use a static host (for example, GitHub raw, or your own domain).
  • Serve it from your app (for example, https://your-app.example/profiles/ucp-demo-agent.json).

Update AGENT_PROFILE in later steps in this tutorial to match your URL. You will see https://shopify.dev/ucp/agent-profiles/examples/2026-04-08/cart-and-checkout.json as a placeholder.



Was this page helpful?