高效商务代理剖析指南
The architecture, latency & cost techniques, and eval practices for agents that make it easier to buy and sell online.
让在线买卖更便捷的智能体架构、延迟与成本优化技术,以及评估实践。
Over the past year, we've worked with teams across the commerce industry — retailers, marketplaces, travel, entertainment, and telecom providers — to build commerce agents using Claude.
在过去的一年里,我们与电商行业的各个团队——包括零售商、市场平台、旅游、娱乐和电信提供商——合作,使用 Claude 构建电商智能体。
These agents are in production, and enterprise customers have seen larger carts and more efficient seller operations when using them. They also share a simple architecture: Claude in an agent loop equipped with a set of skills, tools, and a strong eval suite.
这些智能体已投入生产,企业客户在使用它们后看到了更大的购物车和更高效的商家运营。它们还共享一种简单的架构:处于智能体循环中的 Claude,配备了一系列技能、工具和一个强大的评估套件。
This post is for the engineers and engineering leaders building these (or other consumer facing) agents. Part 1 covers the architecture, which you decide once. Part 2 covers latency and cost. Part 3 covers production: memory, safety, evals, and scaling the work across an organization.
本文面向构建这些(或其他面向消费者)代理的工程师和工程领导者。第一部分涵盖架构,这是一次性决策。第二部分涵盖延迟和成本。第三部分涵盖生产环境:内存、安全性、评估,以及在组织内规模化推进工作。
In this guide
在本指南中
- Part 1: The architecture
- What is a commerce agent?
- Skills, not subagents
- System prompt or skill: decide by frequency
- Engineering agent tooling
- The UI components are tools
- 第一部分:架构
- 什么是商务代理?
- 技能,而非子代理
- 系统提示词或技能:根据频率决定
- 工程代理工具
- UI 组件即工具
- Part 2: Making it fast and affordable
- Minimizing task completion latency
- Perceived latency
- Prompt caching
- Choosing the model and its configuration
- 第二部分:使其快速且经济实惠
- 最小化任务完成延迟
- 感知延迟
- Prompt缓存
- 选择模型及其配置
- Part 3: Running it in production
- Memory that survives the session
- Safety: enforcement lives in the harness
- Evals: shipping a non-deterministic system
- Shipping with a large organization
- 第三部分:在生产环境中运行
- 在会话中保留的记忆
- 安全性:执行机制存在于测试框架中
- 评估:交付非确定性系统
- 在大型组织中交付
- Looking ahead
- 展望未来
01
01
The architecture
架构
One model in a standard agent loop, with skills for the long tail and tools that call the systems you already run. You decide this once.
在标准智能体循环中使用一个模型,具备处理长...