Skip to content

agent using agent-browser skill is constantly using eval to get simple text from the page instead of just reading the text of the body #1081

@Vasiliy-Bondarenko

Description

@Vasiliy-Bondarenko

i have tried a few times and agent is always preferring evals over simple "get text body". that's annoying and it is not always successful. it is doing something like this:

# Extract FAQ section text
$ agent-browser eval --stdin <<'EVALEOF'
(() => {
  const h2 = Array.from(document.querySelectorAll('h2')).find(el => el.textContent.trim() === 'Частые вопросы');
  if (!h2) return 'FAQ section not found';
  const section = h2.parentElement?.parentElement || h2.parentElement;
  return section ? section.innerText : h2.parentElement?.innerText;
})()
EVALEOF

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions