All labs · Lab 42 · intermediate · 40 min

Memory that outlives the conversation

Let your assistant store facts and find them in a later session, without one customer seeing another's.

You build: Two tools, remember and recall, backed by a local vector database with one space per customer.

  • Docker
  • Python 3.11 or newer and uv
  • Ollama
  • Lab 30 done
  1. 01Start Qdrant

    docker run -d --name learn-qdrant -p 6333:6333 qdrant/qdrant && sleep 3 && curl -s http://localhost:6333/collections

    You pass when: JSON with "status":"ok" and an empty list of collections.

  2. 02Add remember(fact) and recall(question) to your harness

    uv run --with openai --with qdrant-client --with requests harness.py --customer ana "Remember that I prefer deliveries after 6pm"

    You pass when: It confirms the fact was stored, and the collections list now has one entry.

  3. 03Start a new session and ask about it

    uv run --with openai --with qdrant-client --with requests harness.py --customer ana "When should you deliver to me?"

    You pass when: A fresh process answers after 6pm.

  4. 04Ask the same question as another customer

    Filter by customer in the database query, not in the prompt. A prompt can be talked out of a rule; a filter cannot.

    uv run --with openai --with qdrant-client --with requests harness.py --customer ben "When should you deliver to me?"

    You pass when: It does not know. Ana's fact never appears in Ben's session.

The check runs on the computer, not on your word: a step passes when its command exits with 0 there.

Your computer · Fleet · off

Computers are not set up on this site yet. Run each command on your own machine and compare with "You pass when".