---
title: chatAgent
description: An AI shopping assistant for WhatsApp — Rivet durable actors, AgentOS V8 isolates, Pi Agent Core, Shopify Storefront, and Jev turn routing.
---

chatAgent answers customer messages for a Shopify store on WhatsApp. Each customer
gets a durable **Rivet actor** with its own **AgentOS** V8 isolate, where a
**Pi Agent Core** agent calls the Shopify Storefront API and replies in the
store's voice.

A **Jev** (TypeSafe) judgment runs before every turn: it decides whether the
message needs the full shopping agent or can be answered directly, and it scores
the catalog keywords the search tool should use.

```mermaid
flowchart LR
    WA["WhatsApp Cloud API"] --> GW["Node HTTP gateway"]
    GW --> ACT["shoppingAgent actor (per user)"]
    ACT --> ISO["AgentOS V8 isolate: Pi Agent Core"]
    ACT --> JEV["Jev: route + catalog keywords"]
    ISO --> SHOP["Shopify Storefront API"]
    ISO --> LLM["LLM provider"]
```

## Start here

**[WhatsApp Shopping Bot](/whatsapp-shopping-bot)**

What the bot does, end to end.

**[Architecture](/architecture)**

The layers: gateway, actors, isolates, agent runtime.

**[Rivet Actor Model](/rivet-actor-model)**

The actor implementation, canonical reference.

**[Turn Router Middleware](/turn-router-middleware)**

Jev routing, the fast lane, and the scored search keywords.

## Run it

```bash
bun install                 # repository root, or any package folder
bun --cwd runtime run dev   # the runtime + actors
bun test                    # runtime unit and integration tests
```

The service runs on Node 22 with RivetKit and AgentOS; Bun is the package
manager, task runner, and test runner. Configuration lives in `.env` — see the
[Integration Guide](/integration-guide) for the full wiring and
[Concurrency & Security](/concurrency-security) for the limits and guards.

## How this site is built

These pages are the repository's own `docs/` folder, published by
[Blume](https://useblume.dev) and deployed to Cloudflare Pages on every push to
`main` — see [Docs Site](/docs-site) for the pipeline, the secrets it needs, and
the Cloudflare Access layer in front of it.
