SALES AGENT
YOUR INBOX.
YOUR AI SALES AGENT.
An AI employee for a Facebook Messenger shop inbox. It answers from your real product catalog, sends product photos, and creates orders. You stay focused on running the business.
- Customer: do you have the blue one in medium?
- Sales agent checks the real product catalog.
- Catalog: Classic Shirt, Blue, Medium, ৳1,450, in stock.
- Agent replies with the product and a photo.
- Order created: Classic Shirt, quantity 1, total ৳1,450.
THE PROJECT
AN AI EMPLOYEE FOR YOUR MESSENGER INBOX.
Sales Agent connects a Facebook Page inbox to a product catalog, AI, and order system. Customers can ask about products, receive real product information and images, and place orders directly through the conversation.
Built as an open-source system with multiple AI providers, product-aware tools, customer memory, human handoff, and a dashboard for managing the whole operation.
CUSTOMER
“red shoe price?”
AI SALES AGENT
PRODUCT CATALOG
RED SHOE · ৳1,200 · IN STOCK
MESSENGER
[ PRODUCT IMAGE ]
“Yes, ৳1,200. Available.”
ORDER
✓ CREATED
THE SYSTEM
SEE IT IN ACTION.

01OVERVIEW
WATCH THE FULL RUN.
ONE RECORDING
One take, nothing cut in the middle. dashboard, inbox, catalog, orders, AI settings, setup, in that order.
02DASHBOARD
START WITH THE OVERVIEW.
SEE WHAT MATTERS
The needs-attention list, today's numbers, and provider health. Read-only triage. It refreshes itself.
STAY IN CONTROL
Inbox, catalog, orders. One sidebar, no page-hopping.
03INBOX
EVERY CONVERSATION IN ONE PLACE.
READ THE THREAD
The full back-and-forth, customer and agent, in the order it happened.
STEP IN WHEN NEEDED
Take over with human handoff. The AI goes quiet on that thread until you hand it back. Drafts, notes, pin, resolve included.
04CATALOG
YOUR SHELF, ON SCREEN.
EDIT WHAT YOU SELL
Name, price, stock, description per product. custom columns and images on top, CSV import for bulk. No code.
THE AGENT READS HERE FIRST
Every price and availability answer comes from this table. Only enabled catalogs count. If it is not on the shelf, it does not get sold.
05ORDERS
WHEN SOMEONE SAYS YES.
ORDERS WRITE THEMSELVES
A confirmed chat becomes an order. Items, live totals, delivery.
TRACK WHAT IS NEXT
Status runs active to closed, customer details beside it. No payments inside. Fulfillment happens outside the app.
06AI ENGINE
CHANGE THE BRAIN.
PICK YOUR PROVIDER
Start with OpenRouter or OpenAI. Eleven provider types total, priority order, automatic failover. Keys stay encrypted.
GIVE IT MEMORY
Recent customer history plus per-customer summaries. product tools allowlisted per agent, so answers stay grounded.
07AGENTS
WHO SELLS WHAT.
BIND THE PIECES
One agent ties Page, prompt, skills, provider pool, and catalogs together.
DEFAULT ANSWERS
Bind at least one agent, or the default agent answers everything.
03 / SETUP
RUN YOUR OWN SALES AGENT.
01
BRING THE TOOLS
Rust to WebAssembly, the Worker bundler, Node.js 20+, and the Turso CLI for the local database.
rustup target add wasm32-unknown-unknown cargo install worker-buildConfirm: rustc --version, node --version, worker-build --version, and turso --version all print.
02
COPY THE ENV FILES
Real secrets live in gitignored files. Never commit them.
cp backend/.env.example backend/.dev.vars cp frontend/.env.example frontend/.envConfirm: Both new files exist.
03
MINT THE SECRETS
Generate three values, then map them: first to API_HANDSHAKE_TOKEN and NEXT_PUBLIC_HANDSHAKE (must match exactly), second to AI_ENCRYPTION_KEY, third to META_ENCRYPTION_KEY.
openssl rand -hex 32Confirm: No placeholder remains in the top half of backend/.dev.vars. Dev shortcut: HANDSHAKE_DISABLED=1 skips the handshake. Dev only, never in prod.
04
START THE DATABASE
Turso holds every table. Apply the schema files in order against a local dev database.
turso dev -f /tmp/turso-dev.db -p 8080 & turso db execute http://127.0.0.1:8080 --file backend/migrations/turso/0001_schema.sql turso db execute http://127.0.0.1:8080 --file backend/migrations/turso/0002_rate_limit_counters.sqlConfirm: turso db execute http://127.0.0.1:8080 "select count(*) from sqlite_master;" returns.
05
RUN THE BACKEND
Rust to WASM first. Slow the first time, about a minute after. If worker-build hangs after printing Done, kill it. Artifacts are already written.
cd backend worker-build --release npx wrangler dev --port 3000Confirm: curl http://localhost:3000/health prints "ok".
06
RUN THE FRONTEND
Then create the admin password on the setup screen. No seed password exists. First creator wins.
cd frontend npm install npm run devConfirm: The login page loads at http://localhost:3001/login and you land on the dashboard.
07
SMOKE TEST THE AI
Add a provider on the Providers page first. Until then, health plus login is enough.
curl -X POST http://localhost:3000/debug/ai/test -H 'Content-Type: application/json' -H "X-Handshake-Token: $API_HANDSHAKE_TOKEN" -d '{"endpoint":"<name>","message":"Hi"}'
WANT A CUSTOM VERSION?
LET'S BUILD IT FOR YOUR SHOP.
Sales Agent is open source and ready to run. If your shop needs something more specific: your catalog, your language, your workflow. I can build a custom sales system around it.