Sales agent
About this agent
An in-store sales assistant for an electronics and home appliances retail chain โ TVs, ACs, refrigerators, washing machines, mobiles, laptops, kitchen appliances. It helps customers compare products, understand pricing and ongoing offers, and decide what to buy or which store to visit: honest and helpful, never pushy, and never inventing prices, stock or specs it does not actually have. Every reply is grounded in that one customer's own history โ signup details plus every product view, cart add, store visit, purchase and email event recorded against them โ so the customer never has to restate what the shop already knows.
What changed with Zenmem?
The same sales agent, built twice against the same request contract โ once on Zenmem, once on MongoDB + LangChain/LangGraph.
Before โ after
Before With Zenmem
What the team gained
- Two memory scopes โ durable customer facts and the live conversation โ a distinction one flat collection cannot express without a second store, a TTL index and cleanup code written by hand.
- Semantic recall over the whole touchpoint history arrives with the memory layer; the MongoDB build would need a separate vector store bolted on to match it.
- A sixth touchpoint type costs one endpoint โ no new collection, no new index, no schema migration.
- Storage and embedding are one call, so there is no field-by-field mapping to keep in step with the model.
- A three-turn conversation stayed on topic with the customer repeating no detail โ the follow-up questions resolved against what had already been said.
How memory is scoped
Two scopes, not one. Long-term memory holds the durable, CRM-shaped facts โ signup, purchases, store visits โ filtered to a single customer and kept indefinitely. Session memory holds the back-and-forth of the conversation happening right now, scoped to that session and discarded when it closes. Keeping them apart is what lets "which one of those did you say had the best picture quality?" resolve against the current conversation while "what do you know about me?" resolves against months of history.
API surface
Five endpoints and a chat route โ the whole agent.
Endpoints
- POST /api/v1/onboarding โ customer signup: userId, full name, email, phone, city, source.
- POST /api/v1/touchpoints/product-view โ a product the customer looked at.
- POST /api/v1/touchpoints/cart-add โ something added to the basket.
- POST /api/v1/touchpoints/store-visit โ a walk-in, tied back to the same customer.
- POST /api/v1/touchpoints/purchase โ a completed sale.
- POST /api/v1/touchpoints/email-event โ opens, clicks and the rest.
- GET /api/v1/touchpoints/{userId} โ the full history for one customer.
- POST /api/v1/chat โ a message in, a reply out, grounded in that customer's signup and touchpoints.