<%+header%> <% local flash_msg = flash_msg or "" local flash_ok = flash_ok or "1" if flash_msg ~= "" then %>
flash-ok<% else %>flash-err<% end %>"> <% if flash_ok == "1" then %>✓<% else %>⚠<% end %> <%=flash_msg%>
<% end %>
🤖

PicoClaw AI

OpenWrt Router AI Agent Framework v<%=cur_ver%>
<% if not picoclaw_installed then %>
🕵

PicoClaw 未安装

检测到系统中未安装 PicoClaw 主程序。本界面仅是管理面板,需要先安装 PicoClaw AI 网关才能使用。

<% if picoclaw_arch_supported then %>
系统架构<%=picoclaw_raw_arch%>
下载版本picoclaw_<%=picoclaw_arch%>.tar.gz
将从 GitHub 自动下载并安装(需要网络连接)
<% else %>
当前架构(<%=picoclaw_raw_arch%>)暂不支持一键安装。请前往 GitHub Releases 手动下载对应版本安装。
<% end %>
<% end %>

📰 版本与更新

<% if has_update then %>
🚧
发现新版本
v<%=cur_ver%> → v<%=latest_ver%>
<% elseif latest_ver ~= "" and not has_update then %>
已是最新版本
v<%=cur_ver%>
<% elseif check_err ~= "" then %>
🔌
版本检测中...
v<%=cur_ver%>
<% end %>
本地上传安装
当前版本v<%=cur_ver%>
<% if git_commit ~= "" then %>
Git Commit<%=git_commit%>
<% end %> <% if build_time ~= "" then %>
构建时间<%=build_time%>
<% end %> <% if latest_ver ~= "" then %>
最新版本v<%=latest_ver%>
<% end %>

📝 AI 模型配置指南

📋 切换模型(两步)
1.config.json → model_list 中添加模型条目(含 api_base、api_keys)
2. 设置 agents.defaults.model_name 为目标模型的 model_name,保存并重启
▼ 已知支持的模型及参数
model_name 提供商 / 协议 上下文窗口 推荐 Token 备注
▶ model_list 配置示例
注意:API Key 可写在 model_list 的 api_keys 字段中,也可通过路由器终端用 picoclaw config security 配置到 .security.yml(更安全,不明文存储)。

⚡ 服务状态

<% if running then %>运行中<% else %>已停止<% end %>
<% if running then %>PID: <%=pid%> | Gateway: <% if port_active then %>正常<% if gateway_port and gateway_port ~= "" then %> (<%=gateway_port%>)<% end %><% else %>异常<% end %><% else %>服务未运行<% end %>
<% if autostart then %>
<% else %>
<% end %>
<%=memory_mb%>
内存 (MB)
<%=pid%>
进程 ID
<% if port_active then %><% if gateway_port and gateway_port ~= "" then %><%=gateway_port%><% else %>正常<% end %><% else %>异常<% end %>
Gateway 端口

💬 与 PicoClaw 对话

通过 PicoClaw Agent 直接对话,回复可能需要几秒钟。
👋 你好!我是 PicoClaw AI 助手,有什么可以帮你的?
正在思考...
选择编辑模式:
🤖

AI 模型配置

默认模型agents.defaults.model_name
选择 model_list 中的一项作为当前使用的模型
快速添加:
model_name model api_base api_key 启用
ℹ 编辑 model_list 中每个模型的完整配置。API Key 保存在 model_list 的 api_keys 字段中,也可通过路由器终端用 picoclaw config security 配置到 .security.yml。
Token 上限max_tokens
迭代次数max_tool_iterations
并发模式steering_mode
📡

通道管理

🔑

API 密钥与提供商

系统设置

🔧

工具与功能

<% if logs and logs ~= "" then %><%=logs%><% else %>暂无 picoclaw 日志<% end %>

💻 系统信息

主机名<%=hw_sysinfo.hostname%>
运行时间<%=hw_sysinfo.uptime%>
CPU<%=hw_sysinfo.cpu_cores%> cores
内存<%=hw_sysinfo.mem_available%> / <%=hw_sysinfo.mem_total%> MB
<% if #hw_sysinfo.cpu_temp > 0 then %>
CPU 温度<%=hw_sysinfo.cpu_temp[1]%>°C
<% end %>

🔌 USB 设备

<% if #hw_usb > 0 then %> <% for _,dev in ipairs(hw_usb) do %>
🔌
<%=dev.product%> <%=dev.bus_dev%>
<% end %> <% else %>
未检测到 USB 设备
<% end %>

🦞 已安装技能 (<%=#hw_tools.skills%>)

<% if #hw_tools.skills > 0 then %> <% for _,sk in ipairs(hw_tools.skills) do %>
<%=sk.name%> <% if sk.description ~= "" then %>
<%=sk.description%>
<% end %>
<% end %> <% else %>
暂无已安装技能
<% end %>

定时任务 (<%=#hw_tools.cron_jobs%>)

<% if #hw_tools.cron_jobs > 0 then %> <% for _,job in ipairs(hw_tools.cron_jobs) do %>
<%=job%>
<% end %> <% else %>
暂无定时任务
<% end %>
GPIO 引脚 (<%=#hw_gpio%> pins)
<% if #hw_gpio > 0 then %>
<% for _,pin in ipairs(hw_gpio) do %> <% end %>
Pin方向Func操作
<%=pin.name%> <%=pin.direction%> <%=pin.value%> <%=pin.function_num%>
<% else %>
未检测到 GPIO
<% end %>
刷新硬件状态
<% if weixin_status == "none" then %>

💬 微信个人号接入

📷
尚未接入微信
通过 picoclaw auth weixin 命令扫码授权后,即可通过微信个人号与 AI 助手对话
接入步骤:
❶ SSH 登录路由器
❷ 执行命令:picoclaw auth weixin
❸ 用微信扫描终端显示的二维码
❹ 授权成功后,回到此处开启通道即可
<% elseif weixin_status == "configured" then %>

💬 微信个人号接入

已授权,但通道未启用
微信扫码授权已完成,请到「配置编辑 → 通道管理」中开启微信通道
<% elseif weixin_status == "connected" then %>

💬 微信个人号接入

🟢
微信已连接
微信个人号通道已启用,可以直接通过微信与 AI 助手对话
<% end %> <%+footer%>