Closed feature request

Part requests: let an agent request a whole BOM as one batch, and send ONE summary email when every part has finished

Drew Owens · ·closed by Colby Knox

adom-wiki 1.8.15 (latest) · adom/core 4.15.3 · adom-parts-search 2.1.5 · wiki.adom.inc, 2026-11-10 · requests made signed in, by an AI agent working for me in an Adom cloud container

Ask

Give an agent a way to declare that a set of part requests belongs to one batch, and then send me one email for the batch, when every part in it has finished its checks, with a table of each part's outcome. Today every request sends its own email.

What happened

On 2026-11-10 my agent requested component pages for the 24 parts of one production board's BOM that had no wiki page. It made one adom-wiki part request <MPN> --datasheet <link> call per part, because it had a datasheet or Mouser link for each one and --datasheet works for single parts only (--bom takes MPN and Manufacturer columns, no link). Two parts were then re-requested under their orderable MPN.

Times are from adom-wiki part status --json (UTC):

Count When
Requests sent 24, then 2 re-requests 15:44:01 to 15:45:59; re-requests 15:52:57 and 15:53:01
Built 10 finished 15:46:18 to 15:49:17
Could not be built (cannot_build, with a reason) 14 (12 parts, plus both re-requests) finished 15:45:17 to 15:56:17
Still queued 2 still "queued, position 1 / 2, about a minute" at 17:36

I received 24 emails, which matches the 24 requests that had finished: one per part, all inside 11 minutes, each with one part's result. The two still queued will each send one more. Per #245, members also get one inbox item per outcome, so that is 24 inbox items as well.

What I actually wanted to know, once: which parts are done, which are not, and why. Twenty-four separate emails bury that answer (and the rest of my inbox) instead of giving it.

Why it matters

  • Agents source a whole BOM at once. An AI Flow board needs a component page for every BOM row (adom-aiflow parts fails on any part without one, unless a project library covers it), so one board can mean dozens of requests in a few minutes.
  • The person who gets the email is usually not the one making the calls. They need one summary they can act on, not a stream.
  • The per-part email is right for a person who asked for one part from the search box. It is wrong for a batch.

Proposed shape

Either of these would do; the first is the smallest change.

A. Make --bom the batch path for agents, and let a row carry its link.

adom-wiki part request --bom parts.csv --ref "Board X, Rev B" --now
# parts.csv columns: mpn, manufacturer (optional), datasheet (optional, same checks as --datasheet)
# prints: batch b_xxxx, 24 parts; one summary email when all 24 have finished
adom-wiki part status --batch b_xxxx

B. A batch id that single calls can join (for agents that request part by part, and for re-requests under another MPN).

B=$(adom-wiki part batch open --ref "Board X, Rev B" --json | jq -r .data.batch_id)
adom-wiki part request LMR36015SFBRNXR --datasheet https://... --batch "$B"
adom-wiki part request <next MPN> --batch "$B"
adom-wiki part batch close "$B"        # no more parts; the summary goes when they have all finished

The API side is the same for both: POST /api/part-request (and the batch route) accepts a batch_id, and the sweep holds the per-part emails and inbox items for batched requests.

Acceptance criteria

  1. A batch of N parts, made with --bom or with N calls that share a batch id, sends exactly one email to the requester, and no per-part "ready" or "stopped" emails.
  2. That email goes when every part in the batch has reached a final state (built, review, cannot_build), or at a deadline (for example 24 hours after the last request) if some have not.
  3. The email has one table: MPN, manufacturer, outcome, the page link for a built part, the reason for a stopped one, and each request's status link; plus counts at the top (built / needs review / could not be built / still queued) and a link to the batch.
  4. A part still unfinished at the deadline is listed as still queued with its status link; its later outcome shows on the batch status, and at most one follow-up email covers all the late parts together.
  5. Inbox items follow the same rule: one per batch, not one per part.
  6. --bom accepts a per-row datasheet link with the same checks as --datasheet (BAD_DATASHEET_LINK refuses that row, not the batch).
  7. A re-request under another MPN can join the original batch (B), and the summary shows it next to the part it replaces.
  8. part status --batch <id> and a web page for the batch show the same table as the email.
  9. The website's multi-select "Request selected" (the 25-part case in #267) uses the same batch, so it also sends one email.
  10. A single request outside any batch keeps today's per-request emails.

Not sure / not tested

I have not tested whether a --bom batch already sends one email instead of one per part. If it does, this narrows to criteria 6, 7 and 9, plus saying so in adom-wiki part request --help.

2 Replies

Colby Knox marked this in progress ·
Colby Knox ·

The server side of this is live on wiki.adom.inc.

  • One summary per batch. Two or more parts requested together (a --bom file, or the website's "Request selected") now send one email and one inbox item, with a row per part: outcome, the page for a built part, the reason for a stopped one, and each status link. It goes when every part has finished, or 24 hours after the last request with the unfinished ones listed as still queued. One follow-up at most covers the late parts.
  • Batch page. Each batch has a page with the same table, linked from the email and from "My part requests".
  • Batches from single calls. The API can open a batch, add single requests to it (including a re-request that names the part it replaces), and close it. An open batch closes itself after ten minutes with no new request.
  • Per-row datasheet links. The batch route takes a link per part with the same checks as a single request. A bad link refuses that row only.
  • Single requests outside a batch keep their own emails.

Still to come is the CLI: the datasheet column and --ref for --bom, part status --batch, and part batch open / close / list with --batch and --replaces on part request. That is with the CLI thread now. Until it ships, --bom without links already gets the single summary.

I'll close this when the CLI release is out.

Colby Knox ·

The CLI side is out in adom-wiki 1.8.18. part request --bom now takes a Datasheet column and --ref, part status --batch <id> shows the batch table, and part batch open / close / list with part request <MPN> --batch <id> [--replaces <MPN>] covers requests made one at a time. Every item in the acceptance list is live. Closing.

Colby Knox closed this ·

Log in to reply.