浏览器与电脑操作
基于Jev和agent-browser的快速受限浏览器agent,支持类型化操作、研究、分类和安全编排。
Fast, bounded browser agents powered by Jev and agent-browser — typed actions, research, classification, and safe orchestration.
const DEFAULT_ENDPOINT = 'https://api.typesafe.ai/v1/systemone';链接指向我们抓取当天的那个 commit,行号是准的。
下面是从这个项目源码里原样取出来的 question 组合。
operation选项Choose the next browser operation.
CLICK — Choose a current control, filter, menu, pagination link, or clearly requested content target. Prefer controls over content cards and do not repeat an already executed click.SCROLL_UP — Execute SCROLL_UP.SCROLL_DOWN — Execute SCROLL_DOWN.BACK — Execute BACK.WAIT — Execute WAIT.DONE — Execute DONE.click_target选项Choose the current browser ref targeted by the operation. Prefer exact filter/menu controls over similarly named result cards.
none_of_the_above — No current ref is an appropriate target.e1 — button/control/Gogoal_reached是/否Estimate whether the requested goal has been reached.
stuck是/否Estimate whether the browser agent is stuck.
import { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
operation: { type: 'choice', instructions: 'Choose the next browser operation.',
criteria: { CLICK: 'Choose a current control, filter, menu, pagination link, or clearly requested content target. Prefer controls over content cards and do not repeat an already executed click.', SCROLL_UP: 'Execute SCROLL_UP.', SCROLL_DOWN: 'Execute SCROLL_DOWN.', BACK: 'Execute BACK.', WAIT: 'Execute WAIT.', DONE: 'Execute DONE.' } },
click_target: { type: 'choice', instructions: 'Choose the current browser ref targeted by the operation. Prefer exact filter/menu controls over similarly named result cards.',
criteria: { none_of_the_above: 'No current ref is an appropriate target.', e1: 'button/control/Go' } },
goal_reached: { type: 'boolean', instructions: 'Estimate whether the requested goal has been reached.' },
stuck: { type: 'boolean', instructions: 'Estimate whether the browser agent is stuck.' },
},
});