Skip to content
Use case · Customer support

Support that remembers every customer — and gets cheaper every ticket.

Give your support agent a brain per customer, held to your policy, that compounds what it learns instead of re-reading history on every reply.

What it is

A support agent that keeps a persistent brain for every customer and is held to your written policy — so it resolves faster, stays on-brand, and spends fewer tokens the more it runs.

Why it matters

A raw LLM support agent forgets the customer the moment the session ends, so every ticket re-stuffs the whole history into the prompt — expensive, slow, and inconsistent. Answers drift off-policy, and the agent never actually gets better at your product's recurring issues.

Before · After

What changes with a memory layer.

Without Khwan
  • Memory

    Forgets the customer when the session ends.

  • Cost

    Re-stuffs the full history into every prompt.

  • Consistency

    Tone and refund rules drift between replies.

  • Improvement

    Never gets better at recurring issues.

With Khwan
  • Memory

    A persistent brain per customer, across every ticket.

  • Cost

    Synthesis distills resolutions — ~80% lower cost/task in our tests.

  • Consistency

    A coherence gate holds every reply to your policy.

  • Improvement

    Compounds common resolutions into standing lessons.

How it works

The same loop — three calls, your model in the middle.

1Khwan

prepare

Builds the brief — memory + written identity + coherence gate. No LLM call.

2You

your model

You call your own model — your provider, your key. Khwan never touches it.

3Khwan

record

Persists the turn and learns from it — so the next prepare is sharper.

Every run compounds. The brief gets tighter, cost drops, and answers sharpen — the memory that thinks, not just recalls.

A brain per customer

Per-user sub-brains give each customer their own persistent memory. The agent recalls their plan, past tickets, and preferences instead of re-reading a transcript every time.

On-policy by construction

A written support policy becomes the agent's constitution. The coherence gate checks each reply against it before it ships — refunds, tone, and escalation rules stay consistent across thousands of conversations.

Cheaper as it learns

Overnight synthesis distills recurring resolutions into standing lessons, so prompts get shorter and sharper. In our tests, cost per task dropped ~80% once synthesis kicked in.

What you get

Outcomes, not orchestration.

  • Shorter prompts and lower model spend on repeat questions
  • Consistent, on-brand answers instead of drift
  • Full context on returning customers, no re-explaining
  • Bring your own model — no lock-in, no token markup from us

Support teams, help-desk products, and SaaS building an in-app agent.

The whole integration — three calls

agent.ts
import { Khwan } from "@khwan/client";
 
const kw = new Khwan({ apiKey: process.env.KHWAN_API_KEY });
 
// 1 — Khwan builds the context (memory + coherence). No LLM call.
const turn = await kw.prepare(input);
 
// 2 — You call your own model. Your provider, your key.
const answer = await yourModel(turn.messages);
 
// 3 — Hand it back. Khwan persists + learns; next prepare is sharper.
await kw.record(turn, answer);

Start free — feel the compounding before you pay for it.