Practonaut

io.github.godarg由 GitHub 账号 godarg 发布v0.2.0更新于 Oct 24, 2026

Local practice gym for AI agents on real apps: practice Excalidraw tasks, get a reproducible score.

概览

AI 生成的概览

一个本地练习场,让 AI 智能体通过语义操作完成 Excalidraw 图表任务,并获得独立校验、可复现的评分。

可以做什么
练习 Excalidraw 任务:智能体每次执行一个语义操作(添加步骤、连接、重命名、分组、排序),操作会应用到固定版本的真实引擎并被读回确认,人可以在浏览器中同时观看同一会话并看到每步是谁做的。运行基准测试:每次运行使用全新会话,给出 pass@1、pass^k、操作次数和相对参考解的效率,可输出 JSON、HTML、JUnit、卡片和徽章报告,并支持对比两份报告和 CI 回归检查。从起始与目标场景创建任务,只有目标通过、起始和近似错误方案失败时才会写入。查看结果:失败运行优先、未满足的目标条件、错误分类和轨迹。
适用场景
当你希望用可复现、可复核的分数衡量或训练智能体完成某个具体应用任务,或在改动前后比较不同智能体配置时使用。它只是小型示例任务库和冒烟测试,不代表通用能力。
运行要求
需要 Node.js 22.18 或更高版本和 npm,通过 npx 以 stdio 在本地运行。可选的 setup 命令会下载 Playwright 的 Chromium headless shell(约 105-130 MB)以启用真实引擎确认;不安装则仅以模型模式运行。无需账号、无遥测;本地数据位于 ~/.practonaut 或 PRACTONAUT_HOME。原生 Windows 上需在 npx 前加 cmd /c。
安装前请注意
智能体以你的操作系统用户身份运行,环境并未封闭:带有文件或 shell 工具的智能体可能读取磁盘上的任务库,包括参考解。claude-code 预设会从环境中移除模型提供方密钥和计费开关,除非你主动传入。报告只做一致性检查、没有签名,能写入基准文件夹的人就能替换文件。目前仅支持 Excalidraw,且智能体通过语义操作而非图形界面操作。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Practonaut,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Practonaut

A local practice gym for AI agents on real apps. Demonstrate a task once, let any MCP agent practise it, and get an independent, reproducible score — one npx command, no VM, no Docker.

[The Practonaut Player while an agent works on the task 'Turn a list into a styled flow': the task, and a board where 'Open' and 'Close' are already ellipses, 'Close' is filled green and one arrow is drawn]

Practonaut turns a real application — today Excalidraw — into a practice environment. A task is a start drawing plus a goal. You, or an agent over MCP, change the diagram one action at a time; each action is applied to a real, pinned Excalidraw engine and read back before it counts. When the attempt ends, a separate checker decides whether the goal is met. People and agents work on the same session at the same time, so you can watch an agent in your browser: the history marks each change as yours or as the agent's (Agent · claude-code).

[The same moment beside the board: the goal is not met yet, six of eight conditions are met, the arrow from 'Handle' to 'Close' is missing; below, the history lists the agent's five actions, each confirmed in the real Excalidraw]

Quick start in 60 seconds

Requires Node.js 22.18 or newer (macOS, Linux or Windows).

bash
npx practonaut                 # opens the example task in your browser at oncenpx practonaut setup           # once: the Chromium headless shell for the real Excalidraw engine (about 105–130 MB)

Watch a demonstration in the Player solves the example task once: actions land on the board, the real Excalidraw confirms each one, and the result check judges the end. It is never your result; Stop or Escape ends it. Before setup everything works model-only: actions are not confirmed in the real app, and a banner says so and names the download.

Let an agent practise (Claude Code shown; any MCP client works):

bash
claude mcp add practonaut -- npx -y practonaut mcp --task excalidraw/connect

On native Windows (not WSL) npx is a .cmd file that an MCP client cannot start directly; add cmd /c in front: claude mcp add practonaut -- cmd /c npx -y practonaut mcp --task excalidraw/connect.

Score it on a task, with a fresh session per run and an independent check:

bash
npx practonaut bench --agent claude-code --tasks excalidraw/connect

More in getting started.

Create your own task

Draw the start and the goal in Excalidraw, then:

bash
npx practonaut tasks from-scenes start.excalidraw goal.excalidraw --out my-tasknpx practonaut play my-task/world

The difference becomes the goal (steps, labels, shapes, colours, frames, groups, arrows). Practonaut only writes the task if the goal passes its own check, the start fails, a generated reference solution passes and generated near misses fail. The same works in the Player under Create, where you can also record a demonstration in the real editor and have the rule confirmed by a second recording. See the authoring guide.

Benchmark your agent

bash
npx practonaut bench --agent oracle --tasks all --seeds 2            # reference solutions: the score's ceilingnpx practonaut bench --agent random --tasks all --max-actions 30       # random actions: the floornpx practonaut bench --agent claude-code --tasks excalidraw/insert-between --repeats 3npx practonaut bench --agent "my-agent --mcp {mcp_config} --prompt {prompt}"   # any agentnpx practonaut bench --agent claude-code --world my-task/world --oracle my-task/oracle.json   # your own tasknpx practonaut report ~/.practonaut/bench/<id>/report.json --html report.htmlnpx practonaut report ~/.practonaut/bench/<id>/report.json --verify     # re-judge from the run filesnpx practonaut compare before/report.json after/report.json --fail-on-regression   # did a change break an instance?npx practonaut report ~/.practonaut/bench/<id>/report.json --junit runs.xml --card card --badge badge.svg

Each run gets its own session and data folder; the agent reaches the session only through the Practonaut MCP tools and gets the same public task a person gets. The claude-code preset does not pass provider keys, tokens or billing switches from your environment to Claude Code (a set ANTHROPIC_API_KEY would silently switch it to API billing), so Claude Code uses the login it has — your subscription, if you logged in with one; --keep-env ANTHROPIC_API_KEY passes a key on purpose. Scores come from the host's history and a separate checker, never from what the agent says: pass@1, pass^k, actions, efficiency against the reference solution. The JSON report has a schema. report checks that every pass and every number follows from the verdicts in the file — consistency, not proof: a file edited consistently still passes, and report says "consistency-checked, not re-verified". report --verify re-runs the checker on the session and the real-app export kept in the bench folder, whose SHA-256 the report records, against the world and reference solutions stored in that folder (so a moved folder still verifies), re-derives each run's actions and reference length, and refuses any difference by name; host calls and times are marked as reported by the runner. Nothing is signed: whoever can write the bench folder can replace those files too.

A report says why a run failed, not only that it did: rates as fractions with a 95 % interval, failed runs first, each unmet goal condition with the action after which it was last lost (judged by the checker after every action), error classes with their explanation, the trajectory, the final board — the real Excalidraw's own export, or a schematic labelled as such — beside an example target, the call log and the tokens, turns and cost the client reports about itself. compare puts two reports side by side instance by instance: it refuses reports that are not comparable, names instance regressions (three repeats a side, all passed before, all failed after) and says "not distinguishable at this n" when an exact McNemar test cannot tell the two apart. Both reports must come from the same kind of agent: oracle and random mark the ends of the score and compare only with a built-in, a command template only with a command template; as the baseline for your agent, bench a configuration of it that you trust.

In CI, examples/ci/practonaut-bench.yml benches your agent with your own credentials and fails the job on an instance regression against a committed baseline; --junit gives CI test views one test case per run. --card and --badge draw the header line as a 1280 × 640 card (SVG and PNG, light and dark) and a badge, with n, the interval, the verification status and the isolation level on them.

[A bench report page: summary cards for pass@1 with the passed runs, pass^2, mean actions, efficiency and time, then tables by task and by run]

The example report is a real run of Claude Code on three tasks, two repeats each (JSON, HTML) — one seed, six runs: it shows the format, it does not rank a model. Details: benchmarks.

Task library

Library, not a challenge tier. These tasks are an example set and a shared smoke test, not a measure of ability: current Claude models solve them, and five harder candidate families found no headroom on Practonaut's own actions in 0.2.0 (gate reports). A family becomes a challenge tier only after it passes a preregistered ladder gate.

16 tasks for Excalidraw 0.18.1, each in English and German with three label variants, a reference solution and near misses. List them with npx practonaut tasks list; open one with npx practonaut play <task>; address them as excalidraw/<task> in mcp and bench.

TaskLevelReference actionsGoal
add-step●○○1Add a step
connect●○○1Connect two steps
disconnect●○○1Remove a shortcut arrow
recolor●○○1Mark the error step
remove-step●○○1Remove a step
rename-frame●○○1Name the frame
rename-step●○○1Fix a label
align●●○3Align a row
close-chain●●○1Close the gap in a chain
group●●○2Group a sub-process
insert-between●●○4Insert a step between two others
reconnect●●○1Rewire an arrow
reorder●●○4Put the steps in order
decision●●●6Build a decision with two exits
restyle-flow●●●6Turn a list into a styled flow
two-frames●●●4Sort two sub-processes into frames

How scoring works

  1. The host keeps the history. Every action goes through one session host. It records each action with a state hash and who made it; agents and people cannot write the state any other way.
  2. The real engine confirms each action. With Chromium installed, each action is applied to a pinned Excalidraw running headless and read back; an action the real app disagrees with is rejected.
  3. A separate checker decides. After the attempt, another process replays the history with its own interpreter, reads the real Excalidraw export with its own parser, and evaluates the goal. It first makes sure an empty, an unchanged and a wrong submission all fail.

An agent gets the same task and the same public goal conditions as a person in the Player — one sentence per condition plus its formal form, which is the goal predicate written out — and the same Check button. It acts through Practonaut's semantic actions over MCP, not through the GUI. The reference solution, the near misses and held-out checker data never reach it over MCP.

Limits

  • One application. Excalidraw 0.18.1 is the only app so far. The adapter contract is meant for more (adapter guide); none exists yet.
  • Semantic actions, not pixels. Agents act through Practonaut's actions (add a step, connect, rename, …), not by clicking a screen. This measures whether an agent can reach a goal in the app's model, not whether it can operate the GUI.
  • Not sealed. Agents run as your OS user. An agent with its own file or shell tools could read the task library on disk, reference solutions included. The claude-code preset allows only Practonaut's tools; for other agents that is up to you.
  • Small evidence so far. The example report has two runs per task. Whether practising here makes people better at the real tool has not been studied.
  • Without Chromium Practonaut runs model-only: tasks work, but nothing is checked against the real app, and it says so.
  • Screen-reader and 200 % zoom checks by a person: one run so far (VoiceOver on macOS with Chrome, 2026-10-17), no problems found; other screen readers and regular screen-reader users are not tested yet (manual checks).

Requirements

  • Node.js ≥ 22.18 and npm.
  • Optional: npx practonaut setup downloads Playwright's Chromium headless shell once for the real engine. Nothing is downloaded on install; the package has no install script.
  • Local data lives in ~/.practonaut (or PRACTONAUT_HOME). No telemetry, no account. Practonaut's own process makes no network calls while practising (npx fetches the package and setup fetches Chromium, each once); an agent you connect talks to its own model provider.

Documentation

Getting started · Agent guide · Benchmarks · Authoring · World format · Architecture · Adapter guide · Session host · Threat model · Glossary · All documents

Contributing

Issues and pull requests are welcome — new tasks, bug fixes, and especially a second application adapter. Start with CONTRIBUTING.md; setup is three commands. Security reports go through SECURITY.md.

License

Apache License 2.0; see NOTICE. The bundled Excalidraw engine and fonts keep their own licenses (shipped with the package). The example world and the task library are CC0-1.0.

来源:README.md,提交 d95c2bd

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.2.0最新Oct 16, 2026
  2. v0.1.0Oct 14, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分