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

概覽

AI 產生的概覽

把雜亂的產品照片變成可直接上架的商品圖:辨識商品、去背取出主體,再合成到生成的場景中,並附上保真度憑證。

可以做什麼
  • 辨識產品照片並規劃去背,回傳結構化描述以及可供去背使用的名詞短語概念(含備選)
  • 把商品從照片中分割出來,回傳以資源句柄引用的透明 PNG
  • 把未經改動的商品放入生成的背景場景,回傳合成圖與保真度憑證
  • 透過資源句柄以 MCP 資源形式讀回已儲存的圖片
  • 從既有句柄、http(s) 連結或 base64 資料 URI 匯入照片,支援 HEIC 並套用 EXIF 方向
適用情境
適合助理協助他人販售物品時使用:描述商品、把商品去背到透明背景,或在保持真實商品像素不變的前提下把商品放進乾淨場景,以便準備商品刊登素材。
執行需求
以 stdio 在本機執行,通常透過 uvx 或 pip 安裝的指令啟動;Python 版本為參考實作,另有 Rust 版本。任何會發起模型呼叫的工具都需要在環境變數 META_API_KEY 中提供 Meta Model API 金鑰;沒有金鑰時伺服器仍可啟動並列出工具。模型呼叫會產生費用。
安裝前請注意
每次模型呼叫都會依本機支出帳本計費,預設工作上限為 120 美元,硬上限為 150 美元;可能已計費但失敗的呼叫仍計入支出。META_API_KEY 會傳送給 Meta Model API,照片也會上傳到該服務商用於辨識、分割與場景生成。圖片會連同附屬紀錄保存在本機。此 Python 儲存庫被說明為參考實作,而非正式發布的產品。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 agenthand,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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:

ToolWhat it does
drawPlaces the real product, pixel-untouched, into a generated scene (a chair in a regal room, a game lot on a clean table) and returns the composite with a fidelity receipt.
cut_outSegments the product out of its photo and returns a transparent PNG, referenced by an asset handle. The concept is optional; without one, the planning step runs internally.
identifyThe planning step inside the chain: reads a photo and plans the cut, returning a structured description plus the segmentation-ready noun-phrase concept (with alternates) that cut_out consumes.

Fidelity Lock

draw never regenerates the product. The invariant, enforced in code:

  1. Segmentation extracts the real product foreground and its mask.
  2. 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.
  3. The image model generates ONLY the background scene plate. Its interface takes a prompt and dimensions, never product pixels.
  4. 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.
  5. draw refuses anything that is not a foreground_png asset chained back to a source photo, and verifies the stored hashes before a single pixel moves.
  6. 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.

json
{  "mcpServers": {    "agenthand": {      "command": "uvx",      "args": ["agenthand"],      "env": { "META_API_KEY": "…" }    }  }}

Or install the package with pip and point the client at the installed command:

bash
pip install agenthand
json
{  "mcpServers": {    "agenthand": {      "command": "agenthand",      "env": { "META_API_KEY": "…" }    }  }}

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)

bash
git clone https://github.com/AUsernameForYou/agenthandcd agenthandpython3.12 -m venv .venv.venv/bin/pip install -e ".[dev]".venv/bin/agenthand          # stdio transport.venv/bin/pytest             # unit tests

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
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.2最新Oct 29, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。

其他 Getgovinbox 整合