Try it in 2 minutes:
npm install @agorio/sdk
import { ShoppingAgent, GeminiAdapter, MockMerchant } from '@agorio/sdk';
const merchant = new MockMerchant();
await merchant.start();
const agent = new ShoppingAgent({
llm: new GeminiAdapter({ apiKey: process.env.GEMINI_API_KEY })
});
const result = await agent.run(
`Go to ${merchant.domain} and buy me wireless headphones`
);
What it does:- UcpClient: discovers merchants via /.well-known/ucp, parses capabilities, normalizes both array and object formats, calls REST APIs - ShoppingAgent: plan-act-observe loop with 12 built-in tools (discover, search, browse, cart, checkout, order tracking) - MockMerchant: full UCP-compliant Express server with product catalog, checkout flow, and configurable chaos testing (latency, error rates) - LlmAdapter interface: swap LLMs without changing agent code. Gemini ships today, Claude and OpenAI coming in v0.2
The agent handles the entire purchase flow autonomously - UCP discovery, product search, cart management, shipping, payment, order confirmation. 37 tests passing.
Context: UCP was announced Jan 11 by Google, Shopify, and 25+ partners (Walmart, Target, Visa, Mastercard). ACP is by OpenAI and Stripe, powers ChatGPT Instant Checkout. Both are open standards. But there was no developer SDK for building on top of them - just the raw specs.
GitHub: https://github.com/Nolpak14/agorio npm: https://www.npmjs.com/package/@agorio/sdk
nolpak14•1h ago
Some background: I've been working on tooling for UCP (Universal Commerce Protocol) for a few months. UCP is the open standard Google and Shopify announced in January - it lets AI agents discover stores via /.well-known/ucp and complete purchases through standardized APIs.
I built Agorio because when I tried to build a shopping agent against the UCP spec, I had to:
1. Write my own profile parser that handles both capability formats in the spec 2. Build a checkout state machine (incomplete → requires_escalation → ready_for_complete → completed) 3. Create a mock merchant from scratch just to test against 4. Wire up LLM function calling with JSON Schema tool definitions
None of this was commerce-specific - it was all protocol plumbing. So I extracted it into a reusable SDK.
The key abstractions:
- LlmAdapter - two methods: chat(messages, tools) and modelName. Any LLM with function calling works. The Gemini adapter is ~100 lines. - ShoppingAgent - takes an LlmAdapter, runs plan-act-observe with 12 tools. Manages cart state, checkout sessions, order history. - UcpClient - fetches /.well-known/ucp, normalizes capabilities, resolves REST/MCP/A2A transports. - MockMerchant - full Express server with UCP profile, OpenAPI schema, 10 products, checkout flow, order tracking. Supports chaos testing with configurable latency and error rates.
Technical choices I'd like feedback on:
- Is a plan-act-observe loop the right pattern, or should I support ReAct / tree-of-thought? - Currently UCP-only. ACP client is planned for v0.2. Should I prioritize that? - The LlmAdapter interface is deliberately minimal. Too minimal?
Would love feedback from anyone building with LLM function calling or commerce APIs. Happy to talk UCP/ACP protocol details.