AI AgentAI Agent
一句话描述运维目标,Agent 现场规划、逐条执行、看输出再决定下一步——每一步都先经你审批。
它怎么工作
- 下达任务——连接主机后打开 AI 侧栏,输入目标,例如「装好 nginx 并反代到 :3000」。
- 确认计划——Agent 先给出任务理解与步骤清单(支持子步骤嵌套),进度随执行实时更新。
- 逐步审批执行——每条命令附一句执行理由;结果回传模型决定下一步,直到任务完成。
三级审批门
- 只读(
ls/cat/systemctl status…)——自动放行,折叠显示。 - 变更——点击批准后执行。
- 破坏性(
rm -rf/dd/ 重定向系统路径…)——醒目样式 + 二次确认。
命令级别由本地分类器判定,不信任模型自报;你拒绝时可附理由回传,模型据此调整方案而不是傻循环。
改文件先看 diff
写文件走 SFTP(而非 shell 拼接),先展示 diff 预览、批准后才写入。所有命令与输出同步镜像进终端,全程可见。
模型与隐私
- 自带密钥(BYOK):支持 Anthropic 与 OpenAI 兼容 API,可配置第三方网关地址。
- API 密钥存系统钥匙串;命令输出回传模型前先经本地脱敏(IP、密钥等敏感片段替换为
[REDACTED])。 - 会话历史本地持久化,可经 iCloud 多端同步;绝不在你不在场时后台执行。
Agent 命令只发当前会话,绝不进入命令广播路径;单命令超时、失败重试与迭代上限都有护栏。
Describe an ops goal in one sentence. The Agent plans on the spot, runs commands one by one and reads the output before deciding the next step — every step waits for your approval.
How it works
- State the task — connect to a host, open the AI sidebar and type the goal, e.g. “install nginx and reverse-proxy to :3000”.
- Review the plan — the Agent first shows its understanding and a step checklist (nested sub-steps supported); progress updates live as it executes.
- Approve step by step — each command comes with a one-line rationale; results go back to the model to decide the next step, until the task is done.
Three-tier approval gate
- Read-only (
ls/cat/systemctl status…) — auto-passes, shown collapsed. - Changes — run after a tap to approve.
- Destructive (
rm -rf/dd/ redirects into system paths…) — prominent styling + double confirmation.
The tier is decided by a local classifier — the model's self-description is never trusted. When you reject, your reason goes back to the model so it adjusts course instead of looping.
File edits show a diff first
File writes go over SFTP (not shell heredocs): you see a diff preview and approve before anything is written. Every command and its output mirror into the terminal, visible the whole time.
Models & privacy
- Bring your own key (BYOK): Anthropic and OpenAI-compatible APIs, with custom gateway URLs.
- API keys live in the system Keychain; command output is redacted locally (IPs, keys and other sensitive fragments become
[REDACTED]) before reaching the model. - Conversation history persists locally and can sync via iCloud; the Agent never runs in the background without you present.
Agent commands go only to the current session — never through command broadcast. Per-command timeouts, retry limits and an iteration cap are always in place.