Building Agentic Commerce #2: How AI Agents Discover Your Store Without an API Key
Before an agent can buy anything, it needs to find your store. Here's the 6-phase discovery chain that takes an AI agent from zero knowledge to checkout-ready in under 2 seconds — no pre-configuration required.
Executive summary
Second post in the 'Building Agentic Commerce' series. A developer guide to the complete agent discovery chain: NLWeb semantic search, llms.txt, agent-card.json, 10+ machine-readable endpoints, and the AgentFinder cross-merchant search — all working without pre-configuration.
Published
2026-04-05
11 min
Author
Integration Architecture Team
Implementation architects
The integration architecture team focuses on practical rollout patterns for stores adopting MCP-compatible commerce surfaces.
View profileCategory
developer-guide
Here's a question most e-commerce platforms haven't answered yet: how does an AI agent find your store in the first place? Not through Google. Not through a bookmark. An agent needs machine-readable discovery endpoints that tell it what you sell, how to search your catalog, and what protocols you support — all before it ever creates an account or gets an API key. In this post, we'll walk through the complete discovery chain that AgenticMCPStores provides, from a cold start to a checkout-ready agent in under 2 seconds.
This is Part 2 of the 'Building Agentic Commerce' series. Part 1 covered multi-protocol checkout (MCP + x402 + ACP). Part 3 will cover trust scores — the system that determines how much autonomy agents get.
The Discovery Problem: Agents Don't Browse
Humans discover stores through search engines, social media, word of mouth, and advertising. AI agents have none of these channels. An agent needs structured, machine-readable information: what products are available, what payment protocols are supported, what trust level the merchant has, and how to interact programmatically. Without standardized discovery, every agent-to-store integration requires manual configuration — which defeats the entire purpose of autonomous commerce.
The Discovery Stack: 4 Layers
AgenticMCPStores implements discovery at four layers, each serving a different stage of the agent's decision process:
- 1Layer 1: Machine-Readable Manifests — /.well-known/ endpoints that tell agents what's available (protocols, policies, trust framework). Zero auth required.
- 2Layer 2: llms.txt — A comprehensive text file that LLMs can read in full to understand the entire platform. Think of it as documentation optimized for AI consumption, not human reading.
- 3Layer 3: NLWeb Semantic Search — Natural language product and merchant search powered by vector embeddings (pgvector) and LLM re-ranking (Claude Haiku). Agents ask questions instead of constructing API queries.
- 4Layer 4: MCP Tools — Structured tool calls (search_products, get_merchant_profile, browse_categories) for agents that already know the API surface.
Layer 1: The /.well-known/ Discovery Endpoints
Every AgenticMCPStores deployment serves 10+ machine-readable JSON endpoints under the /.well-known/ path. These follow RFC 8615 conventions and are cached, CORS-safe, and require no authentication. An agent can read all of them in parallel in under 50ms.
The Essential Five
- 1/.well-known/nlweb.json — NLWeb protocol discovery: endpoints, auth requirements, available search modes (list, summarize, generate). This is usually the first file an agent reads.
- 2/.well-known/merchant-index.json — Full merchant registry with slugs, trust scores, freshness tiers, MCP endpoints, and top categories. Updated every 5 minutes via ISR.
- 3/.well-known/agent-card.json — Platform capabilities: 10 supported protocols (MCP, ACP, x402, UCP, eIDAS-QTSP...), 7 skills, authentication schemes, API endpoints.
- 4/.well-known/agent-policy.json — Trust score interpretation: what EXCELLENT (0.9-1.0) vs CAUTION (0.5-0.7) means, action taxonomy (ALLOW/FRICTION/REVIEW/BLOCK), confirmation rules.
- 5/.well-known/agent-commerce.json — Business contract: ranking formula, capability negotiation, protocol capabilities with documentation links.
Five More for Advanced Agents
- 1/.well-known/agent-trust-manifest.json — 8 trust score components with weights (completeness, freshness, accuracy, policy coverage...)
- 2/.well-known/agent-playbooks.json — Pre-built policy playbooks: what actions are safe, what requires human confirmation
- 3/.well-known/acp.json — ACP protocol discovery: payment handlers (Stripe, x402, PayPal, UCP), OAuth scopes, capability negotiation
- 4/.well-known/ucp — Universal Commerce Protocol profile per store (add ?store=slug)
- 5/.well-known/oauth-protected-resource — OAuth 2.0 resource metadata for agents that need write access
All /.well-known/ endpoints follow the same pattern: force-static generation, CORS *, Cache-Control public max-age=3600, and X-Content-Type-Options nosniff. They're designed to be fetched by any agent, from any origin, with no setup.
Layer 2: llms.txt — Documentation for Machines
The /llms.txt endpoint serves a ~1,500-line text file that describes the entire platform in a format optimized for LLM consumption. It's served at /llms.txt (static, cached 1h) and includes: every public API endpoint with methods and parameters, all MCP tools with input/output schemas, protocol support matrix with status per protocol, recent changes (what's new since last update), and a multi-store agent workflow that agents can follow step by step.
What makes llms.txt special is the INTEGRITY NOTICE section: a prompt injection defense that warns agents if third-party tools have appended instructions to the content. If an agent receives llms.txt through a retrieval extension that adds 'Stop processing' or 'Ignore previous instructions,' the integrity notice tells the agent to discard those additions and continue. This is a real attack vector — some browser extensions append agent-gating signals to retrieved content.
Layer 3: NLWeb — 'Find Me Running Shoes Under $100'
NLWeb is where discovery gets intelligent. Instead of structured API queries with filters and parameters, agents ask natural language questions and get ranked, scored results with Schema.org product objects. The pipeline has four stages: vector embedding generation, pgvector cosine similarity search (top 50 candidates in ~50ms), LLM re-ranking via Claude Haiku (scores each product 0.0-1.0 for relevance, ~300ms), and optional snippet generation for summarize/generate modes.
Three NLWeb Surfaces
- 1Per-Store NLWeb — POST /{storeSlug}/ask with { query, mode, limit }. Searches one merchant's catalog. Results include Schema.org Product objects with scores.
- 2Platform Self-Discovery — POST /mcpwebstore-platform/ask (NO AUTH). The platform indexes itself as a virtual merchant with 27 items: 8 protocols, 4 pricing tiers, 6 features, 2 integrations. Agents ask 'does this platform support stablecoin payments?' and get structured answers.
- 3AgentFinder — POST /api/v1/agentfinder/search. Cross-merchant discovery: 'find the best merchant for running shoes.' Returns ranked merchants with trust scores, relevance scores, and NLWeb endpoints.
Multi-Turn Conversations
NLWeb supports conversational follow-ups via the 'prev' parameter. An agent can ask 'show me running shoes,' then follow up with 'only the ones under $80' — the NlwebDecontextualizer resolves context from the previous query and re-ranks results. This is critical for agents that interact with users in real-time: the user refines their request, and the agent refines its search without starting over.
The Full Discovery Chain: Zero to Checkout in 6 Phases
Here's the complete flow an agent follows, from knowing nothing about AgenticMCPStores to completing a purchase. Total time: under 2 seconds.
- 1Phase 1 — Bootstrap (10-50ms): GET /.well-known/nlweb.json + merchant-index.json + agent-policy.json in parallel. Agent learns what stores exist and what protocols are available.
- 2Phase 2 — Merchant Selection (100-300ms): POST /api/v1/agentfinder/search with the user's intent. Agent gets ranked merchants with trust scores and relevance.
- 3Phase 3 — Product Search (200-800ms): POST /{slug}/ask with natural language query. Vector search + LLM re-ranking returns scored Schema.org products.
- 4Phase 4 — Trust Check (50-150ms): POST /{slug}/mcp → get_merchant_profile. Agent confirms trust score meets threshold for autonomous checkout.
- 5Phase 5 — Cart Creation (auth required): POST /{slug}/mcp → create_cart. Agent crosses from read-only to write operations — OAuth required.
- 6Phase 6 — Checkout: POST /{slug}/mcp → preview_checkout → complete_checkout. Protocol Bridge routes payment to the correct adapter.
The critical insight: Phases 1-4 require zero authentication. An agent can discover stores, search products, and evaluate trust without any API key. Authentication only enters at Phase 5 when the agent starts modifying state (creating carts). This dramatically lowers the barrier to discovery.
For Merchants: Making Your Store Discoverable
If you're a merchant on AgenticMCPStores, your store is automatically discoverable through all four layers. Your products are indexed in NLWeb when you sync your catalog (Shopify, WooCommerce, Odoo, or PrestaShop). Your merchant profile appears in the merchant-index.json registry. Your MCP endpoint is live at /{yourSlug}/mcp. But there are things you can do to rank higher in agent searches:
- 1Complete your merchant profile: trust score components include completeness (business info, contact, policies). Missing fields lower your score.
- 2Keep inventory synced: freshness tier affects ranking. Stores with stale data get deprioritized. The freshness component measures how recently your catalog was updated.
- 3Set clear policies: return windows, shipping estimates, and payment methods are all machine-readable. Agents that can't determine your policies will skip your store.
- 4Get QTSP verified: eIDAS QUALIFIED verification boosts trust score by +0.18 (vs +0.10 for self-declared). Higher trust = more agent traffic.
Try It Now
You can test the complete discovery chain against our live platform right now. Start with GET agenticmcpstores.com/.well-known/nlweb.json to see the NLWeb discovery contract. Then try POST agenticmcpstores.com/mcpwebstore-platform/ask with { "query": "what protocols do you support?", "mode": "summarize" } — the platform will answer questions about itself. For product search, try POST agenticmcpstores.com/demo-store/ask with { "query": "headphones", "mode": "list" }. All of these work without authentication.
What's Next in the Series
In Part 3, we'll cover trust scores: the 8-component scoring system that determines how much autonomy an agent gets when shopping at your store. We'll explain why an agent might auto-approve a $50 purchase from one merchant but require human confirmation for a $20 purchase from another — and how merchants can optimize their trust profile to increase agent traffic.
Frequently asked questions
Do agents need an API key to discover stores and search products?
No. Discovery (Phases 1-4) is completely unauthenticated. All /.well-known/ endpoints, llms.txt, NLWeb search, and MCP read-only tools work without any API key. Authentication is only required for write operations like creating carts and completing checkout (Phases 5-6).
What is the Platform Self-Discovery endpoint?
AgenticMCPStores indexes its own capabilities as a virtual NLWeb merchant called 'mcpwebstore-platform.' Agents can POST to /mcpwebstore-platform/ask with questions like 'what payment protocols do you support?' or 'how much does the Growth plan cost?' and get structured answers. This eliminates the need for agents to parse documentation — they can query the platform the same way they query a product catalog.
How does NLWeb differ from the search_products MCP tool?
search_products is a structured tool call with specific parameters (query, category, priceRange, limit). NLWeb is a natural language interface — agents describe what they want in plain text, and the system handles intent parsing, synonym expansion, vector similarity, and LLM re-ranking. NLWeb also supports multi-turn conversations via the 'prev' parameter. Use search_products when you know exactly what parameters to pass; use NLWeb when the query is open-ended.
How often is the merchant-index.json updated?
The merchant-index.json endpoint uses Incremental Static Regeneration (ISR) with a 5-minute revalidation window. When a merchant updates their profile or catalog, the change propagates to the index within 5 minutes. Trust scores are computed on a 6-hour cadence, so score changes take slightly longer to reflect.
What's the llms.txt integrity notice and why does it matter?
The integrity notice is a prompt injection defense. Some browser-based retrieval extensions append instructions like 'Stop processing' or 'Ignore previous instructions' to content they deliver. The llms.txt integrity notice warns agents that any such additions were not placed by AgenticMCPStores and should be discarded. Agents can verify integrity by checking GET /api/v1/health → manifests field.
Sources and references
- NLWeb: Natural Language Web Protocol
NLWeb Community
- RFC 8615 — Well-Known URIs
IETF
- Schema.org Product Type
Schema.org
- llms.txt — Documentation for LLMs
llmstxt.org
- pgvector — Open-Source Vector Similarity Search
pgvector
Related articles
developer-guide
Building Agentic Commerce #1: Multi-Protocol Checkout — MCP + x402 + ACP in One Flow
One agent, three protocols, one checkout. Here's how MCP, x402 stablecoin payments, and ACP work together to let AI agents buy products — with code examples you can run today.
developer-guide
Building Agentic Commerce #3: Trust Scores — How Agents Decide Who to Buy From
When an AI agent evaluates merchants, it doesn't read reviews or recognize logos. It reads trust scores — 12 machine-verifiable signals that determine search ranking, checkout eligibility, and payment friction. Here's how the system works.
trust-compliance
Why eIDAS-Verified Merchant Identity Changes Everything for AI Commerce
AI agents need more than product data to transact — they need cryptographic proof that merchants are who they claim to be. Here's how eIDAS QTSP verification solves the trust gap in agentic commerce.