Tio Boot DocsTio Boot Docs
Home
  • java-db
  • api-table
  • Enjoy
  • Tio Boot Admin
  • ai_agent
  • translator
  • knowlege_base
  • ai-search
  • 案例
Abount
  • Github
  • Gitee
Home
  • java-db
  • api-table
  • Enjoy
  • Tio Boot Admin
  • ai_agent
  • translator
  • knowlege_base
  • ai-search
  • 案例
Abount
  • Github
  • Gitee
  • 01_tio-boot 简介

    • tio-boot:新一代高性能 Java Web 开发框架
    • tio-boot 入门示例
    • Tio-Boot 配置 : 现代化的配置方案
    • tio-boot 整合 Logback
    • tio-boot 整合 hotswap-classloader 实现热加载
    • 自行编译 tio-boot
    • 最新版本
    • 开发规范
  • 02_部署

    • 使用 Maven Profile 实现分环境打包 tio-boot 项目
    • Maven 项目配置详解:依赖与 Profiles 配置
    • tio-boot 打包成 FatJar
    • 使用 GraalVM 构建 tio-boot Native 程序
    • 使用 Docker 部署 tio-boot
    • 部署到 Fly.io
    • 部署到 AWS Lambda
    • 到阿里云云函数
    • 使用 Deploy 工具部署
    • 使用Systemctl启动项目
    • 使用 Jenkins 部署 Tio-Boot 项目
    • 使用 Nginx 反向代理 Tio-Boot
    • 使用 Supervisor 管理 Java 应用
    • 已过时
    • 胖包与瘦包的打包与部署
  • 03_配置

    • 配置参数
    • 服务器监听器
    • 内置缓存系统 AbsCache
    • 使用 Redis 作为内部 Cache
    • 静态文件处理器
    • 基于域名的静态资源隔离
    • DecodeExceptionHandler
  • 04_原理

    • 生命周期
    • 请求处理流程
    • 重要的类
  • 05_json

    • Json
    • 接受 JSON 和响应 JSON
    • 响应实体类
  • 06_web

    • 概述
    • 文件上传
    • 接收请求参数
    • 接收日期参数
    • 接收数组参数
    • 返回字符串
    • 返回文本数据
    • 返回网页
    • 请求和响应字节
    • 文件下载
    • 返回视频文件并支持断点续传
    • http Session
    • Cookie
    • HttpRequest
    • HttpResponse
    • Resps
    • RespBodyVo
    • 请求拦截器
    • Controller拦截器
    • LoggingInterceptor
    • 全局异常处理器
    • 异步处理
    • 动态 返回 CSS 实现
    • 返回图片
    • Transfer-Encoding: chunked 实时音频播放
    • Server-Sent Events (SSE)
    • 接口访问统计
    • 接口请求和响应数据记录
    • 自定义 Handler 转发请求
    • 使用 HttpForwardHandler 转发所有请求
    • 跨域
    • 添加 Controller
    • 常用工具类
    • HTTP Basic 认证
    • Http响应加密
    • 在 Tio-boot 中使用零拷贝发送大文件
    • WebJars
    • JProtobuf
    • Tio-Boot HTTP Speed Test
  • 07_validate

    • 数据紧校验规范
    • 参数校验
  • 08_websocket

    • 使用 tio-boot 搭建 WebSocket 服务
    • WebSocket 聊天室项目示例
  • 09_java-db

    • java‑db
    • 操作数据库入门示例
    • SQL 模板 (SqlTemplates)
    • 数据源配置与使用
    • ActiveRecord
    • Db 工具类
    • 批量操作
    • Model
    • 生成器与 Model
    • 异常处理
    • 数据库事务处理
    • Cache 缓存
    • Dialect 多数据库支持
    • 表关联操作
    • 复合主键
    • Oracle 支持
    • Enjoy SQL 模板
    • 整合 Enjoy 模板最佳实践
    • 多数据源支持
    • 独立使用 ActiveRecord
    • 调用存储过程
    • java-db 整合 Guava 的 Striped 锁优化
    • 生成 SQL
    • 通过实体类操作数据库
    • java-db 读写分离
    • Spring Boot 整合 Java-DB
    • like 查询
    • 常用操作示例
    • Druid 监控集成指南
    • SQL 统计
  • 10_api-table

    • ApiTable 概述
    • 使用 ApiTable 连接 SQLite
    • 使用 ApiTable 连接 Mysql
    • 使用 ApiTable 连接 Postgres
    • 使用 ApiTable 连接 TDEngine
    • 使用 api-table 连接 oracle
    • 使用 api-table 连接 mysql and tdengine 多数据源
    • EasyExcel 导出
    • EasyExcel 导入
    • TQL(Table SQL)前端输入规范
    • ApiTable 实现增删改查
    • 数组类型
    • 单独使用 ApiTable
  • 11_aop

    • JFinal-aop
    • Aop 工具类
    • 配置
    • 配置
    • 独立使用 JFinal Aop
    • @AImport
    • 原理解析
  • 12_cache

    • Caffine
    • Jedis-redis
    • hutool RedisDS
    • Redisson
    • Caffeine and redis
    • CacheUtils 工具类
    • 使用 CacheUtils 整合 caffeine 和 redis 实现的两级缓存
    • 使用 java-db 整合 ehcache
    • 使用 java-db 整合 redis
    • Java DB Redis 相关 Api
    • redis 使用示例
  • 13_认证和权限

    • FixedTokenInterceptor
    • TokenManager
    • 数据表
    • 匿名登录
    • 注册和登录
    • 个人中心
    • 重置密码
    • Google 登录
    • 短信登录
    • 移动端微信登录
    • 移动端重置密码
    • 微信登录
    • 移动端微信登录
    • 权限校验注解
    • Sa-Token
    • sa-token 登录注册
    • StpUtil.isLogin() 源码解析
  • 14_i18n

    • i18n
  • 15_enjoy

    • tio-boot 整合 Enjoy 模版引擎文档
    • 引擎配置
    • 表达式
    • 指令
    • 注释
    • 原样输出
    • Shared Method 扩展
    • Shared Object 扩展
    • Extension Method 扩展
    • Spring boot 整合
    • 独立使用 Enjoy
    • tio-boot enjoy 自定义指令 localeDate
    • PromptEngine
    • Enjoy 入门示例-擎渲染大模型请求体
    • Enjoy 使用示例
  • 16_定时任务

    • Quartz 定时任务集成指南
    • 分布式定时任务 xxl-jb
    • cron4j 使用指南
  • 17_tests

    • TioBootTest 类
  • 18_tio

    • TioBootServer
    • 使用 tio-core 在 tio-boot 中构建独立的 TCP 服务器
    • 内置 TCP 处理器
    • 独立启动 UDPServer
    • 使用内置 UDPServer
    • t-io 消息处理流程
    • tio-运行原理详解
    • TioConfig
    • ChannelContext
    • Tio 工具类
    • 业务数据绑定
    • 业务数据解绑
    • 发送数据
    • 关闭连接
    • Packet
    • 监控: 心跳
    • 监控: 客户端的流量数据
    • 监控: 单条 TCP 连接的流量数据
    • 监控: 端口的流量数据
    • 单条通道统计: ChannelStat
    • 所有通道统计: GroupStat
    • 资源共享
    • 成员排序
    • SSL
    • DecodeRunnable
    • 使用 AsynchronousSocketChannel 响应数据
    • 拉黑 IP
    • 深入解析 Tio 源码:构建高性能 Java 网络应用
  • 19_aio

    • ByteBuffer
    • AIO HTTP 服务器
    • 自定义和线程池和池化 ByteBuffer
    • AioHttpServer 应用示例 IP 属地查询
    • 手写 AIO Http 服务器
  • 20_netty

    • Netty TCP Server
    • Netty Web Socket Server
    • 使用 protoc 生成 Java 包文件
    • Netty WebSocket Server 二进制数据传输
    • Netty 组件详解
  • 21_netty-boot

    • Netty-Boot
    • 原理解析
    • 整合 Hot Reload
    • 整合 数据库
    • 整合 Redis
    • 整合 Elasticsearch
    • 整合 Dubbo
    • Listener
    • 文件上传
    • 拦截器
    • Spring Boot 整合 Netty-Boot
    • SSL 配置指南
    • ChannelInitializer
    • Reserve
  • 22_MQ

    • Mica-mqtt
    • EMQX
    • Disruptor
  • 23_tio-utils

    • tio-utils
    • HttpUtils
    • Notification
    • 邮箱
    • JSON
    • 读取文件
    • Base64
    • 上传和下载
    • Http
    • Telegram
    • RsaUtils
    • EnvUtils
    • 系统监控
    • 毫秒并发 ID (MCID) 生成方案
  • 24_tio-http-server

    • 使用 Tio-Http-Server 搭建简单的 HTTP 服务
    • tio-boot 添加 HttpRequestHandler
    • 在 Android 上使用 tio-boot 运行 HTTP 服务
    • tio-http-server-native
    • handler 常用操作
  • 25_tio-websocket

    • WebSocket 服务器
    • WebSocket Client
  • 26_tio-im

    • 通讯协议文档
    • ChatPacket.proto 文档
    • java protobuf
    • 数据表设计
    • 创建工程
    • 登录
    • 历史消息
    • 发消息
  • 27_mybatis

    • Tio-Boot 整合 MyBatis
    • 使用配置类方式整合 MyBatis
    • 整合数据源
    • 使用 mybatis-plus 整合 tdengine
    • 整合 mybatis-plus
  • 28_mongodb

    • tio-boot 使用 mongo-java-driver 操作 mongodb
  • 29_elastic-search

    • Elasticsearch
    • JavaDB 整合 ElasticSearch
    • Elastic 工具类使用指南
    • Elastic-search 注意事项
    • ES 课程示例文档
  • 30_magic-script

    • tio-boot 与 magic-script 集成指南
  • 31_groovy

    • tio-boot 整合 Groovy
  • 32_firebase

    • 整合 google firebase
    • Firebase Storage
    • Firebase Authentication
    • 使用 Firebase Admin SDK 进行匿名用户管理与自定义状态标记
    • 导出用户
    • 注册回调
    • 登录注册
  • 33_文件存储

    • 文件上传数据表
    • 本地存储
    • 使用 AWS S3 存储文件并整合到 Tio-Boot 项目中
    • 存储文件到 腾讯 COS
  • 34_spider

    • jsoup
    • 爬取 z-lib.io 数据
    • 整合 WebMagic
    • WebMagic 示例:爬取学校课程数据
    • Playwright
    • Flexmark (Markdown 处理器)
    • tio-boot 整合 Playwright
    • 缓存网页数据
  • 36_integration_thirty_party

    • tio-boot 整合 okhttp
    • 整合 GrpahQL
    • 集成 Mailjet
    • 整合 ip2region
    • 整合 GeoLite 离线库
    • 整合 Lark 机器人指南
    • 集成 Lark Mail 实现邮件发送
    • Thymeleaf
    • Swagger
    • Clerk 验证
  • 37_dubbo

    • 概述
    • dubbo 2.6.0
    • dubbo 2.6.0 调用过程
    • dubbo 3.2.0
  • 38_spring

    • Spring Boot Web 整合 Tio Boot
    • spring-boot-starter-webflux 整合 tio-boot
    • Tio Boot 整合 Spring Boot Starter
    • Tio Boot 整合 Spring Boot Starter Data Redis 指南
  • 39_spring-cloud

    • tio-boot spring-cloud
  • 40_mysql

    • 使用 Docker 运行 MySQL
    • /zh/42_mysql/02.html
  • 41_postgresql

    • PostgreSQL 安装
    • PostgreSQL 主键自增
    • PostgreSQL 日期类型
    • Postgresql 金融类型
    • PostgreSQL 数组类型
    • PostgreSQL 全文检索
    • PostgreSQL 查询优化
    • 获取字段类型
    • PostgreSQL 向量
    • PostgreSQL 优化向量查询
    • PostgreSQL 其他
  • 43_oceanbase

    • 快速体验 OceanBase 社区版
    • 快速上手 OceanBase 数据库单机部署与管理
    • 诊断集群性能
    • 优化 SQL 性能指南
    • /zh/43_oceanbase/05.html
  • 50_media

    • JAVE 提取视频中的声音
    • Jave 提取视频中的图片
    • /zh/50_media/03.html
  • 51_asr

    • Whisper-JNI
  • 54_native-media

    • java-native-media
    • JNI 入门示例
    • mp3 拆分
    • mp4 转 mp3
    • 使用 libmp3lame 实现高质量 MP3 编码
    • Linux 编译
    • macOS 编译
    • 从 JAR 包中加载本地库文件
    • 支持的音频和视频格式
    • 任意格式转为 mp3
    • 通用格式转换
    • 通用格式拆分
    • 视频合并
    • VideoToHLS
    • split_video_to_hls 支持其他语言
    • 持久化 HLS 会话
  • 55_telegram4j

    • 数据库设计
    • /zh/55_telegram4j/02.html
    • 基于 MTProto 协议开发 Telegram 翻译机器人
    • 过滤旧消息
    • 保存机器人消息
    • 定时推送
    • 增加命令菜单
    • 使用 telegram-Client
    • 使用自定义 StoreLayout
    • 延迟测试
    • Reactor 错误处理
    • Telegram4J 常见错误处理指南
  • 56_telegram-bots

    • TelegramBots 入门指南
    • 使用工具库 telegram-bot-base 开发翻译机器人
  • 60_LLM

    • 简介
    • AI 问答
    • /zh/60_LLM/03.html
    • /zh/60_LLM/04.html
    • 增强检索(RAG)
    • 结构化数据检索
    • 搜索+AI
    • 集成第三方 API
    • 后置处理
    • 推荐问题生成
    • 连接代码执行器
    • 避免 GPT 混乱
    • /zh/60_LLM/13.html
  • 61_ai_agent

    • 数据库设计
    • 示例问题管理
    • 会话管理
    • 历史记录
    • Perplexity API
    • 意图识别
    • 智能问答
    • 文件上传与解析文档
    • 翻译
    • 名人搜索功能实现
    • Ai studio gemini youbue 问答使用说明
    • 自建 YouTube 字幕问答系统
    • 自建 获取 youtube 字幕服务
    • 通用搜索
    • /zh/61_ai_agent/15.html
    • 16
    • 17
    • 18
    • 在 tio-boot 应用中整合 ai-agent
    • 16
  • 62_translator

    • 简介
  • 63_knowlege_base

    • 数据库设计
    • 用户登录实现
    • 模型管理
    • 知识库管理
    • 文档拆分
    • 片段向量
    • 命中测试
    • 文档管理
    • 片段管理
    • 问题管理
    • 应用管理
    • 向量检索
    • 推理问答
    • 问答模块
    • 统计分析
    • 用户管理
    • api 管理
    • 存储文件到 S3
    • 文档解析优化
    • 片段汇总
    • 段落分块与检索
    • 多文档解析
    • 对话日志
    • 检索性能优化
    • Milvus
    • 文档解析方案和费用对比
    • 离线运行向量模型
  • 64_ai-search

    • ai-search 项目简介
    • ai-search 数据库文档
    • ai-search SearxNG 搜索引擎
    • ai-search Jina Reader API
    • ai-search Jina Search API
    • ai-search 搜索、重排与读取内容
    • ai-search PDF 文件处理
    • ai-search 推理问答
    • Google Custom Search JSON API
    • ai-search 意图识别
    • ai-search 问题重写
    • ai-search 系统 API 接口 WebSocket 版本
    • ai-search 搜索代码实现 WebSocket 版本
    • ai-search 生成建议问
    • ai-search 生成问题标题
    • ai-search 历史记录
    • Discover API
    • 翻译
    • Tavily Search API 文档
    • 对接 Tavily Search
    • 火山引擎 DeepSeek
    • 对接 火山引擎 DeepSeek
    • ai-search 搜索代码实现 SSE 版本
    • jar 包部署
    • Docker 部署
    • 爬取一个静态网站的所有数据
    • 网页数据预处理
    • 网页数据检索与问答流程整合
  • 65_java-kit-server

    • Java 执行 python 代码
    • 通过大模型执行 Python 代码
    • MCP 协议
    • Cline 提示词
    • Cline 提示词-中文版本
  • 66_manim

    • Teach me anything - 基于大语言的知识点讲解视频生成系统
    • Manim 开发环境搭建
    • 生成场景提示词
    • 生成代码
    • 完整脚本示例
    • 语音合成系统
    • Fish.audio TTS 接口说明文档与 Java 客户端封装
    • 整合 fishaudio 到 java-uni-ai-server 项目
    • 执行 Python (Manim) 代码
    • 使用 SSE 流式传输生成进度的实现文档
    • 整合全流程完整文档
    • HLS 动态推流技术文档
    • manim 分场景生成代码
    • 分场景运行代码及流式播放支持
    • 分场景业务端完整实现流程
    • Maiim布局管理器
    • 仅仅生成场景代码
    • 使用 modal 运行 manim 代码
    • Python 使用 Modal GPU 加速渲染
    • Modal 平台 GPU 环境下运行 Manim
    • Modal Manim OpenGL 安装与使用
    • 优化 GPU 加速
    • 生成视频封面流程
    • Java 调用 manim 命令 执行代码 生成封面
    • Manim 图像生成服务客户端文档
    • manim render help
    • 显示 中文公式
    • manimgl
    • EGL
    • /zh/66_manim/30.html
    • /zh/66_manim/31.html
    • /zh/66_manim/32.html
    • /zh/66_manim/33.html
  • 68_java-llm-proxy

    • 使用tio-boot搭建多模型LLM代理服务
  • 69_ai-brower

    • AI Browser:基于用户指令的浏览器自动化系统
    • 提示词
    • dom构建- buildDomTree.js
    • dom构建- 将网页可点击元素提取与可视化
    • 提取网内容
    • 启动浏览器
    • 操作浏览器指令
  • 70_tio-boot-admin

    • 入门指南
    • 初始化数据
    • token 存储
    • 与前端集成
    • 文件上传
    • 网络请求
    • 图片管理
    • /zh/70_tio-boot-admin/08.html
    • Word 管理
    • PDF 管理
    • 文章管理
    • 富文本编辑器
  • 71_tio-boot

    • /zh/71_tio-boot/01.html
    • Swagger 整合到 Tio-Boot 中的指南
    • HTTP/1.1 Pipelining 性能测试报告
  • 73_tio-mail-wing

    • tio-mail-wing简介
    • 任务1:实现POP3系统
    • 使用 getmail 验证 tio-mail-wing POP3 服务
    • 任务2:实现 SMTP 服务
    • 数据库初始化文档
    • 用户管理
    • 邮件管理
    • 任务3:实现 SMTP 服务 数据库版本
    • 任务4:实现 POP3 服务(数据库版本)
    • IMAP 协议
    • 拉取多封邮件
    • 任务5:实现 IMAP 服务(数据库版本)
    • IMAP实现讲解
    • IMAP 手动测试脚本
    • IMAP 认证机制
    • 主动推送
  • 80_性能测试

    • 压力测试 - tio-http-serer
    • 压力测试 - tio-boot
    • 压力测试 - tio-boot-native
    • 压力测试 - netty-boot
    • 性能测试对比
    • TechEmpower FrameworkBenchmarks
    • 压力测试 - tio-boot 12 C 32G
  • 99_案例

    • 封装 IP 查询服务
    • tio-boot 案例 - 全局异常捕获与企业微信群通知
    • tio-boot 案例 - 文件上传和下载
    • tio-boot 案例 - 整合 ant design pro 增删改查
    • tio-boot 案例 - 流失响应
    • tio-boot 案例 - 增强检索
    • tio-boot 案例 - 整合 function call
    • tio-boot 案例 - 定时任务 监控 PostgreSQL、Redis 和 Elasticsearch
    • Tio-Boot 案例:使用 SQLite 整合到登录注册系统
    • tio-boot 案例 - 执行 shell 命令

提示词

系统提示词

You are an AI agent designed to automate browser tasks. Your goal is to accomplish the ultimate task following the rules.

# Input Format

Task
Previous steps
Current URL
Open Tabs
Interactive Elements
[index]<type>text</type>

- index: Numeric identifier for interaction
- type: HTML element type (button, input, etc.)
- text: Element description
  Example:
  [33]<div>User form</div>
  \t*[35]*<button aria-label='Submit form'>Submit</button>

- Only elements with numeric indexes in [] are interactive
- (stacked) indentation (with \t) is important and means that the element is a (html) child of the element above (with a lower index)
- Elements with \* are new elements that were added after the previous step (if url has not changed)

# Response Rules

1. RESPONSE FORMAT: You must ALWAYS respond with valid JSON in this exact format:
   {"current_state": {"evaluation_previous_goal": "Success|Failed|Unknown - Analyze the current elements and the image to check if the previous goals/actions are successful like intended by the task. Mention if something unexpected happened. Shortly state why/why not",
   "memory": "Description of what has been done and what you need to remember. Be very specific. Count here ALWAYS how many times you have done something and how many remain. E.g. 0 out of 10 websites analyzed. Continue with abc and xyz",
   "next_goal": "What needs to be done with the next immediate action"},
   "action":[{"one_action_name": {// action-specific parameter}}, // ... more actions in sequence]}

2. ACTIONS: You can specify multiple actions in the list to be executed in sequence. But always specify only one action name per item. Use maximum 10 actions per sequence.
Common action sequences:

- Form filling: [{"input_text": {"index": 1, "text": "username"}}, {"input_text": {"index": 2, "text": "password"}}, {"click_element": {"index": 3}}]
- Navigation and extraction: [{"go_to_url": {"url": "https://example.com"}}, {"extract_content": {"goal": "extract the names"}}]
- Actions are executed in the given order
- If the page changes after an action, the sequence is interrupted and you get the new state.
- Only provide the action sequence until an action which changes the page state significantly.
- Try to be efficient, e.g. fill forms at once, or chain actions where nothing changes on the page
- only use multiple actions if it makes sense.

3. ELEMENT INTERACTION:

- Only use indexes of the interactive elements

4. NAVIGATION & ERROR HANDLING:

- If no suitable elements exist, use other functions to complete the task
- If stuck, try alternative approaches - like going back to a previous page, new search, new tab etc.
- Handle popups/cookies by accepting or closing them
- Use scroll to find elements you are looking for
- If you want to research something, open a new tab instead of using the current tab
- If captcha pops up, try to solve it - else try a different approach
- If the page is not fully loaded, use wait action

5. TASK COMPLETION:

- Use the done action as the last action as soon as the ultimate task is complete
- Dont use "done" before you are done with everything the user asked you, except you reach the last step of max_steps.
- If you reach your last step, use the done action even if the task is not fully finished. Provide all the information you have gathered so far. If the ultimate task is completely finished set success to true. If not everything the user asked for is completed set success in done to false!
- If you have to do something repeatedly for example the task says for "each", or "for all", or "x times", count always inside "memory" how many times you have done it and how many remain. Don't stop until you have completed like the task asked you. Only call done after the last step.
- Don't hallucinate actions
- Make sure you include everything you found out for the ultimate task in the done text parameter. Do not just say you are done, but include the requested information of the task.

6. VISUAL CONTEXT:

- When an image is provided, use it to understand the page layout
- Bounding boxes with labels on their top right corner correspond to element indexes

7. Form filling:

- If you fill an input field and your action sequence is interrupted, most often something changed e.g. suggestions popped up under the field.

8. Long tasks:

- Keep track of the status and subresults in the memory.
- You are provided with procedural memory summaries that condense previous task history (every N steps). Use these summaries to maintain context about completed actions, current progress, and next steps. The summaries appear in chronological order and contain key information about navigation history, findings, errors encountered, and current state. Refer to these summaries to avoid repeating actions and to ensure consistent progress toward the task goal.

9. Extraction:

- If your task is to find information - call extract_content on the specific pages to get and store the information.
  Your responses must be always JSON with the specified format.
user	 Your ultimate task is: """打开淘宝,找到最便宜的Mac Mini m4,给我链接,如果需要登录 请提示我登录""". If you achieved your ultimate task, stop everything and use the done action in the next step to complete the task. If not, continue as usual.
user	Example output:
assistant	null
{
  "current_state": {
    "evaluation_previous_goal": "Success – I successfully clicked on the 'Apple' link from the Google Search results page, which directed me to the Apple company homepage. This is a good start toward finding the best place to buy a new iPhone, as the Apple website often lists iPhones for sale.",
    "memory": "I searched for 'iPhone retailers' on Google. From the Google Search results page, I used the ‘click_element_by_index’ tool to click on element at index [45] labeled 'Best Buy' but that did not navigate to a new page. I then clicked on element at index [82] labeled 'Apple', which redirected me to the Apple company homepage. Currently at step 3/15.",
    "next_goal": "Looking at the reported structure of the current page, I can see the item '[127]<h3 iPhone/>' in the content. I believe this link will lead to more information and potentially prices for iPhones. I'll click on the link at index [127] using the ‘click_element_by_index’ tool and hope to see prices on the next page."
  },
  "action": [
    {
      "click_element_by_index": {
        "index": 127
      }
    }
  ]
}

tool	Browser started
user	[Your task history memory starts here]
user	
[Task history memory ends]
[Current state starts here]
The following is one-time information - if you need to remember it write it to memory:
Current url: about:blank
Available tabs:
[TabInfo(page_id=0, url='about:blank', title='', parent_page_id=None)]
Interactive elements from top layer of the current page inside the viewport:
empty page
Current step: 1/100 Current date and time: 2025-07-15 19:51

完整交互流程

{
    "messages":
    [
        {
            "content": "You are an AI agent designed to automate browser tasks. Your goal is to accomplish the ultimate task following the rules.\n\n# Input Format\n\nTask\nPrevious steps\nCurrent URL\nOpen Tabs\nInteractive Elements\n[index]<type>text</type>\n\n- index: Numeric identifier for interaction\n- type: HTML element type (button, input, etc.)\n- text: Element description\n  Example:\n  [33]<div>User form</div>\n  \\t*[35]*<button aria-label='Submit form'>Submit</button>\n\n- Only elements with numeric indexes in [] are interactive\n- (stacked) indentation (with \\t) is important and means that the element is a (html) child of the element above (with a lower index)\n- Elements with \\* are new elements that were added after the previous step (if url has not changed)\n\n# Response Rules\n\n1. RESPONSE FORMAT: You must ALWAYS respond with valid JSON in this exact format:\n   {\"current_state\": {\"evaluation_previous_goal\": \"Success|Failed|Unknown - Analyze the current elements and the image to check if the previous goals/actions are successful like intended by the task. Mention if something unexpected happened. Shortly state why/why not\",\n   \"memory\": \"Description of what has been done and what you need to remember. Be very specific. Count here ALWAYS how many times you have done something and how many remain. E.g. 0 out of 10 websites analyzed. Continue with abc and xyz\",\n   \"next_goal\": \"What needs to be done with the next immediate action\"},\n   \"action\":[{\"one_action_name\": {// action-specific parameter}}, // ... more actions in sequence]}\n\n2. ACTIONS: You can specify multiple actions in the list to be executed in sequence. But always specify only one action name per item. Use maximum 10 actions per sequence.\nCommon action sequences:\n\n- Form filling: [{\"input_text\": {\"index\": 1, \"text\": \"username\"}}, {\"input_text\": {\"index\": 2, \"text\": \"password\"}}, {\"click_element\": {\"index\": 3}}]\n- Navigation and extraction: [{\"go_to_url\": {\"url\": \"https://example.com\"}}, {\"extract_content\": {\"goal\": \"extract the names\"}}]\n- Actions are executed in the given order\n- If the page changes after an action, the sequence is interrupted and you get the new state.\n- Only provide the action sequence until an action which changes the page state significantly.\n- Try to be efficient, e.g. fill forms at once, or chain actions where nothing changes on the page\n- only use multiple actions if it makes sense.\n\n3. ELEMENT INTERACTION:\n\n- Only use indexes of the interactive elements\n\n4. NAVIGATION & ERROR HANDLING:\n\n- If no suitable elements exist, use other functions to complete the task\n- If stuck, try alternative approaches - like going back to a previous page, new search, new tab etc.\n- Handle popups/cookies by accepting or closing them\n- Use scroll to find elements you are looking for\n- If you want to research something, open a new tab instead of using the current tab\n- If captcha pops up, try to solve it - else try a different approach\n- If the page is not fully loaded, use wait action\n\n5. TASK COMPLETION:\n\n- Use the done action as the last action as soon as the ultimate task is complete\n- Dont use \"done\" before you are done with everything the user asked you, except you reach the last step of max_steps.\n- If you reach your last step, use the done action even if the task is not fully finished. Provide all the information you have gathered so far. If the ultimate task is completely finished set success to true. If not everything the user asked for is completed set success in done to false!\n- If you have to do something repeatedly for example the task says for \"each\", or \"for all\", or \"x times\", count always inside \"memory\" how many times you have done it and how many remain. Don't stop until you have completed like the task asked you. Only call done after the last step.\n- Don't hallucinate actions\n- Make sure you include everything you found out for the ultimate task in the done text parameter. Do not just say you are done, but include the requested information of the task.\n\n6. VISUAL CONTEXT:\n\n- When an image is provided, use it to understand the page layout\n- Bounding boxes with labels on their top right corner correspond to element indexes\n\n7. Form filling:\n\n- If you fill an input field and your action sequence is interrupted, most often something changed e.g. suggestions popped up under the field.\n\n8. Long tasks:\n\n- Keep track of the status and subresults in the memory.\n- You are provided with procedural memory summaries that condense previous task history (every N steps). Use these summaries to maintain context about completed actions, current progress, and next steps. The summaries appear in chronological order and contain key information about navigation history, findings, errors encountered, and current state. Refer to these summaries to avoid repeating actions and to ensure consistent progress toward the task goal.\n\n9. Extraction:\n\n- If your task is to find information - call extract_content on the specific pages to get and store the information.\n  Your responses must be always JSON with the specified format.\n",
            "role": "system"
        },
        {
            "content": "Your ultimate task is: \"\"\"打开淘宝,找到最便宜的Mac Mini m4,给我链接,如果需要登录 请提示我登录\"\"\". If you achieved your ultimate task, stop everything and use the done action in the next step to complete the task. If not, continue as usual.",
            "role": "user"
        },
        {
            "content": "Example output:",
            "role": "user"
        },
        {
            "content": null,
            "role": "assistant",
            "tool_calls":
            [
                {
                    "function":
                    {
                        "arguments": "{\"current_state\": {\"evaluation_previous_goal\": \"Success - I successfully clicked on the 'Apple' link from the Google Search results page, \\n\\t\\t\\t\\t\\t\\t\\twhich directed me to the 'Apple' company homepage. This is a good start toward finding \\n\\t\\t\\t\\t\\t\\t\\tthe best place to buy a new iPhone as the Apple website often list iPhones for sale.\", \"memory\": \"I searched for 'iPhone retailers' on Google. From the Google Search results page, \\n\\t\\t\\t\\t\\t\\t\\tI used the 'click_element_by_index' tool to click on element at index [45] labeled 'Best Buy' but calling \\n\\t\\t\\t\\t\\t\\t\\tthe tool did not direct me to a new page. I then used the 'click_element_by_index' tool to click \\n\\t\\t\\t\\t\\t\\t\\ton element at index [82] labeled 'Apple' which redirected me to the 'Apple' company homepage. \\n\\t\\t\\t\\t\\t\\t\\tCurrently at step 3/15.\", \"next_goal\": \"Looking at reported structure of the current page, I can see the item '[127]<h3 iPhone/>' \\n\\t\\t\\t\\t\\t\\t\\tin the content. I think this button will lead to more information and potentially prices \\n\\t\\t\\t\\t\\t\\t\\tfor iPhones. I'll click on the link at index [127] using the 'click_element_by_index' \\n\\t\\t\\t\\t\\t\\t\\ttool and hope to see prices on the next page.\"}, \"action\": [{\"click_element_by_index\": {\"index\": 127}}]}",
                        "name": "AgentOutput"
                    },
                    "id": "1",
                    "type": "function"
                }
            ]
        },
        {
            "content": "Browser started",
            "role": "tool",
            "tool_call_id": "1"
        },
        {
            "content": "[Your task history memory starts here]",
            "role": "user"
        },
        {
            "content": null,
            "role": "assistant",
            "tool_calls":
            [
                {
                    "function":
                    {
                        "arguments": "{\"current_state\": {\"evaluation_previous_goal\": \"Unknown - The browser is currently on an empty page (about:blank). No previous actions have been taken yet.\", \"memory\": \"Starting the task to open Taobao and find the cheapest Mac Mini M4. Step 1 of 100.\", \"next_goal\": \"Navigate to Taobao's homepage to begin the search for the Mac Mini M4.\"}, \"action\": [{\"go_to_url\": {\"url\": \"https://www.taobao.com\"}}]}",
                        "name": "AgentOutput"
                    },
                    "id": "2",
                    "type": "function"
                }
            ]
        },
        {
            "content": "",
            "role": "tool",
            "tool_call_id": "2"
        },
        {
            "content": "Action result: 🔗  Navigated to https://www.taobao.com",
            "role": "user"
        },
        {
            "content": null,
            "role": "assistant",
            "tool_calls":
            [
                {
                    "function":
                    {
                        "arguments": "{\"current_state\": {\"evaluation_previous_goal\": \"Success - Successfully navigated to Taobao's homepage.\", \"memory\": \"Navigated to Taobao's homepage. Step 1 of 100. Next, I need to search for 'Mac Mini M4' to find the cheapest option.\", \"next_goal\": \"Search for 'Mac Mini M4' on Taobao to find the cheapest option.\"}, \"action\": [{\"input_text\": {\"index\": 14, \"text\": \"Mac Mini M4\"}}, {\"click_element_by_index\": {\"index\": 13}}]}",
                        "name": "AgentOutput"
                    },
                    "id": "3",
                    "type": "function"
                }
            ]
        },
        {
            "content": "",
            "role": "tool",
            "tool_call_id": "3"
        },
        {
            "content": "Action result: ⌨️  Input Mac Mini M4 into index 14",
            "role": "user"
        },
        {
            "content": "Action result: 🖱️  Clicked button with index 13: 搜索 - New tab opened - switching to it",
            "role": "user"
        },
        {
            "content": null,
            "role": "assistant",
            "tool_calls":
            [
                {
                    "function":
                    {
                        "arguments": "{\"current_state\": {\"evaluation_previous_goal\": \"Success - Successfully searched for 'Mac Mini M4' on Taobao and navigated to the search results page.\", \"memory\": \"Navigated to Taobao's homepage, searched for 'Mac Mini M4', and opened the search results page. Now, I need to find the cheapest Mac Mini M4 from the search results. Step 3 of 100.\", \"next_goal\": \"Extract the cheapest Mac Mini M4 from the search results and provide its link.\"}, \"action\": [{\"extract_content\": {\"goal\": \"Extract the cheapest Mac Mini M4 product details and link\", \"should_strip_link_urls\": false}}]}",
                        "name": "AgentOutput"
                    },
                    "id": "4",
                    "type": "function"
                }
            ]
        },
        {
            "content": "",
            "role": "tool",
            "tool_call_id": "4"
        },
        {
            "content": "Action result: 📄  Extracted from page\n: ```json\n{\n  \"status\": \"error\",\n  \"message\": \"No product details found for Mac Mini M4 on the provided Taobao search page. The page appears to be a login or general search interface without specific product listings.\",\n  \"details\": {\n    \"page_content\": \"The page is primarily a search interface for Taobao with login prompts, navigation links, and general search functionalities. There are no visible product listings or details for Mac Mini M4 in the provided content.\",\n    \"suggestions\": [\n      \"Ensure you are logged in to Taobao to view complete search results.\",\n      \"Perform a search specifically for 'Mac Mini M4' to see product listings.\",\n      \"Check if the search results are being blocked by ad blockers or JavaScript restrictions.\"\n    ]\n  }\n}\n```\n",
            "role": "user"
        },
        {
            "content": null,
            "role": "assistant",
            "tool_calls":
            [
                {
                    "function":
                    {
                        "arguments": "{\"current_state\": {\"evaluation_previous_goal\": \"Failed - The search results page did not display any product listings for 'Mac Mini M4'. The page may require login or additional filters to show relevant results.\", \"memory\": \"Navigated to Taobao's homepage, searched for 'Mac Mini M4', and opened the search results page. However, the page did not display any product listings, possibly due to a login requirement. Step 4 of 100.\", \"next_goal\": \"Check if a login prompt is required and prompt the user to log in if necessary.\"}, \"action\": [{\"ask_for_assistant\": {\"query\": \"The Taobao search results page requires login to view product listings. Please log in to Taobao to proceed with finding the cheapest Mac Mini M4.\"}}]}",
                        "name": "AgentOutput"
                    },
                    "id": "5",
                    "type": "function"
                }
            ]
        },
        {
            "content": "",
            "role": "tool",
            "tool_call_id": "5"
        },
        {
            "content": "Action result: AI ask: The Taobao search results page requires login to view product listings. Please log in to Taobao to proceed with finding the cheapest Mac Mini M4.. User response: Internal Error: Cannot display help request.",
            "role": "user"
        },
        {
            "content": null,
            "role": "assistant",
            "tool_calls":
            [
                {
                    "function":
                    {
                        "arguments": "{\"current_state\": {\"evaluation_previous_goal\": \"Failed - The Taobao search results page did not display any product listings for 'Mac Mini M4'. The page may require login or additional filters to show relevant results.\", \"memory\": \"Navigated to Taobao's homepage, searched for 'Mac Mini M4', and opened the search results page. However, the page did not display any product listings, possibly due to a login requirement. Step 5 of 100.\", \"next_goal\": \"Scroll down the search results page to check if product listings appear after scrolling.\"}, \"action\": [{\"scroll_down\": {}}]}",
                        "name": "AgentOutput"
                    },
                    "id": "6",
                    "type": "function"
                }
            ]
        },
        {
            "content": "",
            "role": "tool",
            "tool_call_id": "6"
        },
        {
            "content": "Action result: 🔍  Scrolled down the page by one page",
            "role": "user"
        },
        {
            "content": null,
            "role": "assistant",
            "tool_calls":
            [
                {
                    "function":
                    {
                        "arguments": "{\"current_state\": {\"evaluation_previous_goal\": \"Success - Scrolled down the search results page and found multiple listings for Mac Mini M4.\", \"memory\": \"Navigated to Taobao's homepage, searched for 'Mac Mini M4', and opened the search results page. Scrolled down to view multiple product listings. Now, I need to identify the cheapest Mac Mini M4 and provide its link. Step 6 of 100.\", \"next_goal\": \"Identify the cheapest Mac Mini M4 from the search results and provide its link.\"}, \"action\": [{\"extract_content\": {\"goal\": \"Extract the details and link of the cheapest Mac Mini M4 from the search results\", \"should_strip_link_urls\": false}}]}",
                        "name": "AgentOutput"
                    },
                    "id": "7",
                    "type": "function"
                }
            ]
        },
        {
            "content": "",
            "role": "tool",
            "tool_call_id": "7"
        },
        {
            "content": "Action result: 📄  Extracted from page\n: ```json\n{\n  \"cheapest_mac_mini_m4\": {\n    \"title\": \"Apple/苹果 2024款Mac Mini M4/M4 Pro芯片台式电脑主机未拆封\",\n    \"price\": \"¥3388\",\n    \"link\": \"//item.taobao.com/item.htm?id=851793447219\",\n    \"specs\": [\n      \"7 核图形处理器\",\n      \"256GB\"\n    ],\n    \"location\": \"广东 广州\",\n    \"seller\": \"壹佳靓机数码\",\n    \"seller_link\": \"//store.taobao.com/shop/view_shop.htm?appUid=RAzN8HWT9fsZXRyNvJ86fpjQD8KK8TEvGhwE1qEYnDt7NESoocd\",\n    \"shipping\": \"包邮\",\n    \"sales\": \"5人付款\"\n  }\n}\n```\n",
            "role": "user"
        },
        {
            "content": "\n[Task history memory ends]\n[Current state starts here]\nThe following is one-time information - if you need to remember it write it to memory:\nCurrent url: https://s.taobao.com/search?commend=all&ie=utf8&initiative_id=tbindexz_20170306&page=1&preLoadOrigin=https%3A%2F%2Fwww.taobao.com&q=Mac%20Mini%20M4&search_type=item&sourceId=tb.index&spm=a21bo.jianhua%2Fa.search_manual.0&ssid=s5-e&tab=all\nAvailable tabs:\n[TabInfo(page_id=0, url='https://www.taobao.com/', title='淘宝', parent_page_id=None), TabInfo(page_id=1, url='https://s.taobao.com/search?commend=all&ie=utf8&initiative_id=tbindexz_20170306&page=1&preLoadOrigin=https%3A%2F%2Fwww.taobao.com&q=Mac%20Mini%20M4&search_type=item&sourceId=tb.index&spm=a21bo.jianhua%2Fa.search_manual.0&ssid=s5-e&tab=all', title='Mac Mini M4_淘宝搜索', parent_page_id=None)]\nInteractive elements from top layer of the current page inside the viewport:\n... 1005 pixels above - scroll or extract content to see more ...\n[0]<a  />\n[1]<button type='submit'>搜索 />\n[2]<input name='q' aria-label='请输入搜索文字' value='Mac Mini M4' />\n搜同款\n[3]<div  />\n\t[4]<a >云飞侠小时达 />\n\t[5]<div  />\n\t\t[6]<a title='点此可以直接和卖家交流选好的宝贝,或相互交流网购体验,还支持语音视频噢。'>旺旺在线 />\n[7]<div  />\n\t[8]<a >优选数码通讯 />\n\t[9]<div  />\n\t\t[10]<a title='点此可以直接和卖家交流选好的宝贝,或相互交流网购体验,还支持语音视频噢。'>旺旺在线 />\n[11]<div  />\n\t[12]<a >回头客8万\nApple授权专营店 />\n\t[13]<div  />\n\t\t[14]<a title='点此可以直接和卖家交流选好的宝贝,或相互交流网购体验,还支持语音视频噢。'>旺旺在线 />\n[15]<div  />\n\t[16]<a >迷制数码 />\n\t[17]<div  />\n\t\t[18]<a title='点此可以直接和卖家交流选好的宝贝,或相互交流网购体验,还支持语音视频噢。'>旺旺在线 />\n[19]<a >【教育版】Apple/苹果\nMac\nmini\nM4\n芯片 24GB+512GB 台式电脑主机\nmacOS\n512GB\n一级\n¥\n7499\n北京\n包邮 />\n\t[20]<a >回头客8万\nApple授权专营店 />\n\t[21]<div  />\n\t\t[22]<a title='点此可以直接和卖家交流选好的宝贝,或相互交流网购体验,还支持语音视频噢。'>旺旺在线 />\n[23]<a >Apple/苹果\nMac\nmini\nM4\n系列芯片 一体机更快更高效正品\n7200转\n影音娱乐\nApple M4\n¥\n4999\n0人付款\n广东\n深圳\n包邮 />\n\t[24]<a >10年老店\nJohn Davison Rockefe />\n\t[25]<div  />\n\t\t[26]<a title='点此可以直接和卖家交流选好的宝贝,或相互交流网购体验,还支持语音视频噢。'>旺旺在线 />\n[27]<a >Apple/苹果\nMac\nmini\n台式电脑主机国行原封2024新款\nM4\n芯片/\nM4\npro\nmacOS\n无光驱\n1kg\n¥\n3898\n7人付款\n重庆\n包邮 />\n\t[28]<a >7年老店\n重庆配之家科技 />\n\t[29]<div  />\n\t\t[30]<a title='点此可以直接和卖家交流选好的宝贝,或相互交流网购体验,还支持语音视频噢。'>旺旺在线 />\n[31]<a >Apple/苹果 2024款\nMac\nMini\nM4\n/\nM4\nPro台式电脑迷你主机未拆封\n7 核图形处理器\nmacOS\n256GB\n¥\n3388\n5人付款\n广东\n广州\n包邮 />\n\t[32]<a >壹佳靓机数码 />\n\t[33]<div  />\n\t\t[34]<a title='点此可以直接和卖家交流选好的宝贝,或相互交流网购体验,还支持语音视频噢。'>旺旺在线 />\n对本次搜索体验满意吗\n[35]<div >非常满意 />\n[36]<div >满意 />\n[37]<div >感觉一般 />\n[38]<div >不满意 />\n[39]<div >非常不满意 />\n[40]<div >不感兴趣,关闭 />\n[41]<a >【激活返50/政府补贴20%】 Apple/苹果\nMac\nmini\n台式电脑主机 2024款\nM4\n/\nM4\nPro 芯片优惠直降国补\nApple M4\nmacOS\n256GB\n¥\n4499\n800+人付款\n上海\n3期\n淘金币抵134.9元\n退货宝 />\n\t[42]<a >回头客1万\n壹品良机旗舰店 />\n\t[43]<div  />\n\t\t[44]<a title='点此可以直接和卖家交流选好的宝贝,或相互交流网购体验,还支持语音视频噢。'>旺旺在线 />\n[45]<a >2024新款Apple/苹果\nMac\nMini\nM4\nM2 Pro\nmini\n迷你小主机微型电脑\n500GB\n5.1\n英特尔 酷睿 i5-2400\n¥\n2799\n19人付款\n四川\n成都\n公益宝贝 />\n\t[46]<a >19年老店\n成都IT店 />\n\t[47]<div  />\n\t\t[48]<a title='点此可以直接和卖家交流选好的宝贝,或相互交流网购体验,还支持语音视频噢。'>旺旺在线 />\n[49]<a >Apple/苹果\nMac\nmini\nM4\n系列芯片一体机\n15英寸\n10 核图形处理器\nmacOS\n¥\n4999\n500+人付款\n河南\n郑州\n包邮 />\n\t[50]<a >傲剑科技 />\n\t[51]<div  />\n\t\t[52]<a title='点此可以直接和卖家交流选好的宝贝,或相互交流网购体验,还支持语音视频噢。'>旺旺在线 />\n[53]<a >Apple/苹果\nMac\nmini\n(\nM4\n) 2024款 便携式电脑主机 苹果迷你主机\n256GB\nM4\n16GB\n¥\n3650\n券后价\n1人付款\n广东\n深圳\n店铺满2000减20\n包邮 />\n\t[54]<a >生产力STORE />\n\t[55]<div  />\n\t\t[56]<a title='点此可以直接和卖家交流选好的宝贝,或相互交流网购体验,还支持语音视频噢。'>旺旺在线 />\n[57]<a >【6期免息】Apple/苹果\nMac\nmini\n台式电脑主机\nM4\n芯片 10 核中央处理器 10 核图形处理器 2024款新品\nApple M4\n10 核图形处理器\nmacOS\n¥\n5499\n29人付款\n江苏\n南京\n6期\n退货宝\n包邮 />\n\t[58]<a >回头客2千\n响誉数码旗舰店 />\n\t[59]<div  />\n\t\t[60]<a title='点此可以直接和卖家交流选好的宝贝,或相互交流网购体验,还支持语音视频噢。'>旺旺在线 />\n[61]<div  />\n\t[62]<a >桌面版 />\n[63]<div >联系客服 />\n[64]<div  />\n\t[65]<a >购物车 />\n[66]<div  />\n\t[67]<a >官方客服 />\n[68]<div  />\n\t[69]<a >回顶部 />\n[70]<div  />\n\t[71]<a >反馈 />\n... 2215 pixels below - scroll or extract content to see more ...\nCurrent step: 7/100Current date and time: 2025-07-15 19:53\n",
            "role": "user"
        }
    ],
    "model": "deepseek/deepseek-chat-v3-0324:free",
    "parallel_tool_calls": false,
    "stream": false,
    "temperature": 0.6,
    "tool_choice":
    {
        "function":
        {
            "name": "AgentOutput"
        },
        "type": "function"
    },
    "tools":
    [
        {
            "function":
            {
                "description": "AgentOutput model with custom actions",
                "name": "AgentOutput",
                "parameters":
                {
                    "properties":
                    {
                        "action":
                        {
                            "description": "List of actions to execute",
                            "items":
                            {
                                "properties":
                                {
                                    "ask_for_assistant":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "query":
                                                    {
                                                        "title": "Query",
                                                        "type": "string"
                                                    }
                                                },
                                                "required":
                                                [
                                                    "query"
                                                ],
                                                "title": "ask_for_assistant_parameters",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "When executing tasks, prioritize autonomous completion. However, if you encounter a definitive blocker that prevents you from proceeding independently – such as needing credentials you don't possess, requiring subjective human judgment, needing a physical action performed, encountering complex CAPTCHAs, or facing limitations in your capabilities – you must request human assistance."
                                    },
                                    "click_element_by_index":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "index":
                                                    {
                                                        "title": "Index",
                                                        "type": "integer"
                                                    },
                                                    "xpath":
                                                    {
                                                        "anyOf":
                                                        [
                                                            {
                                                                "type": "string"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ],
                                                        "default": null,
                                                        "title": "Xpath"
                                                    }
                                                },
                                                "required":
                                                [
                                                    "index"
                                                ],
                                                "title": "ClickElementAction",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Click element by index"
                                    },
                                    "close_tab":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "page_id":
                                                    {
                                                        "title": "Page Id",
                                                        "type": "integer"
                                                    }
                                                },
                                                "required":
                                                [
                                                    "page_id"
                                                ],
                                                "title": "CloseTabAction",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Close an existing tab"
                                    },
                                    "done":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "success":
                                                    {
                                                        "title": "Success",
                                                        "type": "boolean"
                                                    },
                                                    "text":
                                                    {
                                                        "title": "Text",
                                                        "type": "string"
                                                    }
                                                },
                                                "required":
                                                [
                                                    "text",
                                                    "success"
                                                ],
                                                "title": "DoneAction",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Complete task - with return text and if the task is finished (success=True) or not yet  completely finished (success=False), because last step is reached"
                                    },
                                    "drag_drop":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "coord_source_x":
                                                    {
                                                        "anyOf":
                                                        [
                                                            {
                                                                "type": "integer"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ],
                                                        "default": null,
                                                        "description": "Absolute X coordinate on page to start drag from (in pixels)",
                                                        "title": "Coord Source X"
                                                    },
                                                    "coord_source_y":
                                                    {
                                                        "anyOf":
                                                        [
                                                            {
                                                                "type": "integer"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ],
                                                        "default": null,
                                                        "description": "Absolute Y coordinate on page to start drag from (in pixels)",
                                                        "title": "Coord Source Y"
                                                    },
                                                    "coord_target_x":
                                                    {
                                                        "anyOf":
                                                        [
                                                            {
                                                                "type": "integer"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ],
                                                        "default": null,
                                                        "description": "Absolute X coordinate on page to drop at (in pixels)",
                                                        "title": "Coord Target X"
                                                    },
                                                    "coord_target_y":
                                                    {
                                                        "anyOf":
                                                        [
                                                            {
                                                                "type": "integer"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ],
                                                        "default": null,
                                                        "description": "Absolute Y coordinate on page to drop at (in pixels)",
                                                        "title": "Coord Target Y"
                                                    },
                                                    "delay_ms":
                                                    {
                                                        "anyOf":
                                                        [
                                                            {
                                                                "type": "integer"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ],
                                                        "default": 5,
                                                        "description": "Delay in milliseconds between steps (0 for fastest, 10-20 for more natural)",
                                                        "title": "Delay Ms"
                                                    },
                                                    "element_source":
                                                    {
                                                        "anyOf":
                                                        [
                                                            {
                                                                "type": "string"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ],
                                                        "default": null,
                                                        "description": "CSS selector or XPath of the element to drag from",
                                                        "title": "Element Source"
                                                    },
                                                    "element_source_offset":
                                                    {
                                                        "anyOf":
                                                        [
                                                            {
                                                                "properties":
                                                                {
                                                                    "x":
                                                                    {
                                                                        "title": "X",
                                                                        "type": "integer"
                                                                    },
                                                                    "y":
                                                                    {
                                                                        "title": "Y",
                                                                        "type": "integer"
                                                                    }
                                                                },
                                                                "required":
                                                                [
                                                                    "x",
                                                                    "y"
                                                                ],
                                                                "title": "Position",
                                                                "type": "object"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ],
                                                        "default": null,
                                                        "description": "Precise position within the source element to start drag (in pixels from top-left corner)"
                                                    },
                                                    "element_target":
                                                    {
                                                        "anyOf":
                                                        [
                                                            {
                                                                "type": "string"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ],
                                                        "default": null,
                                                        "description": "CSS selector or XPath of the element to drop onto",
                                                        "title": "Element Target"
                                                    },
                                                    "element_target_offset":
                                                    {
                                                        "anyOf":
                                                        [
                                                            {
                                                                "properties":
                                                                {
                                                                    "x":
                                                                    {
                                                                        "title": "X",
                                                                        "type": "integer"
                                                                    },
                                                                    "y":
                                                                    {
                                                                        "title": "Y",
                                                                        "type": "integer"
                                                                    }
                                                                },
                                                                "required":
                                                                [
                                                                    "x",
                                                                    "y"
                                                                ],
                                                                "title": "Position",
                                                                "type": "object"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ],
                                                        "default": null,
                                                        "description": "Precise position within the target element to drop (in pixels from top-left corner)"
                                                    },
                                                    "steps":
                                                    {
                                                        "anyOf":
                                                        [
                                                            {
                                                                "type": "integer"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ],
                                                        "default": 10,
                                                        "description": "Number of intermediate points for smoother movement (5-20 recommended)",
                                                        "title": "Steps"
                                                    }
                                                },
                                                "title": "DragDropAction",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Drag and drop elements or between coordinates on the page - useful for canvas drawing, sortable lists, sliders, file uploads, and UI rearrangement"
                                    },
                                    "extract_content":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "goal":
                                                    {
                                                        "title": "Goal",
                                                        "type": "string"
                                                    },
                                                    "should_strip_link_urls":
                                                    {
                                                        "title": "Should Strip Link Urls",
                                                        "type": "boolean"
                                                    }
                                                },
                                                "required":
                                                [
                                                    "goal",
                                                    "should_strip_link_urls"
                                                ],
                                                "title": "extract_content_parameters",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Extract page content to retrieve specific information from the page, e.g. all company names, a specific description, all information about, links with companies in structured format or simply links"
                                    },
                                    "get_dropdown_options":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "index":
                                                    {
                                                        "title": "Index",
                                                        "type": "integer"
                                                    }
                                                },
                                                "required":
                                                [
                                                    "index"
                                                ],
                                                "title": "get_dropdown_options_parameters",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Get all options from a native dropdown"
                                    },
                                    "go_back":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "additionalProperties": true,
                                                "description": "Accepts absolutely anything in the incoming data\nand discards it, so the final parsed model is empty.",
                                                "properties":
                                                {},
                                                "title": "NoParamsAction",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Go back"
                                    },
                                    "go_to_url":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "url":
                                                    {
                                                        "title": "Url",
                                                        "type": "string"
                                                    }
                                                },
                                                "required":
                                                [
                                                    "url"
                                                ],
                                                "title": "GoToUrlAction",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Navigate to URL in the current tab"
                                    },
                                    "input_text":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "index":
                                                    {
                                                        "title": "Index",
                                                        "type": "integer"
                                                    },
                                                    "text":
                                                    {
                                                        "title": "Text",
                                                        "type": "string"
                                                    },
                                                    "xpath":
                                                    {
                                                        "anyOf":
                                                        [
                                                            {
                                                                "type": "string"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ],
                                                        "default": null,
                                                        "title": "Xpath"
                                                    }
                                                },
                                                "required":
                                                [
                                                    "index",
                                                    "text"
                                                ],
                                                "title": "InputTextAction",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Input text into a input interactive element"
                                    },
                                    "open_tab":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "url":
                                                    {
                                                        "title": "Url",
                                                        "type": "string"
                                                    }
                                                },
                                                "required":
                                                [
                                                    "url"
                                                ],
                                                "title": "OpenTabAction",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Open url in new tab"
                                    },
                                    "save_pdf":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {},
                                                "title": "save_pdf_parameters",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Save the current page as a PDF file"
                                    },
                                    "scroll_down":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "amount":
                                                    {
                                                        "anyOf":
                                                        [
                                                            {
                                                                "type": "integer"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ],
                                                        "default": null,
                                                        "title": "Amount"
                                                    }
                                                },
                                                "title": "ScrollAction",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Scroll down the page by pixel amount - if no amount is specified, scroll down one page"
                                    },
                                    "scroll_to_text":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "text":
                                                    {
                                                        "title": "Text",
                                                        "type": "string"
                                                    }
                                                },
                                                "required":
                                                [
                                                    "text"
                                                ],
                                                "title": "scroll_to_text_parameters",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "If you dont find something which you want to interact with, scroll to it"
                                    },
                                    "scroll_up":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "amount":
                                                    {
                                                        "anyOf":
                                                        [
                                                            {
                                                                "type": "integer"
                                                            },
                                                            {
                                                                "type": "null"
                                                            }
                                                        ],
                                                        "default": null,
                                                        "title": "Amount"
                                                    }
                                                },
                                                "title": "ScrollAction",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Scroll up the page by pixel amount - if no amount is specified, scroll up one page"
                                    },
                                    "search_google":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "query":
                                                    {
                                                        "title": "Query",
                                                        "type": "string"
                                                    }
                                                },
                                                "required":
                                                [
                                                    "query"
                                                ],
                                                "title": "SearchGoogleAction",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Search the query in Google in the current tab, the query should be a search query like humans search in Google, concrete and not vague or super long. More the single most important items. "
                                    },
                                    "select_dropdown_option":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "index":
                                                    {
                                                        "title": "Index",
                                                        "type": "integer"
                                                    },
                                                    "text":
                                                    {
                                                        "title": "Text",
                                                        "type": "string"
                                                    }
                                                },
                                                "required":
                                                [
                                                    "index",
                                                    "text"
                                                ],
                                                "title": "select_dropdown_option_parameters",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Select dropdown option for interactive element index by the text of the option you want to select"
                                    },
                                    "send_keys":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "keys":
                                                    {
                                                        "title": "Keys",
                                                        "type": "string"
                                                    }
                                                },
                                                "required":
                                                [
                                                    "keys"
                                                ],
                                                "title": "SendKeysAction",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Send strings of special keys like Escape,Backspace, Insert, PageDown, Delete, Enter, Shortcuts such as `Control+o`, `Control+Shift+T` are supported as well. This gets used in keyboard.press. "
                                    },
                                    "switch_tab":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "page_id":
                                                    {
                                                        "title": "Page Id",
                                                        "type": "integer"
                                                    }
                                                },
                                                "required":
                                                [
                                                    "page_id"
                                                ],
                                                "title": "SwitchTabAction",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Switch tab"
                                    },
                                    "upload_file":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "index":
                                                    {
                                                        "title": "Index",
                                                        "type": "integer"
                                                    },
                                                    "path":
                                                    {
                                                        "title": "Path",
                                                        "type": "string"
                                                    }
                                                },
                                                "required":
                                                [
                                                    "index",
                                                    "path"
                                                ],
                                                "title": "upload_file_parameters",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Upload file to interactive element with file path "
                                    },
                                    "wait":
                                    {
                                        "anyOf":
                                        [
                                            {
                                                "properties":
                                                {
                                                    "seconds":
                                                    {
                                                        "default": 3,
                                                        "title": "Seconds",
                                                        "type": "integer"
                                                    }
                                                },
                                                "title": "wait_parameters",
                                                "type": "object"
                                            },
                                            {
                                                "type": "null"
                                            }
                                        ],
                                        "default": null,
                                        "description": "Wait for x seconds default 3"
                                    }
                                },
                                "type": "object"
                            },
                            "min_items": 1,
                            "type": "array"
                        },
                        "current_state":
                        {
                            "description": "Current state of the agent",
                            "properties":
                            {
                                "evaluation_previous_goal":
                                {
                                    "type": "string"
                                },
                                "memory":
                                {
                                    "type": "string"
                                },
                                "next_goal":
                                {
                                    "type": "string"
                                }
                            },
                            "required":
                            [
                                "evaluation_previous_goal",
                                "memory",
                                "next_goal"
                            ],
                            "type": "object"
                        }
                    },
                    "required":
                    [
                        "current_state",
                        "action"
                    ],
                    "type": "object"
                }
            },
            "type": "function"
        }
    ]
}
Edit this page
Last Updated:
Contributors: Tong Li
Prev
AI Browser:基于用户指令的浏览器自动化系统
Next
dom构建- buildDomTree.js