arizuko

arizukoproducts › 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

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

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).

go deeper