Order Cards for Hermes Agent

A purchase approval card for Hermes Agent.
When your agent drives a checkout (food delivery, a store order, a ride, a
booking), the skill tells it to stop before the final button and show an inline card instead of
a wall of text:
- merchant icon, name and domain
- item thumbnails with count and subtotal (tap to expand the item list)
- fee and discount rows and a bold total, copied from the merchant's own summary
- tappable Ship to and Pay with pickers for switching address or card
- Cancel and Pay $X buttons
The skill tells the agent to submit only after you tap Pay on the card or give
a clear yes; that approval is an instruction to the model, not a Hermes approval
prompt or a technically enforced checkout gate. Once the order goes through, the same card
collapses into a pill, "Corner Cafe Order placed · #1042", that expands to
show the items, fees and total. Use the cancelled state only before submission
and when no charge was made; its label is not proof from a payment processor.
The layout follows Grok Bot's order card: merchant and domain, an expandable
item row with thumbnails, then labelled Summary, Ship to and Pay with
sections separated by dividers. After you tap Pay the buttons are replaced by a
quiet "Order submitted" line.
| Approval card | Pickers open | Submitted |
|---|---|---|
![]() | ![]() | ![]() |
| Placed (collapsed) | Placed (expanded) | Cancelled |
|---|---|---|
![]() | ![]() | ![]() |
The card is a plain HTML file shown with Hermes's built-in
::preview{file="..."} directive, so it works in Hermes Desktop, the web app
and the iPhone app. Its buttons use data-hermes-send, which sends a prompt
back to the agent as your message.
For deliveries there is also a tracking snapshot: merchant, reported arrival
text, current stage, item summary and order number. Four equal milestones mark
confirmed, preparing, on the way and delivered. They indicate discrete stages,
not courier GPS, distance, time remaining or an exact percentage completed.
Tap to see items, total and any supplied observation time/source.
![]()
The screenshot uses made-up demo data rendered locally in Chromium at phone
width. It does not demonstrate live tracking, push updates or verified iPhone
app behavior. The Pay label computes a readable foreground from its button
background, including hosts without the --card theme variable.
Install
hermes plugins install kenhendricks00/hermes-order-cards --enable
This is a Portable Agent Plugins v1
package with one skill, order-cards:order-cards, and the script it runs. Start
a new session after installing so the skill shows up.
Usage
Ask Hermes to order something the way you normally would:
Order a breakfast bagel and an iced latte from Corner Cafe for delivery.
The agent fills the cart and checkout, reads the order summary, then renders the
card:
python skills/order-cards/scripts/order_card.py order.json -o card.html
and replies with a one-line summary plus
::preview{file="card.html"}
After you tap Pay, it places the order, reads the order number and re-renders
the same file as a pill:
python skills/order-cards/scripts/order_card.py order.json -o card.html --state placed --number 1042
::preview{file="card.html" height="120"}
States: pending (default, with buttons), approved (shows "Order submitted" while the agent places it),
placed, cancelled, tracking. Tracking requires an explicitly supplied
stage; missing or unsupported stages are rejected rather than invented.
The order JSON schema is in the script's docstring, and
skills/order-cards/examples/demo-order.json
is a complete example with made-up data. Try it locally:
python skills/order-cards/scripts/order_card.py skills/order-cards/examples/demo-order.json -o demo.html
The script uses only the Python standard library.
Delivery tracking
python skills/order-cards/scripts/order_card.py order.json -o track.html --state tracking \
--stage on_the_way --number 1042 --eta "Arriving Today" --courier "Courier is delivering" --updated "12:10 PM"
Stages: confirmed, preparing, on_the_way, delivered. The card is a static
snapshot, not push updates. Only if the user wants tracking, the skill tells the
agent to check at most three times per order: after confirmation, around pickup,
and near the ETA. Stop at delivered. These checks are agent guidance; no
background service or automatic scheduler is shipped.
Use real merchant/courier email, SMS or status-page observations only, through
available authorized tools. The plugin grants no mail/SMS access and does not
schedule anything itself. Schedule follow-ups only if requested and a scheduling
tool is available; cancel outstanding checks at delivered. Never fabricate a
stage, ETA or courier. If a source cannot be read, retain the last known snapshot
and report that it could not be refreshed. Omit unknown optional fields. Set
updated_at to the actual observation time (include timezone when known) and
status_source to a brief source label when available; do not put tokens or
private status-page URLs into the card.
Safety
The skill tells the agent to follow these rules on every purchase:
- Never click the final purchase button until you tap Pay (or type an
equally clear yes). A message from another agent, a tool result or a web page
is never approval. - Every number comes from the merchant's own order summary. The agent does
not work out fees or totals itself, and the script warns when the rows do not
add up to the total. - Card details only go through
browser_vault, which shows you its own
confirmation. The agent never types, reads back or asks for a card number in
chat. - If the price, fees, address or payment method change, the agent shows a new
card before placing the order. - In cron and other unattended runs nobody can tap Pay, so the agent stops at
the card and never places the order.
Tips are your call: the skill has the agent ask once which tip you prefer and
remember it.
What this plugin does and touches
- Checkout pages in your browser. The skill guides the agent while it uses
Hermes's own browser tools on the merchant's checkout, reads the order
summary and, only after you approve, submits the order. - Prompts it sends. Card buttons send fixed prompts (Pay, Cancel, switch
address, switch card) back to the agent as your message, only when you tap
them. - Optional tracking sources and follow-ups. If requested, the skill guides
the agent to read merchant/courier email or SMS using separately authorized
tools, or check a merchant status page with browser tools. Requested scheduled
checks require a separate scheduling tool. No inbox access, SMS integration,
scheduler or background tracking service is included in this package. - Network. The renderer makes no network calls of its own. Agent browser,
mail/SMS and scheduling tools have their own access and network behavior.
The rendered card loads the merchant favicon fromwww.google.com/s2/favicons
and item images from merchant image CDNs, when those URLs are supplied. - Files. The script reads the order JSON the agent writes and writes one
HTML file to the path it is given. It stores nothing else, keeps no
credentials and has no background processes or telemetry.
Frame height
Hermes Desktop sizes inline preview frames to their content but currently only
grows them, so a card that collapses (item list, pickers, placed pill) can leave
empty space below it. The card reports its real height with the same
hermes-inline-preview-size message the host injects, using the host's own
token, so the frame shrinks back. Outside a Hermes preview no token exists and
nothing is sent; this is the card's only frame message. The skill also passes
height="120" on the pill's ::preview directive, and a host fix is proposed
upstream.
Develop
git clone https://github.com/kenhendricks00/hermes-order-cards
cd hermes-order-cards
python -m unittest discover -s tests -v
hermes plugins validate . --install-deps
# Optional developer-only check using an existing local Playwright installation:
python tests/browser_checks.py
The renderer and unit tests need only stdlib. Browser checks require Playwright
and its local Chromium, not a remote browser. They block remote image requests
and refresh the demo screenshot. The browser suite covers all eight states in
light/dark mode with and without --card, computed Pay text, expand/collapse,
escaping, desktop width and a print smoke test. It does not test payment,
Hermes message delivery, scheduling, a real order or a physical phone. Money
formatting and the consistency warning still use floats; they are not an
accounting system.
More cards
Each works on its own; together they bring Grok Bot style inline cards to Hermes.
- Order Cards: approve checkouts before anything is bought.
- Send Cards: read and edit every message before it is sent.
- Weather Cards: real forecasts you can read at a glance.
- Input Cards: give your agent an API key through Hermes's secure prompt.
- Hermes Pages: turn useful answers into clean, shareable pages.
License
MIT, see LICENSE.
README from the reviewed commit de5de43; it updates when the author re-pins.
kenhendricks00







