Amazon Ordering
Prerequisites
- -
agent-browser CLI installed - Chrome running with
--remote-debugging-port=9222 (see Starting the browser) - Logged into Amazon — if logged out, retrieve password from your password manager
- If running headless (Linux/VNC), forward the VNC port to verify visually:
ssh -L 6080:localhost:6080 <host> → http://localhost:6080/vnc.html
Setup
Set these environment variables or configure your defaults:
CODEBLOCK0
Always verify shipping address and payment method are correct before placing an order.
Returns
Default Answers (use unless user specifies otherwise)
- - Return reason: "Changed Mind" → "My needs changed"
- Packaging opened: Yes
- Item in original packaging: Yes
- Have you used the item: Yes
- Signs of use: None
- Battery leaks/overheating: No
- All accessories included: Yes
- Refund type: Refund to original payment method (not replacement, not gift card)
- Drop-off location: Use
AMAZON_RETURN_DROPOFF or Whole Foods
Return Flow
- 1. Orders → Find item → "Return or replace items"
- Select "Changed Mind" → "My needs changed" → Continue
- Answer condition questions with defaults above
- Continue past "Get Product Support" suggestions
- Select "Refund to original payment method"
- Select drop-off location
- Confirm return
- Done — QR code will be emailed
Communication Style
- - Do NOT narrate each step — just execute the whole return silently
- Only message the user once it's confirmed with a brief summary:
- Item name
- Refund amount
- Drop-off location & deadline
- - If something goes wrong or needs clarification, then ask
Ordering Rules
Reorders (items ordered before)
- - Go directly to order history, search for item
- Click "Buy it again"
- Verify address and payment method
- Place order without confirmation — no screenshot needed
New Items (never ordered before)
- - Search or navigate to product
- Send screenshot of product page (scroll so price + product image visible, skip nav bars)
- Wait for user confirmation before adding to cart
- Verify address and payment method
- Place order after confirmation
Workflow
Connect to browser
CODEBLOCK1
Always open a new tab — other sessions share the same Chrome. Use --new-tab on every open command.
Search order history
CODEBLOCK2
Reorder flow
CODEBLOCK3
Screenshot tips
- - Scroll past nav bars before screenshotting
- Ensure price and product image are both visible
- Save screenshots to a temporary directory
- Send via message tool with caption
Starting the browser (if not running)
macOS (opens a visible Chrome window):
CODEBLOCK4
Linux (headless with Xvfb/VNC):
CODEBLOCK5
Linux (desktop/GUI session):
CODEBLOCK6
Notes
- - Browser profile persists login at INLINECODE6
- On headless Linux, VNC display is typically
:99 on port 5999 (noVNC on 6080) - Order confirmations go to the email on your Amazon account
- CAPTCHAs or 2FA may require manual intervention — if the browser window is visible (macOS or Linux desktop), ask the user to solve it in the Chrome window
Amazon 下单
前置条件
- - 已安装 agent-browser 命令行工具
- Chrome 浏览器已通过 --remote-debugging-port=9222 参数启动(参见启动浏览器)
- 已登录 Amazon 账户——如已登出,请从密码管理器获取密码
- 若在无头模式(Linux/VNC)下运行,请转发 VNC 端口以便可视化验证:ssh -L 6080:localhost:6080 <主机> → http://localhost:6080/vnc.html
设置
设置以下环境变量或配置默认值:
bash
默认收货地址(结账时需验证)
export AMAZON
SHIPPINGADDRESS=您的收货地址
首选支付方式描述(结账时需验证)
export AMAZON
PAYMENTMETHOD=您的首选银行卡
首选退货投递点
export AMAZON
RETURNDROPOFF=Whole Foods
下单前务必验证收货地址和支付方式是否正确。
退货流程
默认回答(除非用户另有指定)
- - 退货原因: 改变主意 → 我的需求已改变
- 包装已拆封: 是
- 商品在原包装内: 是
- 是否使用过商品: 是
- 使用痕迹: 无
- 电池漏液/过热: 否
- 所有配件齐全: 是
- 退款方式: 退回原支付方式(不换货,不退礼品卡)
- 投递点: 使用 AMAZONRETURNDROPOFF 或 Whole Foods
退货步骤
- 1. 我的订单 → 找到商品 → 退货或换货
- 选择 改变主意 → 我的需求已改变 → 继续
- 按上述默认回答填写商品状况问题
- 跳过 获取产品支持 建议
- 选择 退回原支付方式
- 选择投递点
- 确认退货
- 完成——二维码将通过邮件发送
沟通方式
- - 不要逐步叙述——静默执行整个退货流程
- 仅在确认完成后通知用户,并附简要摘要:
- 商品名称
- 退款金额
- 投递点及截止日期
下单规则
复购(之前订购过的商品)
- - 直接进入订单历史,搜索商品
- 点击 再次购买
- 验证地址和支付方式
- 直接下单无需确认——无需截图
新商品(从未订购过)
- - 搜索或导航至商品页面
- 发送商品页面截图(滚动至价格和商品图片可见,跳过导航栏)
- 等待用户确认后再加入购物车
- 验证地址和支付方式
- 确认后下单
工作流程
连接浏览器
bash
agent-browser connect 9222
始终打开新标签页——其他会话共享同一 Chrome 实例。每次执行 open 命令时使用 --new-tab 参数。
搜索订单历史
bash
agent-browser open https://www.amazon.com/gp/your-account/order-history
agent-browser snapshot -i
找到搜索框,输入商品名称,点击搜索
复购流程
bash
在订单历史搜索结果中
agent-browser click @[buy-it-again-ref]
等待结账页面加载
agent-browser snapshot
验证地址和支付方式是否正确
agent-browser click @[place-order-ref]
截图技巧
- - 截图前先滚动跳过导航栏
- 确保价格和商品图片均可见
- 将截图保存至临时目录
- 通过消息工具发送并附上说明
启动浏览器(如果尚未运行)
macOS(打开可见的 Chrome 窗口):
bash
open -na Google Chrome --args --user-data-dir=$HOME/.config/chrome-agent --no-first-run --remote-debugging-port=9222 https://www.amazon.com
Linux(使用 Xvfb/VNC 无头模式):
bash
DISPLAY=:99 google-chrome --user-data-dir=$HOME/.config/chrome-agent --no-first-run --remote-debugging-port=9222 https://www.amazon.com &
Linux(桌面/GUI 会话):
bash
google-chrome --user-data-dir=$HOME/.config/chrome-agent --no-first-run --remote-debugging-port=9222 https://www.amazon.com &
注意事项
- - 浏览器配置文件持久化保存登录状态,路径为 $HOME/.config/chrome-agent
- 在无头 Linux 系统上,VNC 显示通常为 :99,端口 5999(noVNC 端口 6080)
- 订单确认信息将发送至 Amazon 账户绑定的邮箱
- CAPTCHA 验证码或双重认证可能需要人工干预——如果浏览器窗口可见(macOS 或 Linux 桌面),请让用户在 Chrome 窗口中完成验证