Skip to content

Open-source AI coworkers that each get a computer of their own: a browser, files and tools, with every action decided before it happens and recorded after. Bring any AG-UI agent.

10.7 KB
Raw Blame
{
  "source": "The final CopilotKit-site run's run 4 (trajectory d28423b2, run-restart.ts): on the SSE app's learning deal page the person clicked Approve without the agent, Chrome's service worker was stopped 300 ms later (sw-stop.ts, CDP Target.closeTarget), then New thread, the chat box, typed a question and sent it. `steps` are the Recorder's rows 005 to 009 as the content script sent them (seq and the agent context the service worker adds left out); `pageAt` is when the page reached the deal page (row 004), `stoppedAt` the stop's mark, `runRequestAt` when the page asked for the run on the new Thread as the Recorder saw it (its thread.linked and agent.message, rows 010 and 011). `copilotKit` is what CopilotKit's own legacy sink stored for the same clicks and links.",
  "pageUrl": "http://127.0.0.1:7620/learning/deals/deal-1",
  "pageAt": 1792557068146.875,
  "stoppedAt": 1792557070983,
  "runRequestAt": 1792557079262,
  "steps": [
    {
      "name": "click",
      "type": "CUSTOM",
      "value": {
        "box": {
          "x": 24,
          "y": 149,
          "width": 187,
          "height": 34
        },
        "url": "http://127.0.0.1:7620/learning/deals/deal-1",
        "page": {
          "url": "http://127.0.0.1:7620/learning/deals/deal-1",
          "title": "Create Next App"
        },
        "step": "click",
        "route": "/learning/deals/deal-1",
        "target": {
          "tag": "button",
          "name": "Approve without the agent",
          "role": null,
          "text": "Approve without the agent",
          "input": "pointer",
          "label": "Approve without the agent",
          "action": "deal.approve",
          "ariaRole": "button",
          "attributes": {
            "type": "button",
            "class": "rounded bg-gray-900 px-3 py-1.5 text-sm text-white",
            "data-copilotkit-action": "deal.approve"
          }
        },
        "viewport": {
          "width": 1280,
          "height": 860
        },
        "selectors": [
          {
            "by": "role",
            "selector": "role=button[name=\"Approve without the agent\"]"
          },
          {
            "by": "text",
            "selector": "text=\"Approve without the agent\""
          },
          {
            "by": "css",
            "selector": "main > div > section:nth-of-type(1) > div > button:nth-of-type(1)"
          }
        ]
      },
      "timestamp": 1792557070680
    },
    {
      "name": "click",
      "type": "CUSTOM",
      "value": {
        "box": {
          "x": 116,
          "y": 149,
          "width": 98,
          "height": 34
        },
        "url": "http://127.0.0.1:7620/learning/deals/deal-1",
        "page": {
          "url": "http://127.0.0.1:7620/learning/deals/deal-1",
          "title": "Create Next App"
        },
        "step": "click",
        "route": "/learning/deals/deal-1",
        "target": {
          "tag": "button",
          "name": "New thread",
          "role": null,
          "text": "New thread",
          "input": "pointer",
          "label": "New thread",
          "action": "thread.new",
          "ariaRole": "button",
          "attributes": {
            "type": "button",
            "class": "rounded border px-3 py-1.5 text-sm",
            "data-copilotkit-action": "thread.new"
          }
        },
        "viewport": {
          "width": 1280,
          "height": 860
        },
        "selectors": [
          {
            "by": "role",
            "selector": "role=button[name=\"New thread\"]"
          },
          {
            "by": "text",
            "selector": "text=\"New thread\""
          },
          {
            "by": "css",
            "selector": "main > div > section:nth-of-type(1) > div > button:nth-of-type(2)"
          }
        ]
      },
      "timestamp": 1792557073655
    },
    {
      "name": "click",
      "type": "CUSTOM",
      "value": {
        "box": {
          "x": 749,
          "y": 349,
          "width": 404,
          "height": 48
        },
        "url": "http://127.0.0.1:7620/learning/deals/deal-1",
        "page": {
          "url": "http://127.0.0.1:7620/learning/deals/deal-1",
          "title": "Create Next App"
        },
        "step": "click",
        "route": "/learning/deals/deal-1",
        "target": {
          "tag": "textarea",
          "name": "Type a message...",
          "role": null,
          "text": "",
          "input": "pointer",
          "value": "",
          "action": null,
          "ariaRole": "textbox",
          "inputType": "textarea",
          "attributes": {
            "rows": "1",
            "class": "cpk:bg-transparent cpk:outline-none cpk:antialiased cpk:font-regular cpk:text-[16px] cpk:placeholder:text-[#00000077] cpk:dark:placeholder:text-[#fffc] cpk:w-full cpk:py-3 cpk:pr-5",
            "style": "overflow: auto; resize: none; max-height: 144px; height: 48px;",
            "data-testid": "copilot-chat-textarea",
            "placeholder": "Type a message..."
          }
        },
        "viewport": {
          "width": 1280,
          "height": 860
        },
        "selectors": [
          {
            "by": "testid",
            "selector": "[data-testid=\"copilot-chat-textarea\"]"
          },
          {
            "by": "role",
            "selector": "role=textbox[name=\"Type a message...\"]"
          },
          {
            "by": "css",
            "selector": "[data-testid=\"copilot-chat-input\"] > div > div:nth-of-type(2) > textarea"
          }
        ]
      },
      "timestamp": 1792557076177
    },
    {
      "name": "input",
      "type": "CUSTOM",
      "value": {
        "box": {
          "x": 697,
          "y": 325,
          "width": 514,
          "height": 48
        },
        "url": "http://127.0.0.1:7620/learning/deals/deal-1",
        "page": {
          "url": "http://127.0.0.1:7620/learning/deals/deal-1",
          "title": "Create Next App"
        },
        "step": "input",
        "route": "/learning/deals/deal-1",
        "target": {
          "tag": "textarea",
          "name": "Type a message...",
          "role": null,
          "text": "What is this deal's payment record? Answer in one sentence",
          "value": "What is this deal's payment record? Answer in one sentence.",
          "action": null,
          "ariaRole": "textbox",
          "inputType": "textarea",
          "attributes": {
            "rows": "1",
            "class": "cpk:bg-transparent cpk:outline-none cpk:antialiased cpk:font-regular cpk:text-[16px] cpk:placeholder:text-[#00000077] cpk:dark:placeholder:text-[#fffc] cpk:w-full cpk:py-3 cpk:px-5",
            "style": "overflow: auto; resize: none; max-height: 144px; height: 48px;",
            "data-testid": "copilot-chat-textarea",
            "placeholder": "Type a message..."
          }
        },
        "viewport": {
          "width": 1280,
          "height": 860
        },
        "eventType": "input",
        "selectors": [
          {
            "by": "testid",
            "selector": "[data-testid=\"copilot-chat-textarea\"]"
          },
          {
            "by": "role",
            "selector": "role=textbox[name=\"Type a message...\"]"
          },
          {
            "by": "css",
            "selector": "[data-testid=\"copilot-chat-input\"] > div > div:nth-of-type(2) > textarea"
          }
        ]
      },
      "timestamp": 1792557078891
    },
    {
      "name": "click",
      "type": "CUSTOM",
      "value": {
        "box": {
          "x": 1165,
          "y": 386,
          "width": 36,
          "height": 36
        },
        "url": "http://127.0.0.1:7620/learning/deals/deal-1",
        "page": {
          "url": "http://127.0.0.1:7620/learning/deals/deal-1",
          "title": "Create Next App"
        },
        "step": "click",
        "route": "/learning/deals/deal-1",
        "target": {
          "tag": "button",
          "name": "Send message",
          "role": null,
          "text": "",
          "input": "pointer",
          "label": "Send message",
          "action": null,
          "ariaRole": "button",
          "attributes": {
            "type": "button",
            "class": "cpk:inline-flex cpk:items-center cpk:justify-center cpk:gap-2 cpk:whitespace-nowrap cpk:text-sm cpk:font-medium cpk:disabled:pointer-events-none cpk:disabled:opacity-50 cpk:[&_svg]:pointer-events-none cpk:[&_svg:not([class*='size-'])]:size-4 cpk:shrink-0 cpk:[&_svg]:shrink-0 cpk:outline-none cpk:focus-visible:border-ring cpk:focus-visible:ring-ring/50 cpk:focus-visible:ring-[3px] cpk:aria-invalid:ring-destructive/20 cpk:dark:aria-invalid:ring-destructive/40 cpk:aria-invalid:border-destructive cpk:cursor-pointer cpk:bg-black cpk:text-white cpk:dark:bg-white cpk:dark:text-black cpk:dark:focus-visible:outline-white cpk:transition-colors cpk:focus:outline-none cpk:hover:opacity-70 cpk:disabled:hover:opacity-100 cpk:disabled:cursor-not-allowed cpk:disabled:bg-[#00000014] cpk:disabled:text-[rgb(13,13,13)] cpk:dark:disabled:bg-[#454545] cpk:dark:disabled:text-white cpk:h-9 cpk:w-9 cpk:rounded-full",
            "data-slot": "button",
            "aria-label": "Send message",
            "data-testid": "copilot-send-button"
          }
        },
        "viewport": {
          "width": 1280,
          "height": 860
        },
        "selectors": [
          {
            "by": "testid",
            "selector": "[data-testid=\"copilot-send-button\"]"
          },
          {
            "by": "role",
            "selector": "role=button[name=\"Send message\"]"
          },
          {
            "by": "css",
            "selector": "[data-testid=\"copilot-chat-input\"] > div > div:nth-of-type(3) > div > button"
          }
        ]
      },
      "timestamp": 1792557079240
    }
  ],
  "copilotKit": [
    {
      "name": "click",
      "timestamp": 1792557067834,
      "label": "Open",
      "threadId": null
    },
    {
      "name": "thread.linked",
      "timestamp": 1792557068152,
      "label": null,
      "threadId": "9d025016-030d-4a06-a1b1-4d0e34fcaf7f",
      "reason": "open"
    },
    {
      "name": "click",
      "timestamp": 1792557070681,
      "label": "Approve without the agent",
      "threadId": "9d025016-030d-4a06-a1b1-4d0e34fcaf7f"
    },
    {
      "name": "click",
      "timestamp": 1792557073655,
      "label": "New thread",
      "threadId": "9d025016-030d-4a06-a1b1-4d0e34fcaf7f"
    },
    {
      "name": "thread.linked",
      "timestamp": 1792557073659,
      "label": null,
      "threadId": "6cc16ede-2515-4dbc-bbce-16512ff2fbd6",
      "reason": "switch"
    },
    {
      "name": "click",
      "timestamp": 1792557076177,
      "label": null,
      "threadId": "6cc16ede-2515-4dbc-bbce-16512ff2fbd6"
    },
    {
      "name": "click",
      "timestamp": 1792557079241,
      "label": "Send message",
      "threadId": "6cc16ede-2515-4dbc-bbce-16512ff2fbd6"
    }
  ]
}