Zing Forum

Reading

Agent-Commerce-POC: Building an Intelligent Agent E-commerce System Based on the ACP Protocol

A complete multi-service demonstration project showing how to build an agent-mediated e-commerce system using Stripe's Agentic Commerce Protocol (ACP), large language model function calls, and Temporal persistent workflows.

AI代理电商Stripe ACPTemporal工作流大语言模型支付系统概念验证
Published 2026-04-16 09:20Recent activity 2026-04-16 09:24Estimated read 6 min
Agent-Commerce-POC: Building an Intelligent Agent E-commerce System Based on the ACP Protocol
1

Section 01

Agent-Commerce-POC: Guide to the Intelligent Agent E-commerce System Based on the ACP Protocol

Agent-Commerce-POC is a proof-of-concept project that demonstrates how to build an agent-mediated e-commerce system using Stripe's Agentic Commerce Protocol (ACP), large language model function calls, and Temporal persistent workflows. The project addresses challenges such as security and transaction consistency in integrating AI agents with real payment systems, supports dual-path purchases via agent dialogue and traditional UI, and provides a complete test suite and runnable reference implementation.

2

Section 02

Background and Motivation

With the improvement of LLM capabilities, the application of AI agents in the e-commerce field has attracted attention. Traditional e-commerce relies on manual user operations, while AI agents can automatically complete the purchase process through natural language dialogue. However, integrating AI agents with payment systems faces challenges such as security, transaction consistency, error recovery, and refund processing. This project, as a POC, aims to address these issues.

3

Section 03

Core Architecture and Implementation Methods

Project Components

The system uses a multi-service architecture, with core components including: Seller API (handles payments and token ledger), Agent (LLM orchestrator), Web UI (dual-path interface), Temporal Server (persistent workflow), and Temporal Worker (executes checkout processes).

Dual-Path Design

Supports both the agent path (completing purchases via natural language dialogue) and the traditional UI path (manual operations), with both paths ultimately calling the same API and Stripe account to ensure logical consistency.

Temporal Workflow

The checkout process is persistent via Temporal: Create PaymentIntent → Confirm Payment → Fulfillment → Wait for Refund Signal → Refund (if triggered). It supports a 24-hour refund window and automatically falls back to the inline path in case of failures.

ACP Toolset

Agents interact with the Seller API via tools like list_catalog and create_checkout, and can also directly call the Stripe API to query information.

Token Economic Model

Uses token package pricing (10/25/50/100 credit packages + single tokens). The Seller API maintains an SQLite ledger to record balances, which are deducted upon consumption and automatically rolled back upon refunds.

4

Section 04

Technical Highlights and Test Evidence

The project includes 102 integration tests covering product catalog (5), balance management (10), checkout process (17), refunds (6), policy validation (11), edge cases (14), and agent scenarios (39). Among these, the agent scenario tests include 32 parameterized multi-turn dialogue tests and 7 targeted assertions to ensure the correctness of key logic.

5

Section 05

Deployment and Operation Guide

The project uses Docker Compose to orchestrate 7 services, with the first startup taking approximately 60 seconds. Configuration needs to be managed via environment variables, and the following are required: Stripe test mode key, OpenAI API key, and Docker Desktop (with 4GB+ memory allocated).

6

Section 06

Practical Significance and Insights

This project demonstrates key design patterns for AI agent e-commerce systems: protocol standardization (Stripe ACP), workflow persistence (Temporal), dual-path design, and complete test coverage. It provides developers with a runnable reference implementation and best practices, serving as exploratory work in the field of AI agent e-commerce and laying the foundation for future AI-native e-commerce applications.