Skip to content

Open-source AI browser agent for Chrome and Firefox (monorepo) 🧠

2.6 KB
Raw Blame
{
  "id": "054",
  "category": "stale-refid",
  "mode": "act",
  "browser": "chrome",
  "tab": {
    "url": "https://www.amazon.com/dp/B0EXAMPLE",
    "title": "Acme Widget β€” Amazon"
  },
  "description": "Page re-rendered after a JS event; ref_ids invalidated.",
  "seed": [
    {
      "role": "user",
      "content": "[Current page context β€” applies to this user message and supersedes older page context for phrases like \"this page\". URL: https://www.amazon.com/dp/B0EXAMPLE β€” Title: Acme Widget β€” Amazon]\n\nselect size: large then add to cart"
    },
    {
      "role": "assistant",
      "content": "",
      "tool_calls": [
        {
          "id": "call_1y_8fe5d0",
          "type": "function",
          "function": {
            "name": "get_accessibility_tree",
            "arguments": "{\"filter\":\"visible\"}"
          }
        }
      ]
    },
    {
      "role": "tool",
      "tool_call_id": "call_1y_8fe5d0",
      "name": "get_accessibility_tree",
      "content": "{\"pageContent\":\"button \\\"Size: Large\\\" [ref_15]\\nbutton \\\"Add to Cart\\\" [ref_22]\"}"
    },
    {
      "role": "assistant",
      "content": "",
      "tool_calls": [
        {
          "id": "call_1z_90e5d2",
          "type": "function",
          "function": {
            "name": "click_ax",
            "arguments": "{\"ref_id\":\"ref_15\"}"
          }
        }
      ]
    },
    {
      "role": "tool",
      "tool_call_id": "call_1z_90e5d2",
      "name": "click_ax",
      "content": "{\"success\":true}"
    },
    {
      "role": "assistant",
      "content": "",
      "tool_calls": [
        {
          "id": "call_20_8de5cd",
          "type": "function",
          "function": {
            "name": "click_ax",
            "arguments": "{\"ref_id\":\"ref_22\"}"
          }
        }
      ]
    },
    {
      "role": "tool",
      "tool_call_id": "call_20_8de5cd",
      "name": "click_ax",
      "content": "{\"success\":false,\"error\":\"ref_id ref_22 not found in current accessibility tree.\"}"
    }
  ],
  "expected": {
    "idealNextToolCall": {
      "name": "get_accessibility_tree",
      "args": {
        "filter": "visible"
      }
    },
    "antiPatterns": [
      {
        "match": "click_ax({ref_id:\"ref_22\"})",
        "reason": "Tree invalidated after the size click triggered a re-render."
      },
      {
        "match": "click_ax({ref_id:\"ref_23\"})",
        "reason": "Adjacent guess."
      }
    ],
    "successRubric": "After clicks that may re-render (variant selection on product pages), re-read AX tree before subsequent ref_id-based actions."
  }
}