PHPackages                             gtstudio/module-ucp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. gtstudio/module-ucp

ActiveMagento2-module[API Development](/categories/api)

gtstudio/module-ucp
===================

Universal Commerce Protocol (UCP) implementation for Magento 2. Enables AI agent-driven checkout via Google's open commerce standard.

1.0.0(4mo ago)11MITPHPPHP &gt;=8.1

Since Mar 25Pushed 4mo agoCompare

[ Source](https://github.com/gabrielgts/module-ucp)[ Packagist](https://packagist.org/packages/gtstudio/module-ucp)[ RSS](/packages/gtstudio-module-ucp/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Gtstudio\_Ucp
=============

[](#gtstudio_ucp)

Magento 2 module implementing [Google's Universal Commerce Protocol (UCP)](https://developers.googleblog.com/under-the-hood-universal-commerce-protocol-ucp/) — an open standard that allows AI shopping agents to discover and drive checkout sessions on any compliant merchant.

[![UCP checkout flow](docs/images/ucp-preview.gif)](docs/images/ucp-preview.gif)

What It Does
------------

[](#what-it-does)

- Exposes `/.well-known/ucp` profile discovery endpoint so AI agents can locate the checkout API.
- Implements the five UCP checkout session endpoints (`create`, `get`, `update`, `complete`, `cancel`).
- Maps Magento quote state to UCP session state (`incomplete` → `ready_for_complete` → `completed | cancelled`).
- Registers five AiAgents tools so the `ucp_checkout` agent can drive sessions programmatically.
- Seeds a `ucp_checkout` agent with a UCP-aware system prompt via data patch.

Installation
------------

[](#installation)

```
composer require gtstudio/module-ucp
bin/magento module:enable Gtstudio_Ucp
bin/magento setup:upgrade
```

Endpoints
---------

[](#endpoints)

MethodPathDescription`GET``/.well-known/ucp`Profile discovery`POST``/ucp/checkout-sessions`Create session`GET``/ucp/checkout-sessions/:id`Get session`PUT/PATCH``/ucp/checkout-sessions/:id`Update session`POST``/ucp/checkout-sessions/:id/complete`Place order`POST``/ucp/checkout-sessions/:id/cancel`Cancel sessionSession Lifecycle
-----------------

[](#session-lifecycle)

```
incomplete
  → (add buyer email)              requires_escalation | ready_for_complete
  → (complete with payment)        completed
  → (cancel at any point)          cancelled

```

Status is resolved dynamically from the linked Magento quote on every `get` or `update` call.

How It Works
------------

[](#how-it-works)

1. **Router** (`Controller/Router.php`) — registered at `sortOrder=20`, intercepts `/.well-known/ucp` and `/ucp/checkout-sessions/*` before Magento's standard router.
2. **Controllers** — thin HTTP boundary classes extending `AbstractCheckout`; delegate to `CheckoutSessionManagementInterface`.
3. **CheckoutSessionManagement** — core business logic: creates/updates Magento quotes, maps UCP payloads to Magento API calls, persists `UcpSession` records.
4. **SessionMapper** — converts `CartInterface` to UCP JSON, resolves session state, surfaces recoverable validation messages.

Validation
----------

[](#validation)

Use the [UCP conformance test suite](https://github.com/Universal-Commerce-Protocol/conformance) or [ucpchecker.com](https://ucpchecker.com) to validate the endpoints against the protocol spec.

Extensibility
-------------

[](#extensibility)

- Swap the session mapper by declaring a `` for `Gtstudio\Ucp\Api\CheckoutSessionManagementInterface`.
- Add custom profile capabilities by replacing `Gtstudio\Ucp\Api\ProfileBuilderInterface`.
- The `UcpSession` model exposes standard Magento getter/setter methods for plugin attachment.

AI Studio Ecosystem
-------------------

[](#ai-studio-ecosystem)

ModuleDescription[module-ai-connector](https://github.com/gabrielgts/module-ai-connector)LLM provider abstraction (OpenAI, Anthropic, Gemini)[module-ai-agents](https://github.com/gabrielgts/module-ai-agents)Agent orchestration, tools, and tool executor pool[module-ai-widgets](https://github.com/gabrielgts/module-ai-widgets)Admin chat widgets and Page Builder agent[module-ai-data-query](https://github.com/gabrielgts/module-ai-data-query)Natural-language store analytics tools[module-ai-knowledge-base](https://github.com/gabrielgts/module-ai-knowledge-base)Vector search knowledge base[module-ai-dashboard](https://github.com/gabrielgts/module-ai-dashboard)Admin AI dashboard with store assistantmodule-ucp*(this module)*License
-------

[](#license)

Business Source License 1.1 — see [LICENSE](LICENSE).

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance78

Regular maintenance activity

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

122d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ab1f0030c21bebf4e87187df361e770ffaa2c0d3cdcd0cd45c77a79db5836156?d=identicon)[gtstudio](/maintainers/gtstudio)

### Embed Badge

![Health badge](/badges/gtstudio-module-ucp/health.svg)

```
[![Health](https://phpackages.com/badges/gtstudio-module-ucp/health.svg)](https://phpackages.com/packages/gtstudio-module-ucp)
```

###  Alternatives

[smile/elasticsuite

Magento 2 merchandising and search engine built on ElasticSearch

8064.7M50](/packages/smile-elasticsuite)[mollie/magento2

Mollie Payment Module for Magento 2

1131.9M16](/packages/mollie-magento2)[graycore/magento2-cors

A Magento 2 module that enables CORS on the GraphQL and REST Apis

102601.7k](/packages/graycore-magento2-cors)[magmodules/magento2-channable

Channable integration for Magento 2

311.5M](/packages/magmodules-magento2-channable)[elgentos/module-prismicio

Magento 2 - Prismic.io integration

39119.0k4](/packages/elgentos-module-prismicio)[loki/magento2-components

Core module for defining Alpine.js components with advanced AJAX features

1011.8k26](/packages/loki-magento2-components)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
