arizuko › products › Supermarket price agent — setup
Supermarket price agent — setup
One folder, one route, one channel. The fastest path from
arizuko create to a working price-lookup agent.
prerequisites
- A host with Docker and a public hostname (for web-chat widget) or a Telegram bot token.
- The
arizukobinary andarizuko-antagent image built (make build,sudo make images,sudo make agent). - Anthropic API access.
- Optional:
TELEGRAM_BOT_TOKENif you want a Telegram channel. Without it, the web-chat widget works standalone.
1. create the instance
arizuko create shop
cd /srv/data/arizuko_shop
$EDITOR .env
arizuko create writes .env with
ASSISTANT_NAME, a generated AUTH_SECRET, and
a generated SECRETS_KEY. Add what it can’t guess:
WEB_HOST=shop.example.com # public hostname
ANTHROPIC_API_KEY=sk-ant-…
# Optional: Telegram
TELEGRAM_BOT_TOKEN=…
2. register the folder and the catch-all route
arizuko group add writes the group row, seeds the folder,
and adds a route for the given JID in one step. Then add the catch-all
(an empty match expression matches every message; see the
CLI reference):
arizuko group shop add web:supermarket supermarket
arizuko route shop add '' supermarket
For Telegram only (not web chat or webhooks), scope the match instead:
arizuko route shop add 'platform=telegram' supermarket
For bulk or GitOps-style edits, declare routes in a YAML manifest
and arizuko apply shop shop-routes.yaml instead. The
dashd routes admin at /dash/ works too.
3. seed the retailer list and the brain
The agent reads facts/retailers.md before every search.
Populate it with the retailers you want it to check:
mkdir -p /srv/data/arizuko_shop/groups/supermarket/facts
cat > /srv/data/arizuko_shop/groups/supermarket/facts/retailers.md <<'EOF'
# Retailers
## Tesco
URL: tesco.com/groceries
Notes: Clubcard prices require a Clubcard account; list both regular and Clubcard prices.
## Sainsbury's
URL: sainsburys.co.uk/groceries
Notes: Nectar prices available; list both.
## Lidl
URL: lidl.co.uk/grocery
Notes: Prices update Thursday. Note the week-start date in replies.
EOF
Add or remove retailers to taste. The agent uses this file as its canonical source list — it won’t search retailers not listed here.
The group CLAUDE.md is the agent’s instructions.
This product ships no template, so write it — it’s what
makes the caching and citation behavior on the intro page true:
cat > /srv/data/arizuko_shop/groups/supermarket/CLAUDE.md <<'EOF'
# Supermarket price agent
Answer "where is X cheapest" questions. Read facts/retailers.md first;
search only the retailers listed there. Always cite source URLs.
Cache results in facts/cache/<item>-<YYYYMMDD>.md. Before searching,
check the cache; a file dated today answers without a new search.
Ignore cache files older than one day.
EOF
4. configure egress
The agent needs outbound access to the retailer domains and a search engine. Allow them via crackbox:
arizuko network shop allow supermarket tesco.com
arizuko network shop allow supermarket sainsburys.co.uk
arizuko network shop allow supermarket lidl.co.uk
Without an egress allowlist, crackbox blocks all outbound. The agent will say it couldn’t reach the site rather than silently returning stale data.
5. run
arizuko run shop
For production, install the systemd unit: see getting started for the template.
6. mint a web-chat token (optional)
A web-chat token gives you a chat URL you can open in any browser — no Telegram required:
arizuko token shop issue chat supermarket
# prints the token; the chat URL is https://shop.example.com/chat/<token>/
To build the chat into your own page, load
https://shop.example.com/assets/arizuko-client.js and use
its connect/send/stream calls.
Full instructions: chat SDK.
7. verify
sudo systemctl status arizuko_shop(ordocker compose ps) shows all services up.- For Telegram: send
/startto your bot; it should reply. - For web chat: open
https://shop.example.com/chat/<token>/in a browser and ask a price question. - Check
sudo journalctl -u arizuko_shop --since "5 min ago" | grep -iE 'error|fatal'for red flags.
tuning
Edit the agent’s behavior via the files in the group folder.
All paths under /srv/data/arizuko_shop/groups/supermarket/
are also reachable over WebDAV at
https://shop.example.com/dav/supermarket/ (operator auth).
-
Voice and citation format. Edit
CLAUDE.mdin the group folder. Useful overrides: how many retailers to compare, whether to show unit prices, what to say when a price is unavailable. -
Cache duration. The agent caches results in
facts/cache/by item + date. Files older than one day are ignored. To force fresh results, delete the cache:rm /srv/data/arizuko_shop/groups/supermarket/facts/cache/*.md. -
Rate limiting. Concurrent turns are capped by
MAX_CONCURRENT_CONTAINERSin.env(default 5; each search is one container turn). For a per-day message cap on the folder:arizuko gate shop add supermarket 200/day.
go deeper
- Supermarket price agent — intro
- crackbox — egress allowlist
- tokens — web-chat and hook token minting
- chat SDK — embedding the chat widget
- CLI reference — full command list