User has a list of items and wants to know where to go. This skill minimizes stops while respecting stock, distance, and store hours.Documentation Index
Fetch the complete documentation index at: https://docs.closient.com/llms.txt
Use this file to discover all available pages before exploring further.
When to use
- User provides 2+ items and asks “where should I go?”
- User wants a route, not just a single-store recommendation.
- Shopping is local (within a few km of the user’s location).
check-product-availability directly.
Inputs to gather
- Shopping list — product names or GTINs (mixed is fine).
- Origin location — latitude + longitude.
- Max distance / budget — optional
radius_km(default 10), optionalmax_stops(default 3). - Preferences — optional: in-stock only, avoid certain stores, prefer local-independent.
Flow
1. Resolve each item to candidate GTINs
For items already given as GTINs, skip. For free-text, calllocal-product-search per item to get top candidates with per-store
availability.
2. Build a coverage matrix
Rows = stores within radius. Columns = items. Cell =(available, price, confidence). Drop stores where no items are available.
3. Pick the minimum cover
Greedy set-cover works fine for small lists: pick the store covering the most items, repeat on the remaining list. Tie-break by distance, then total price.4. Order the stops
Sort picked stores by distance from origin, then by travel time between consecutive stores. Ifmax_stops is exceeded, relax “in-stock only” before
dropping items.
5. Return the plan
Guidance for agents
- Always state what’s unavailable — users need to know what they’ll have to pick up elsewhere or skip.
- Respect constraints explicitly: if the user said “no Whole Foods,” exclude that chain even if it gives a better cover.
- Prefer fewer stops over lowest total price unless the user says otherwise — time is usually the real constraint.
Planned
APOST /search/api/v1/trip-plan endpoint that runs the optimization
server-side would let agents hand off the whole computation. For now, the
agent drives the loop.
Related skills
local-product-search— drives candidate resolution per itemcheck-product-availability— per-store verification for a GTINhyperlocal-nearby— add opportunistic items the user didn’t ask for