A Support Assistant with Memory
An assistant that speaks your product's voice, follows your triage procedure, can look things up, and remembers each customer across conversations, defined once on the server and adopted by one field from any client. This recipe builds it in the order the Agents category explains it: skill, memory store, definition, consumption, tests.
1The skill: the procedure as a file#
Create one folder in the server's skills directory, for example
skills/support-triage/, containing SKILL.md:
---
name: support-triage
description: Use when handling a customer support request end to end.
version: 1.0.0
---
Handle every request in this order:
1. Restate the customer's problem in one sentence and confirm it.
2. Check whether it matches a known issue before proposing anything new.
3. Propose the smallest safe next step, in {{ask:Which language?|the customer's language}}.
4. If the issue involves billing amounts, never estimate: say the exact figure or say you
will confirm it.
The watcher loads it live; the {{ask:...}} token gives it an activation input with a
default. Iterate in the admin Skills editor and the change applies to the next exchange.
2The memory store: forgetting as policy#
In the admin Memory section, define a store shaped for support (the knobs are explained in Memory); as configuration it looks like:
"Memory": {
"Enabled": true,
"Stores": [
{
"Name": "support",
"Description": "Per-customer support memory",
"TopK": 4,
"MaxEntries": 200,
"EvictionPolicy": "oldest-lowest-importance",
"TimeDecayHalfLifeHours": 2160
}
]
}
Facts fade over about three months and each recall injects at most four, so the assistant remembers the customer, not the transcript.
3The agent: one named bundle#
In the admin Agents section (as configuration, the Agents list):
"Agents": [
{
"Name": "support",
"Description": "Customer support assistant",
"System": "You are the support assistant for Acme Fabric. Be concrete, cite steps, never invent billing figures.",
"Skill": "support-triage",
"Tools": [ "web_search" ],
"Memory": true,
"MemoryStore": "support",
"Reasoning": "low",
"Greeting": "Hi, I am the Acme support assistant. What can I help you with?",
"MaxToolCalls": 4
}
]
Remember the design rule: this bundle grants nothing. web_search only
runs because the operator enabled it in the Tools policy, under the
egress mode; the bundle just saves callers from restating the
setup.
4Consume: one field from any client#
Discovery, so UIs build their picker from the server:
curl -s "$LMKIT_URL/lmkit/v1/agents" -H "Authorization: Bearer $LMKIT_API_KEY"
Consumption from any OpenAI SDK, because agent and memory ride the compatible endpoint
as extensions; the memory id is YOUR customer key:
curl -s "$LMKIT_URL/v1/chat/completions" \
-H "Authorization: Bearer $LMKIT_API_KEY" -H "Content-Type: application/json" \
-d '{
"agent": "support",
"memory": "customer-8412",
"messages": [ { "role": "user", "content": "My export failed again, same as last month." } ]
}'
"Same as last month" is the point: recall runs before the turn, so facts stored under
customer-8412 in earlier conversations arrive as hidden context, and the extraction after
the turn files what this one established. A different customer id is a different memory;
nothing crosses.
5Test: probes, evidence, assertions#
Treat the assistant as software with a regression suite (Building and Testing Agents):
- Behavioral probes: a fixed set of conversations run with a fixed
seed, asserting on the answer's substance (does the billing question refuse to estimate?). - Tool discipline: assert on the result's
tool_events: the refund-policy probe must show zeroweb_searchcalls if policy answers belong to the skill, and the outage-status probe must show exactly one. - Memory hygiene: after a probe conversation under a throwaway id, list its facts from the admin memory panel, assert the RIGHT things were remembered (the customer's plan, not their tone), then delete the id.
- Regression cadence: rerun the suite on every skill edit, definition change, or model swap; when judging quality by eye, judge blind.
6Production notes#
- Scope memory ids to real identity. Use your system's customer key, not session ids: memory should follow the person, not the browser tab.
- The greeting is free. It renders with no inference, so the picker-to-first-paint path costs nothing until the user actually speaks.
- Volume earns a tune. Corrected transcripts from review are training data; when one assistant carries real traffic, fine-tuning a compact model on them is the durable upgrade, and your probe suite is the before/after proof.