Use case · Commerce agents

Commerce agents that remember what the customer actually buys

A good store clerk remembers the shopper who returns everything in medium. A shopping agent without memory recommends medium again, with confidence.

The mixture

01 · Persistent memory
Leads
02 · Current context
Uses
03 · Traceable decisions
Light
04 · Shared context
Uses
05 · Scoped retrieval
Uses
01 · What breaks

Every visit is a first visit

Personalisation usually fails in the same three places, and all of them are visible in your returns data.

  1. 01

    Returns never become preferences

    The customer returned two jackets because the sleeves ran short. The reason sits in the order system. The shopping agent never reads it, so the third recommendation has the same sleeves.

  2. 02

    Segments stand in for people

    Without per-shopper memory, the agent personalises from a segment. "Women, 25 to 34, urban" is not the person who said last week she is shopping for her father.

  3. 03

    Stated constraints expire with the chat

    "Nothing with wool" was said in chat on Monday. On Thursday the email agent sends a wool edit, because the constraint never left the conversation it was spoken in.

02 · What it's made of

Mostly persistent memory. Then three others.

Every application on Alchemyst is a different mixture of the same five jobs. That mixture is what makes this a different piece of software from the one next to it, even though the API underneath is identical.

Leads · Persistent memory

What the user told you once stays told

Each shopper gets a durable memory: sizes that fit, reasons for returns, stated constraints, the person they are buying for. It is written as the conversation happens and read before every recommendation.

  • Constraints persist across channels.
  • Returns become signal, not noise.
  • The shopper is a person, not a segment.

Uses · Current context

The price and stock in force

Last season's catalogue is subtracted, so the agent never recommends what you no longer sell.

Uses · Shared context

Chat, email and checkout agree

Every commerce surface reads the same shopper memory.

Uses · Scoped retrieval

The right products in the window

Catalogue, size and constraint scopes are intersected before ranking, not after.

That is four of the five. The fifth, traceable decisions (every answer carries the exact context it was served, and why), is what leads in Customer support, IT & incident response and Compliance & audit instead. Same API, different mixture.

03 · What feeds it

The sources you already have

Bring sources in through the data-source integrations (PostgreSQL, MongoDB, Google Docs, Google Sheets, Amazon S3), an n8n workflow, or a direct context.add call. Each one lands scoped, so retrieval can intersect it with everything else.

Catalogue exportsOrder history (PostgreSQL)Return reasonsChat transcriptsReviewsAmazon S3
  1. 01 · Ingest

    Scope what you ingest

    Every document lands with a groupName: the sets it belongs to. Those sets are what retrieval intersects later, so the structure you choose here is the precision you get there.

    context.add
    import AlchemystAI from "@alchemystai/sdk";const client = new AlchemystAI(); // reads ALCHEMYST_AI_API_KEYawait client.v1.context.add({  context_type: "resource",  scope: "internal",  source: "catalogue",  documents: [{    content: "Field jacket JK-2291. Sleeve runs 2cm longer than standard. Sizes S to XL. In stock.",  }],  metadata: {    fileName: "sku-JK-2291.json",    groupName: ["catalogue", "outerwear", "fw26"],   // the sets this belongs to  },});
  2. 02 · Write

    Write the constraint, wherever it was said

    A constraint said once in chat should hold in email, in search and at checkout. Write it against the shopper the moment it is said.

    context.memory.add
    await client.v1.context.memory.add({  sessionId: "shopper_77120",  contents: [    {      role: "user",      content: "I returned the last two because the sleeves were short. And nothing with wool.",    },    { role: "assistant", content: "Noted: longer sleeves, no wool." },  ],  metadata: { groupName: ["commerce", "shopper_77120"] },});
  3. 03 · Search

    Search before recommending

    Search intersects the scopes, subtracts superseded and duplicate content, and ranks what survives. Only that reaches the model, and the whole decision is recorded as a Context Trace.

    context.search
    const { contexts } = await client.v1.context.search({  query: "Suggest a winter jacket for me",  scope: "internal",  similarity_threshold: 0.8,  minimum_similarity_threshold: 0.5,  metadata: { groupName: ["catalogue", "outerwear", "fw26"] },   // ∩ narrow scope});// − superseded, deduplicated → ranked → into the window// Every search is recorded as a Context Trace.const reply = await llm.respond(message, { context: contexts });

npm install @alchemystai/sdk or pip install alchemystai, both ship the same client. Full reference in the docs.

04 · Where it runs

Shopper memory is personal data first

Purchase history, sizes and stated preferences are personal data in every market you sell into. Keep them scoped per shopper, exportable on request, and deletable when the customer asks, without rebuilding your recommendation stack.

Security & compliance
Deployment
  • Managed cloud

    Encrypted in transit and at rest, isolated per organization, and scoped at write time.

  • Dedicated infrastructure

    Enterprise

    Single-tenant, with VPC peering when your data cannot share a network boundary.

  • Self-hosted

    On-premise

    Run the context layer on your own infrastructure, with OpenTelemetry for observability.

Talk to us

Bring the recommendation that keeps missing.

The one that suggested the thing the customer already returned.