跳到正文
DEV Community· psyseal·· 40 分鐘前AI 評分66

psyseal-scan 推出免費離線工具,檢查 AI Agent 載入內容、成本與憑證風險

What your AI agent loads, costs and exposes: a free offline check

AI 導讀

psyseal-scan 提供免費離線檢查,可用一條命令掃描 AI Agent 的明文憑證、試圖改寫規則的記憶文字,以及 Heartbeat 成本。工具以 `npx psyseal-scan --lang en` 執行,需 Node.js 20 或更新版本;只讀本機檔案,不連網、不寫入,也不執行其他程式。

正文

psyseal

Personal AI agents like OpenClaw, Hermes Agent or nanobot keep their memory, skills and config as plain files on your disk. That is great for control, and it is also where three quiet problems pile up:

  1. Keys in plain text. An API key pasted into a chat ends up in a memory note or a skill, and the agent reads that file again and again.
  2. Planted memory. A web page, an email or another tool slips a line like "ignore your previous rules" into memory, and the agent keeps obeying it.
  3. Heartbeats that bill like a chat. A heartbeat every 15 minutes is 96 runs a day. If each run resends your whole main session, the bill grows even when nobody talks to the agent.

We built psyseal-scan to check those three things in one command, without uploading anything:

npx psyseal-scan --lang en

It is free (MIT-0), has no dependencies and needs Node.js 20 or newer. It reads files only: no network, no writes, no other programs, no symlinks. Secrets are reported as type, file and line, never the value, and memory text is never quoted.

A demo run

To show the output without exposing anyone's setup, we made a demo OpenClaw folder: two fake keys (one in a daily memory note, one inside a skill), one planted line in MEMORY.md, an AGENTS.md that is too long, and a heartbeat every 15 minutes on Claude Sonnet 4.5. Part of what the scanner printed ([…] marks lines we cut):

1) What your agent loads on every message
  File       Characters  ≈Tokens     Cap  Status
  AGENTS.md      31,655    5,000  20,000  TRUNCATED (11,655 lost)
  MEMORY.md         819      205  20,000  ok

2) Heartbeat
  Runs every 15 min (96 times a day) with anthropic/claude-sonnet-4-5 · cache: short (default)
    Your main session   Today / month       A) isolate   B) long cache
    50,000 tokens               ≈$544   ≈$25.92–$58.32          $47.52
  […]

3) Findings
  [HIGH] 2 plaintext credential(s) in memory/2026-11-01.md, skills/notes/SKILL.md: memory/2026-11-01.md:2 (OpenAI), skills/notes/SKILL.md:5 (GitHub)
  […]
  [MEDIUM] Text that tries to rewrite the agent rules in MEMORY.md:4
  [MEDIUM] AGENTS.md is 31,655 characters and the cap is 20,000: the agent only gets the first 20,000; 11,655 are lost

Every finding comes with a concrete fix. For the heartbeat, the scanner suggests isolating it or using a 1-hour cache, and says what each change does to the agent's behavior. The figures are estimates, with the assumptions printed under the report; compare them with your provider's usage dashboard.

What it does not do

It does not fix anything on its own, rotate keys or edit memory: it points to the file and line, and you decide. Secret detection works by patterns, so it can miss a format it does not know, and it can also flag test keys.

Use it inside your agent

  • As a skill: npx skills add psyseal/psyseal-scan (Claude Code, Cursor, Codex, Gemini CLI and more), or openclaw skills install @psyseal/psyseal-scan from ClawHub.
  • As an MCP server with one read-only tool, scan_agents: npx -y psyseal-scan mcp. It is in the official MCP Registry as io.github.psyseal/psyseal-scan.
  • As a Claude Code plugin (the skill): /plugin install psyseal-scan --marketplace psyseal/psyseal-scan.

Source: https://github.com/psyseal/psyseal-scan · Docs: https://psyseal.com/docs

Disclosure: we make Psyseal. The scanner is free and complete on its own. Psyseal also sells a cleanup that fixes the findings (with a backup and your OK on each change) and a signed seal; you do not need either to use the scanner.

來源:DEV Community · dev.to