
agenthand
io.github.AUsernameForYou由 GitHub 账号 AUsernameForYou 发布v0.1.2更新于 Nov 5, 2026
Turn messy product photos into listing-ready images, with a fidelity receipt on every staged shot.
发布方自己的服务:GovInbox
概览
把杂乱的产品照片变成可直接上架的商品图:识别商品、抠出主体,再合成到生成的场景中,并附上保真度凭证。
- 可以做什么
- 识别产品照片并规划抠图,返回结构化描述以及可供抠图使用的名词短语概念(含备选)
- 把商品从照片中分割出来,返回以资源句柄引用的透明 PNG
- 把未经改动的商品放入生成的背景场景,返回合成图与保真度凭证
- 通过资源句柄以 MCP 资源形式读回已存储的图片
- 从已有句柄、http(s) 链接或 base64 数据 URI 导入照片,支持 HEIC 并应用 EXIF 方向
- 适用场景
- 适合助手帮助他人出售物品时使用:描述商品、把商品抠到透明背景上,或在保持真实商品像素不变的前提下把商品放进干净场景,以便准备商品列表素材。
- 运行要求
- 以 stdio 在本地运行,通常通过 uvx 或 pip 安装的命令启动;Python 版本为参考实现,另有 Rust 版本。任何发起模型调用的工具都需要在环境变量 META_API_KEY 中提供 Meta Model API 密钥;没有密钥时服务器仍可启动并列出工具。模型调用会产生费用。
安装
在 SourceWeft 中
- 打开 控制台中的 agenthand,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
agenthand
[agenthand logo: a robot hand presenting three rotating arcs, framed by registration brackets]
Reference implementation only. This Python build is the reference implementation of agenthand. It is kept public so the product can be checked against it, and it is not the shipped product. The main product is the Rust implementation: AUsernameForYou/agenthand-rust. Start there for the agenthand MCP server. This repo is for reference only.
An MCP server for AI agents that help people sell things.
The seller never opens agenthand. Their agent calls it. A seller hands their agent a messy product photo; agenthand turns it into listing-ready material through three tools, in the order a listing is produced:
Fidelity Lock
draw never regenerates the product. The invariant, enforced in code:
- Segmentation extracts the real product foreground and its mask.
- The product layer is stored untouched, with hashes recorded for the source, the foreground, and the mask: both the file-byte hash and the decoded-pixel hash of each.
- The image model generates ONLY the background scene plate. Its interface takes a prompt and dimensions, never product pixels.
- Deterministic code composites the original product layer onto that plate. The plate is resized and cropped to the product's dimensions; the product layer is never scaled.
drawrefuses anything that is not aforeground_pngasset chained back to a source photo, and verifies the stored hashes before a single pixel moves.- The result ships with a fidelity receipt: source, foreground, and mask hashes, the delivered file's own hashes, the transformations applied, the measured count of changed opaque foreground pixels, the model calls made, and their cost. The receipt also publishes what the count excluded: the edge-band pixel count and its maximum width, the opaque share of the mask, the exact changed-pixel predicate with tolerance 0, and the colour-profile identity of the source photo and the composite (a dropped or changed ICC profile recolours the product while pixel values stay identical, so it is recorded and counted as a fidelity failure).
The claim is precise: the stored extracted foreground reached the
composite unchanged, and its hashes pin exactly which layer that was.
Edge-band pixels (partially transparent) blend with the plate during
compositing; the receipt counts them separately instead of overclaiming.
The receipt's counts are measured on the delivered file, decoded back
from the store, and can be re-derived independently:
composite.verify_receipt_from_disk recounts from the stored files,
checks the receipt's own hashes against the assets it names, and
passes only on exactly zero changed pixels with real coverage; the
standalone agenthand-verify SOURCE FINAL MASK checker verifies
exported files with no store at all and likewise refuses a mask that
selects nothing. Ingest accepts the
formats phones produce, including HEIC, and preserves each photo's
embedded colour profile end to end.
A bounded mask-recovery loop guards cut_out: the mask is quality-checked,
and on a poor mask the tool retries once with an alternate concept phrase
from the planning step. Every attempt is traced in the receipt.
Asset handles
Tools never pass image bytes back and forth. Every image is stored locally
(with a per-asset sidecar record, written atomically) and referenced as
asset://<id>. Handles chain between tools: identify reads one,
cut_out returns a new one, draw consumes it.
Photos get in through ingest: a tool's image argument may be an existing
handle, an http(s) URL, or a base64 data URI. Ingest caps the byte and
pixel size, applies EXIF orientation, and normalizes to 8-bit RGBA PNG.
Images get out two ways: draw returns an image preview with its result,
and every asset is readable by the client as the MCP resource at its own
asset://<id> URI.
Cost receipts and the spend cap
Every billable call flows through one choke point
(src/agenthand/meta_client.py) using reserve-then-settle accounting:
under a file lock, the projected worst-case cost is checked against the
ledger and reserved as a pending receipt; after the call, a settlement
receipt records the actual cost priced from the provider's usage counts.
If a call fails after it may have billed, the reservation stays counted.
A call whose provider response carries no usable usage settles at its
reserved projection rather than $0: missing usage never erases spend.
Receipts land in a local JSONL ledger with tool, model, token and image
counts, USD estimate, and the pricing-table version used. Prices live in
one module (src/agenthand/pricing.py) so a price change is a one-line
edit with a version bump; an unpriced model raises rather than estimating
as $0. Every spend path shares the one ledger — the dry-run gate
included (its asset store is isolated in a temp dir, its ledger is not).
The server is fail-closed on spend. The working cap defaults to $120.00; configuration may move it up or down but never past the hard ceiling of $150.00 (the hackathon credit amount), which no configuration can exceed. Corrupt, negative, or non-finite ledger entries refuse all spend: unknown spend state means no spend.
Status
Hackathon build (Meta Global AI Developer Hackathon, Oct 26 - Nov 4,
2026). All three tools are wired to the real Meta Model API through the
spend-cap billing choke point — identify to muse-spark-1.3, cut_out
to sam-3.1, draw to muse-image-1.0 — and the full chain has run live
end to end. The verified run of 2026-10-26 (identify $0.007544,
cut_out $0.0025, draw $0.01; 580,613 opaque pixels checked, 0 changed)
is published with its fidelity receipt on the
project site,
where the same check can be re-run in the browser against the run's own
files. The placeholder plate survives only behind an explicit dev flag
for offline tests. Today the server runs locally over stdio; a hosted
endpoint comes later.
The server also exists as a single-binary Rust build. It passed a parity gate against the frozen files of the verified run above, reproducing the run's counts and its output pixel hash, and a live run from the Rust binary was cross-checked by the Python verifier. The Python implementation remains the reference; the Rust build is a second implementation of the same server, and the two agree.
Run it
Register agenthand with any MCP client. The primary route uses uv: nothing to install ahead of time, uv fetches the published package and runs it.
Or install the package with pip and point the client at the installed command:
The server starts and lists its tools without a key; the key is only
needed when a tool makes a model call. Configuration is by environment
variable; see .env.example.
From source (dev)
License
Source-available under the PolyForm Noncommercial License 1.0.0 (polyformproject.org/licenses/noncommercial/1.0.0). © Daniel Wagner. Noncommercial use is permitted under the license terms; commercial use requires a separate license from the copyright holder.
来源:README.md,提交 289ebb4
工具
0版本历史
1- v0.1.2最新Oct 29, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。